aravis
aravis copied to clipboard
Notes about making aravis work with the FLIR Boson USB camera
Hi. I'm using aravis with the FLIR Boson now. It works with a few modifications, described here.
This is a USB3 camera; it does v4l2, not genicam. That is supported by aravis. I'm using a recent HEAD from git: 6c5ed99bf35047011387a5555519b38fe1bedfc8. This camera uses the mono16 pixel format. At this time aravis-v4l2 only supports yuv422, so I had to tell aravis about mono16:
diff --git a/src/arvv4l2misc.c b/src/arvv4l2misc.c
index f9dcdc0e..e79ac66d 100644
--- a/src/arvv4l2misc.c
+++ b/src/arvv4l2misc.c
@@ -16,6 +16,7 @@ typedef struct {
static ArvV4l2GenicamPixelFormat pixel_format_map[] = {
{V4L2_PIX_FMT_YUYV, ARV_PIXEL_FORMAT_YUV_422_YUYV_PACKED},
+ {V4L2_PIX_FMT_Y16, ARV_PIXEL_FORMAT_MONO_16},
/* Disable these formats for now, makes gstreamer crash:
{V4L2_PIX_FMT_RGB24, ARV_PIXEL_FORMAT_RGB_8_PACKED},
{V4L2_PIX_FMT_BGR24, ARV_PIXEL_FORMAT_BGR_8_PACKED},
That mostly makes it work. Unideal things:
arv_camera_dup_available_pixel_formats_as_strings()says this pixel format is called "16-bit Greyscale", instead of "mono16" (or something like that) for normal genicam cameras. So callingarv_camera_set_pixel_format(...,ARV_PIXEL_FORMAT_MONO_16,...)doesn't work:[PixelFormat] [PixelFormatRegister] Invalid address (0x00000128). This format is set by default, however, so the workaround is to simply not try to set it- Similarly, trying to set the width or height doesn't work. But they're correct to begin with, and we can just not touch them
- When capturing images, calling
arv_stream_push_buffer()too many times makes many captures fail:arv_stream_pop_buffer()saysARV_BUFFER_STATUS_CLEARED. I see that with 40 buffers, but 20 buffers works ok
Other than that, it all works perfectly. Thank you very much for making this all work.