Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

reuse the image

I am using LabVIEW with vision tool box (IMAQ). I have to acquire a single image and process it. I have to do repeat those procedures so I use the while loop. The problem is that it gets very slow when running the code because "IMAQ create" VI has to run in every iteration to create an image. I can not bring "IMAQ create" out of while loop either because it doesn't work. I also tried using shift register to feedback the image from the previous loop, but it didn't work. Is there any way to reuse the image obtained from the previous while loop iteration?
0 Kudos
Message 1 of 3
(3,216 Views)
In general you do not want to have IMAQ Create in the acquisition loop. If you need to store multiple images in memory, then you should call IMAQ Create once for each unique image you want to keep, before the acquisition starts. Each instance of IMAQ Create must have a unique image name. In this case you will want to use a ring acquisition. Take a look at the LL Ring examples in the LabVIEW examples directory. I have also attached an example below that does a ring acquisition, displays the current image, and displays the difference between the current and previous images.

I have used a shift register to keep track of previous images. This technique will only work if you have setup multiple image buffers, since the image* data type stored in the shift register
is just a reference to an image buffer and not the actual image data.

Regards,

Brent Runnels
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,216 Views)
I can not run your example because I've got LabVIEW 6.0.2. Do you have the example that i can run with LabVIEW 6.0.2?
0 Kudos
Message 3 of 3
(3,216 Views)