07-06-2010 12:51 PM - edited 07-06-2010 12:54 PM
Hello, I've been using IMAQ Count objects and works good, but when I use a while loop and I want to modify the image which i'm analyzing to see the results instantly, the search area and the locations of the objects remains in the image even if I return to the original values (for example in Threshold), the location objects and the green rectangle remains there like in the next image:
This is the block diagram I'm using:
I've used this same configuration with the IMAQ 3D View and it works good, I can change values and the 3D view changes while I do it.
Am I using inappropriately the IMAQ Dispose?
Thank you so much for your helps and comments.
Bebin
Solved! Go to Solution.
07-08-2010 12:26 PM
It's suposed that the green lines on the image should disappear when I rotate the image as many of the red points (location objects). I haven't saw any posted message with a similar trouble.
Any help or comment will be appreciated.
Bebin
07-09-2010 01:58 AM - edited 07-09-2010 02:00 AM
The problem is due to the way IMAQ Vision works : the image wire contains a reference (handle) to the image, not the image itself. Means that once an image has been modified somewhere, the mods are propagated everywhere.
The solution is simple : Just add an IMAQ clear Overlay immediately upon entering the while loop (and add a small temporisation inside the loop).
See the attached vi as example.
07-12-2010 01:32 PM
Hi Chilly Charly, thanks for your comment. I did what you suggest, but now the objects location and the search area flashes (blink, wink). I send the image of the VI I made.
Is this a expected behaviour at using the IMAQ Clear Overlay and IMAQ Count Objects?
I attach the VI, it's called opening.vi
Thanks for your help.
07-12-2010 03:29 PM
bebin a écrit :
Hi Chilly Charly, thanks for your comment. I did what you suggest, but now the objects location and the search area flashes (blink, wink).
Is this a expected behaviour at using the IMAQ Clear Overlay and IMAQ Count Objects?
I think it is.
You could use an event structure to run the IMAQ vi's only after detection of change in the settings. Or embed both vis in a case structure, using a shift register to detect a change in the settings...
07-12-2010 03:42 PM
Hi Chilly Charly, I have obtained what i needed with your first suggestion. I only changed the image display to the Image out of IMAQ Count Objects and moved the Image In of the IMAQ Light Meter just like the next image. Really thank you, i'm begginer with labview and i discover new ways and tricks to work with it.
Bebin
11-20-2019 10:36 PM
con conteo de tapas por webcam