Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I know if I have acquired an odd or an even field when grabbing from a video camera in field mode?

I want to track an object with a video camera faster than 30Hz so I have switched to field mode (60Hz NTSC). The problem I am having is that the vertical offset between odd and even fields causes the position of a stationary object to move up and down by the 1 pixel offset. I could compensate for this if I could tell whether the image I am currently processing is an odd or even field but I don�t know how to do this. If I could be sure that I was acquiring every field then I could just use the loop count but since I occasionally drop fields due to system recourse limitations I lose track. I have been looking for an attribute or property node which I can call to identif
y the current field but cannot find one. (I am using a P4 2.66Ghz PC, IMAQ PCI-1411, LabVIEW 7, Vision 7.01, NI-IMAQ 2.60.0, and Windows XP Pro.)
0 Kudos
Message 1 of 2
(2,938 Views)
I am pretty sure that information is not available. Since the video card basically ignores the vertical sync signal and just sends you every frame, I don't think it pays attention to which frame is which.

What I would consider is acquiring to a multiple image buffer in continuous mode. You would need to use an even number of images in the buffer. You can check IMAQ status to find out what the last buffer completed is and use that image next. Odd and even fields will stay in odd and even image indices. The only problem is that you won't know which is which unless you have a way to determine that. However, once you have determined which fields are odd, they won't change during that acquisition.

Figuring out which field is odd could be a challenge.
One thing I can think of right now is snapping a full frame image before starting your acquisition. You could separate the odd and even field from your full frame, then compare each with a single image from your buffer. I would assume one would match significantly better than the other. This would work best with a static background.

Another option is changing to a digital camera that can acquire full frames at high frame rates. Right now I am working on a project that uses a Basler A602f to acquire 100 fps at 640x480 and tracks the motion without missing any frames.

Bruce
Bruce Ammons
Ammons Engineering
Message 2 of 2
(2,938 Views)