Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to tranfer image by using local variable

Hi Every one

In my simple example, I have 2 two while loop.

I want to asquistion Image in a loop and tranfer image to another.

So, I used local Variable to do that. But It tranfer first image, not continuous image. ( I record video by webcam)

How can I Fix it?

error.png

here my error: https://www.youtube.com/watch?v=FLFPd6XngjI&feature=youtu.be

 

0 Kudos
Message 1 of 4
(4,435 Views)

Imaq image datatype is only a pointer to your image.

Your code will not work, you have to copy your image data to another image before processing it in the second loop.

Have a look to producer/consumer architecture first : http://www.ni.com/white-paper/3023/en/  and here is a post about this method applied to image acquisition : http://forums.ni.com/t5/LabVIEW/producer-consumer-of-images/td-p/1086138

 

Regards

Message 2 of 4
(4,412 Views)

thank for supporting

But when I press Stop Button, I have received an error : IMAQ Vision: Not An Image. And it has addressed to IMAQ Copy Function in Vision Assistant

If I put Vission assistant and Aquistion into a while loop and not use Producer/comsumer, this error will not appear.

How can I fix it?

error.png

 

You can see more details in follow link: https://www.youtube.com/watch?v=i6FOQ2jypXc&feature=youtu.be

0 Kudos
Message 3 of 4
(4,401 Views)

This error is linked to the way you stop the second loop.

The image buffer wich is created by the Vision Acquisition express VI is deleted before the second loop is stopped. Which causes the vision assistant vi to receive an empty buffer.

I suggest that you wait for the second loop to be fully stopped before deleting the first image buffer. You can do this easily by wiring the error cluster from the second loop to the input of the IMAQ close function (with a merge error)

I cannot open you vi easily as I don't have LV 2014 installed on this machine.

Regards

0 Kudos
Message 4 of 4
(4,383 Views)