Running in Format7 (partial image) mode
A recent observation made when running the FlyCapture2 SDK in Format7 (partial image) mode. Just thought this was worth a mention.
When setting the width setting for the Format7ImageSettings data structure, if this value is not a multiple of 8 then
ValidateFormat7Settings returns the
FlyCapture2::Error value PGRERROR_IIDC_FAILED.
This function is normally invoked when you wish to validate the Format7 (partial image) setting before commencing with the capture of camera images. In addition, it would also appear that the height setting needs to be a multiple of 2 (even) to ensure a satisfactory Format7 setting.
Obtaining feasible width / height settings
This would explain why the image grabbing routine works perfectly well for [width, height] settings of (say) 24 x 480 or 56 x 482 pixels but not 52 x 484 or 24 x 483 pixels.
This issue may well be already described in the FlyCapture2 SDK documentation and I’ve overlooked it, but I think it’s worth mentioning here especially if it helps people avoid wasting a load of time messing with perfectly good code, wondering why one configuration does the job while other similar looking ones don’t.
Up until recently I had usually been (subconsciously) using widths that were multiples of 8 and even height values without realizing their significance, so I had been (un)lucky in not noticing this issue until now.