Category Archives: Aravis

New cameras

I have received two new cameras for aravis development.

The first one came from The Imaging Source, thanks to Arne Caspari. It’s a DMK23G618 monochrome camera. As a bonus, I have also received a couple of patches from Edgar Thier, allowing to correctly set the acquisition frame rate on this kind of device.


The second camera is a Blackfly BFLY-PGE-14S2C-CS colour camera, which comes from PointGrey, thanks to Damian Nesbitt. This camera is interresting as it requires the support for PENDING ACK packets, a feature not yet implemented in aravis.


Thanks a lot.

Release of Aravis 0.1.8

So, what’s new since the last blog entry on an Aravis release ?

Mostly bug fixes, but also some new features. The video stream code has been vastly improved and should be more robust now, with a better packet resend mechanism. I’m still not completely happy about this part, as when using my Ace camera on a low quality network (i.e. wifi), after some time aravis lost the connection to the camera.

I’v renamed arv-show-devices to arv-tool, and then added the capability to read/write and list the device features. It’s really helpful for testing Aravis.

The color support is also improved, and now the gstreamer plugin supports caps filtering, which makes it more consistent with the behaviour of other gstreamer plugins.

Finally, the library is parallel installable, which means I should release a stable version of aravis soon.

Kind donation of a color camera

Bert Douglas, from TPLogic has donated a Basler acA1300-30gc color camera, equipped with a very nice Theia MY125M lens.

This donation already helped me to fix a number of obvious issues related to the new pixel formats this camera supports. And it is very convenient to have this device at home for aravis development.

Thanks a lot.

Aravis 0.1.2 released, now with a place for the bug reports

I’ve released aravis 0.1.2 last week. Since 0.1.0, I’ve added a basic ethernet camera simulator, fixed a bunch of bugs in the gvcp protocol code and in the genicam one. As I’ve changed of laptop, and migrated to a 64 bit linux distribution, support of 64 bit platform has also greatly improved…

And now, Aravis has a bugzilla, hosted on the gnome infrastructure. It’s here:

Aravis 0.1.0 released

I’ve just released the first unstable version of Aravis.

In this release, you’ll find:

  • Support for gigabit ethernet cameras, with packet resend
  • Support for a large subset of the Genicam interface
  • A simple API for easy camera control
  • A work-in-progress documentation
  • A simple gstreamer source element
  • Gobject-introspection support

As Aravis don’t have a bug report facility yet, please report any bug to me using this address: emmanuel at gnome org.

Want to help Aravis ?

If you want to help Aravis, you can as usual report bugs, or contribute code. It would be interesting, for example, to add support for other protocols than gigabit ethernet.

Another way would be to give me access to more cameras. Currently, I can test Aravis with a Basler Sca1400 and a Prosilica GC1380 cameras, which are both B&W. Donation of other hardware, even with broken sensors, would be greatly appreciated.

Gobject-introspection and Aravis

I’ve played yesterday with a gjs script, using gobject-introspection. Here’s the result:

#!/usr/bin/env gjs

const GLib =;
const Aravis =;

let camera = ("Fake_1");

camera.set_region (0,0,128,128);
camera.set_pixel_format (Aravis.PixelFormat.MONO_8);
camera.set_fixed_frame_rate (10.0);

let [x,y,width,height] = camera.get_region ();

let stream = camera.create_stream (null, null);

for (var i = 0; i < 100; i++)
	stream.push_buffer ( (128*128, null));

camera.start_acquisition ();

GLib.usleep (1000000);

camera.stop_acquisition ();

I guess I should review the Aravis API and add the correct annotations. Next, I'll try PyGI.

Chose promise, chose due

Here’s an example of the use of the ArvCamera API of Aravis:

#include <arv.h>
#include <stdlib.h>

static gboolean cancel = FALSE;

static void
set_cancel (int signal)
	cancel = TRUE;

static char *arv_option_camera_name = NULL;
static char *arv_option_debug_domains = NULL;
static gboolean arv_option_snaphot = FALSE;
static gboolean arv_option_auto_buffer = FALSE;
static int arv_option_width = -1;
static int arv_option_height = -1;
static int arv_option_horizontal_binning = -1;
static int arv_option_vertical_binning = -1;

static const GOptionEntry arv_option_entries[] =
	{ "name",		'n', 0, G_OPTION_ARG_STRING,
		&arv_option_camera_name,"Camera name", NULL},
	{ "snapshot",		's', 0, G_OPTION_ARG_NONE,
		&arv_option_snaphot,	"Snapshot", NULL},
	{ "auto",		'a', 0, G_OPTION_ARG_NONE,
		&arv_option_auto_buffer,	"AutoBufferSize", NULL},
	{ "width", 		'w', 0, G_OPTION_ARG_INT,
		&arv_option_width,		"Width", NULL },
	{ "height", 		'h', 0, G_OPTION_ARG_INT,
		&arv_option_height, 		"Height", NULL },
	{ "h-binning", 		'\0', 0, G_OPTION_ARG_INT,
		&arv_option_horizontal_binning,"Horizontal binning", NULL },
	{ "v-binning", 		'\0', 0, G_OPTION_ARG_INT,
		&arv_option_vertical_binning, 	"Vertical binning", NULL },
	{ "debug", 		'd', 0, G_OPTION_ARG_STRING,
		&arv_option_debug_domains, 	"Debug mode", NULL },
	{ NULL }

main (int argc, char **argv)
	ArvCamera *camera;
	ArvStream *stream;
	ArvBuffer *buffer;
	GOptionContext *context;
	GError *error = NULL;
	int i;

	g_thread_init (NULL);
	g_type_init ();

	context = g_option_context_new (NULL);
	g_option_context_add_main_entries (context, arv_option_entries, NULL);

	if (!g_option_context_parse (context, &argc, &argv, &error)) {
		g_option_context_free (context);
		g_print ("Option parsing failed: %s\n", error->message);
		g_error_free (error);
		return EXIT_FAILURE;

	g_option_context_free (context);

	arv_debug_enable (arv_option_debug_domains);

	if (arv_option_camera_name == NULL)
		g_print ("Looking for the first available camera\n");
		g_print ("Looking for camera '%s'\n", arv_option_camera_name);

	camera = arv_camera_new (arv_option_camera_name);
	if (camera != NULL) {
		gint payload;
		gint x, y, width, height;
		gint dx, dy;
		double exposure;
		guint64 n_processed_buffers;
		guint64 n_failures;
		guint64 n_underruns;

		arv_camera_set_region (camera, 0, 0, arv_option_width, arv_option_height);
		arv_camera_set_binning (camera, arv_option_horizontal_binning, arv_option_vertical_binning);

		arv_camera_get_region (camera, &x, &y, &width, &height);
		arv_camera_get_binning (camera, &dx, &dy);
		exposure = arv_camera_get_exposure_time (camera);
		payload = arv_camera_get_payload (camera);

		g_print ("image width         = %d\n", width);
		g_print ("image height        = %d\n", height);
		g_print ("horizontal binning  = %d\n", dx);
		g_print ("vertical binning    = %d\n", dy);
		g_print ("exposure            = %g ┬Ás\n", exposure);

		stream = arv_camera_new_stream (camera);
		if (arv_option_auto_buffer)
			arv_gv_stream_set_option (ARV_GV_STREAM (stream),

		for (i = 0; i < 30; i++)
			arv_stream_push_buffer (stream, arv_buffer_new (payload, NULL));

		arv_camera_start_acquisition (camera);

		signal (SIGINT, set_cancel);

		do {
			g_usleep (100000);

			do  {
				buffer = arv_stream_pop_buffer (stream);
				if (buffer != NULL) {
					/* Image processing here */
					arv_stream_push_buffer (stream, buffer);
			} while (buffer != NULL);
		} while (!cancel);

		arv_stream_get_statistics (stream, &n_processed_buffers, &n_failures, &n_underruns);

		g_print ("Processed buffers = %Ld\n", n_processed_buffers);
		g_print ("Failures          = %Ld\n", n_failures);
		g_print ("Underruns         = %Ld\n", n_underruns);

		arv_camera_stop_acquisition (camera);

		g_object_unref (stream);
		g_object_unref (camera);
	} else
		g_print ("No camera found\n");

	return 0;

A direct use of the Genicam API is shown in the arv-test.c file in the git repository: