Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Imaqdx Grab in a while loop

Hello,
I have a question. And although I use the Imaqdx Grab.vi in a while loop to get continuously images. I work with a 60 fps firewire camera, so I get about every 17 ms a new image. The Edge Detection Vi requires approximately 2ms  to process the current image. What do Edge Detection in the meantime? Does it work with the old image until a new comes from the camera, or waiting for a new image?

Thanks
0 Kudos
Message 1 of 6
(5,012 Views)
The way you have it wired up, it acquires an image, performs edge detection, and then loops back to wait for the new image to repeat the process.

Is this what you are asking?
Randall Pursley
0 Kudos
Message 2 of 6
(4,997 Views)
Where can I adjust this ?
0 Kudos
Message 3 of 6
(4,981 Views)
I think what you are asking is how to make sure that you acquire at 60 fps by having the edge detection occur in parallel with the acquisition.  Attached is a way to do this.  You create another image ref and copy new data to this one each time you get a new image from the camera, the next time through the loop it will perform the edge detection while a new image is being acquired.  As long as the edge detection takes a shorter time than the image acquisition, you will be fine.  Otherwise, you may need a more complicated architecture.

Is this what you are asking about?



Randall Pursley
Download All
0 Kudos
Message 4 of 6
(4,970 Views)
Thanks for the answer.
In my solution above, I can aquire with 60 fps also, when the edge detection is fast enough or not? I don't need to create another image ref and copy new data?

The IMAQdx Grab.vi waits for a new valid buffer from the IMAQdx Configure Grab when I configured
the driver to get newest valid buffer. right?

But when I configured in Buffer Number Mode Last, the IMAQdx Grab.vi gets the oldest valid buffer and the edge detection works sometimes with the same image, until a new image comes from IMAQdx Configure Grab?

Beko
0 Kudos
Message 5 of 6
(4,948 Views)

In my solution above, I can aquire with 60 fps also, when the edge detection is fast enough or not? I don't need
to create another image ref and copy new data?

That is correct.  Since you are doing IMAQdx Grab it will begin acquiring the next one automatically.


The IMAQdx Grab.vi waits for a new valid buffer from the IMAQdx Configure Grab when I configured
the driver to get newest valid buffer. right?


Yes, there is a Boolean input called 'Wait for Next Buffer' in the IMAQdx Grab.vi that defaults to TRUE.  If you set it to FALSE it would reprocess the last valid buffered image.  But since it is TRUE it waits for a new image.

   
But when I configured in Buffer Number Mode Last, the IMAQdx Grab.vi gets the oldest valid buffer and the edge detection works sometimes with the same image, until a new image comes from IMAQdx Configure Grab?

I'm not sure what you are referring to here.  I can't find anything labeled Buffer Number Mode Last.
Randall Pursley
0 Kudos
Message 6 of 6
(4,920 Views)