Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

VISION- displays picture before threesold

Hi

I have simple problem I quess

 

I `ve got simple basic program e.g grab .vi and in addition there is threshold function. I`d like to displays images gathered from camera before and after threesold function. It seems to work in debug mode only. Flat sequence deosn work either. Maybe refernces have something to do with that but I dont know how 

0 Kudos
Message 1 of 5
(3,075 Views)

I haven't looked at your code.

For this, you must have two images:

(1) for the image as it came from the camera.

(2) a copy that you pass to the threshold function.

Then you can use two Image Displays to show these images.

0 Kudos
Message 2 of 5
(3,072 Views)

If you're like me you're a visual learner, so here's a picture.  (There's also a shipping example in LabVIEW called Threshold Example.vi, but it's not for beginners.)

 

Threshold Example.png

Vision and Motion Enthusiast
Certified LabVIEW Associate Developer
0 Kudos
Message 3 of 5
(3,052 Views)

Almost perfect: Do not call "IMAQ Dispose" as long as you need an image (even in an IMAGE Display indicator). 

As you have not wired an image to "IMAQ Dispose", no image gets disposed.

0 Kudos
Message 4 of 5
(3,045 Views)

GuenterMueller,

 

Good catch!  I want to amend your statement just a bit though.  We should always call IMAQ Dispose any time we call IMAQ Create (once we're done processing of course.)  Otherwise the image reference remains in memory until we quit LabVIEW.  If we want the image to remain in the indicator after the program finishes we have to right click on the indicator and choose Snapshot.  This keeps the current image in the indicator until a new image is sent to it.  You're absolutely correct though that in my example the image reference never actually gets disposed.  We would either have to wire the image reference to the dispose VI, or wire a true constant to the dispose all input.  Thanks for catching this.

Vision and Motion Enthusiast
Certified LabVIEW Associate Developer
0 Kudos
Message 5 of 5
(3,027 Views)