Hi Kyle,

The value of frame->position is actually only set once, when dc1394_capture_setup() is called.  The reason for this is that the IIDC protocol doesn't transmit this value with every frame, but it has to be fetched explicitly using the function dc1394_format7_get_image_position().  You are welcome to call this function yourself, but beware that it may be hard to determine which value corresponds to which frame.  This synchronization is something we cannot really control since it is determined by the camera's firmware.

However, with a Point Grey camera there may be another option.  Download their document entitled "Point Grey Digital Camera Register Reference" from the private portion of their website.  In addition to listing all the standard IIDC registers, there are a few point-grey specific registers named there that may assist you.  Pay particular attention to section 2.13.37 "FRAME_INFO" which discusses how you can embed certain values in the data for each captured frame.  ROI is listed as one such value, however, I am not sure if the Firefly MV firmware supports it.  It is probably best to try it and see.

You can play with the value of FRAME_INFO using these commands:
dc1394_get_adv_control_register(camera, 0x2F8, &value);
dc1394_set_adv_control_register(camera, 0x2F8, value);


On Sun, Jul 4, 2010 at 3:35 PM, Kyle McDonald <kyle@kylemcdonald.net> wrote:

I'm building a system that regularly scans the scene using a short/wide
ROI, and then dynamically tracks a subject within that ROI when it is
identified. I'm using a Firewire grayscale Point Grey Firefly MV.

When I grab a frame using dc1394_capture_dequeue, the frame->position
field always has the values [0, 0] regardless of the ROI. I've tested to
make sure the ROI is actually changing, and I'm visualizing the results
in a basic slit-scan manner.

Is there a known reason the position field would be returning [0, 0]
regardless of the ROI?

I suppose the other option is to maintain some information about the
recent ROI values and timestamp them, then use a timestamp to look up
which value was used for that particular capture...?



This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
Mailing list for libdc1394-devel