I need to configure a Point Grey camera (FL3-U3-32S2C) with some values that were given to me. For some reason everything works perfect except for the image size.
For example, the following (very simplified) code works perfect:
#include <dc1394/dc1394.h>
int main(int argc, char *argv[])
{
dc1394_t * d;
dc1394camera_t * camera;
dc1394camera_list_t * list;
// Get the camera
d = dc1394_new ();
if (!d) return 1;
dc1394_camera_enumerate (d, &list);
camera = dc1394_camera_new (d, list->ids[0].guid);
dc1394_camera_free_list (list);
// Configure
dc1394_video_set_mode(camera, DC1394_VIDEO_MODE_FORMAT7_4);
dc1394_format7_set_image_size(camera, DC1394_VIDEO_MODE_FORMAT7_4, 640, 480);
dc1394_camera_free(camera);
dc1394_free (d);
return 0;
}
However, if I make dc1394_format7_set_image_size(camera, DC1394_VIDEO_MODE_FORMAT7_4, 1040, 776);
instead, the program throws the following error
libdc1394 error: Format_7 Error_flag_1 is set: in _dc1394_v130_handshake (format7.c, line 126): invalid image position, size, color coding or ISO speed
libdc1394 error: Format_7 Error_flag_1 is set: in dc1394_format7_set_image_size (format7.c, line 482): F7 handshake failure
which is intriguing since it's a supported size under format7_4
according to the technical documentation of the camera (section 8.4.6).
So I'm kinda stuck, does anyone have an idea of why the handshake is failing? :/
After playing around with the different parameters I realised that the image position was not anchored at
left = 0
andtop = 0
by default. Setting them to zero (dc1394_format7_set_image_position(camera, DC1394_VIDEO_MODE_FORMAT7_4, 0, 0);
) made it possible to use the maximum image size (which is the case for 1040 x 776 underformat7_4
).