Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Display processed images on Dashboard? (http://www.chiefdelphi.com/forums/showthread.php?t=127312)

btgdaniel 28-02-2014 11:52

Display processed images on Dashboard?
 
2 Attachment(s)
Here is something I have not been able to get working:

I am using the same Vision Assistant-produced VI (rectangleisolation_OLD) on my Dashboard, as I am in the robot's VisionProcessing.vi. My intent is to see the same images on the Dashboard as I see when probing the output of the VI on the robot.

When probing the output of the VI on the robot, I always set the Palette to binary to see the processed images. I end up seeing RED rectangles that have been isolated for target consideration by another VI (not relevant to this post). It is those RED rectangles that I want to see on the Dashboard.

Here is my code: (see attachment 1)

The "False" case simply passes the unprocessed images through to the "Camera Image" object -- that part works just fine (as it always has) -- I can see what the camera sees.

In the "True" case, I am feeding the same RGB values into the VI on the Dashboard as I am on the robot. And, I have set the "Palette" property of the "Camera Image" object on the Dashboard to binary.

However, the result is always a black screen: (see attachment 2)

Although, I do occasionally see a "flicker" of the unprocessed images.

What am I doing wrong? Has anyone made this work?

Thank you!

Donjoe 28-02-2014 16:23

Re: Display processed images on Dashboard?
 
Just for clarification, are you trying to see the "Masked" display, as shown in the bottom frame of the Target Detection example?

btgdaniel 28-02-2014 17:12

Re: Display processed images on Dashboard?
 
1 Attachment(s)
Yes, as shown in this attachment:

Greg McKaskle 01-03-2014 12:34

Re: Display processed images on Dashboard?
 
I suspect that the flicker is because there is a race between the different operations using the image. Images are references, so the display could be displaying the current image or the processed one depending on when it draws.

To correct this, try creating another image and use that as the destination image. You may also want to read up on how IMAQ uses the source and destination images. It is a bit more complicated than most operation in LV.

Greg McKaskle

btgdaniel 01-03-2014 13:24

Re: Display processed images on Dashboard?
 
Actually, I tried that first - I had two different image displays and so was able to view both the raw images and the processed images simultaneously. The raw images were as expected (I could see what the camera was seeing), while the processed images were always black with the occasional flicker of raw.

I guessed that the Dashboard code was somehow not keeping up and so I wrote the solution already shown, which uses a binary toggle to determine which set of images are displayed. So I think that the code is already doing a minimum of work -- either it displays the raw images or the processed images.

Thanks for the IMAQ tip -- I'll look into it.

Going forward, I guess what I'm looking for at this point is:

1. a sanity check -- is what I'm doing reasonable?
2. someone else's solution to this particular problem.
3. an alternate solution of some sort.

Many thanks!

Greg McKaskle 02-03-2014 08:51

Re: Display processed images on Dashboard?
 
An image display is essentially given the name of the image to display. When the OS gives us a draw message, it will draw the current state of that named image. But of course your imaging loop may be somewhere else and may have put raw data into the image. So you will get a statistical sampling of what is in the image over time -- not necessarily what you wanted, but it uses minimal memory.

If you make more than one named image using Create Image. You can have two names and decide which you write to the display. Your Boolean switch can sometimes send the raw and sometimes send the processed. Since you won't be using one named image for all the processing stages, the statistical display is always what you want.

Another easy thing you can do is to right click on the image display in the code you have and select to Snapshot the image data. This will make a copy of the image data instead of the name. For simple image processing, this tends to work, and I believe is always on in probes.

Greg McKaskle

btgdaniel 02-03-2014 09:09

Re: Display processed images on Dashboard?
 
Many thanks - I'll try that (eventually).


All times are GMT -5. The time now is 08:56.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi