Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Does IMAQ Grab Acquire skip frames?

I am using LabView 6.1 and (I believe) the most recent version of Vision. I am running a while loop that uses IMAQ Grab Acquire to pull an image off of a camera. I then pass that image into IMAQ WinDraw and then (through queues and into another loop) to IMAQ Cast Image and IMAQ Subtract.

Up to one half of the time, no image is returned, even when I toggle the Immediate value and fluctuate the time delay in the loop. Is there something about IMAQ Grab Acquire that I am missing? Any help would be appreciated.

In case it helps, the errors from IMAQ Cast Image and IMAQ Subtract were -1074396120 "Not an image" and -1074396154 "Image not large enough", respectively.

Thanks.
0 Kudos
Message 1 of 3
(3,992 Views)
It sounds like you are making a common mistake that is seen when working with IMAQ images. The image that you are passing around your diagram is actually a pointer to all the information about the image, not the image itself. When you make a copy of the pointer, it still points to the same location. This location is probably being reused by IMAQ Grab to obtain another image. If it is in the process of grabbing the new image, the image is probably undefined.

The solution would be to copy the image to another buffer using IMAQ Copy, and use that buffer in other places in your program.

Bruce
Bruce Ammons
Ammons Engineering
Message 2 of 3
(3,988 Views)
Dear Bruce Ammons:
I have the same problems of the error 1074396120 from IMAQ Cast image. I have been trying to solve the problem for several days, but got no results. Today I tried your solution. It works fine.
 
You are so great!
 
Cheers
 
Jing
0 Kudos
Message 3 of 3
(3,727 Views)