Go to Post I think with 1114 & 217 as our partners we could have won with my refrigerator on the field. - JVN [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-02-2014, 11:52
btgdaniel's Avatar
btgdaniel btgdaniel is offline
Registered User
FRC #1731 (Fresta Valley Robotics)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Warrenton, VA
Posts: 20
btgdaniel is an unknown quantity at this point
Display processed images on Dashboard?

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!
Attached Thumbnails
Click image for larger version

Name:	dashboard_debug1.png
Views:	41
Size:	32.5 KB
ID:	16415  Click image for larger version

Name:	dashboard_debug2.png
Views:	20
Size:	21.5 KB
ID:	16416  
__________________
Team 1731
Fresta Valley Robotics

Catch the FeVeR ~ If You Can!
Reply With Quote
  #2   Spotlight this post!  
Unread 28-02-2014, 16:23
Donjoe's Avatar
Donjoe Donjoe is offline
Registered User
FRC #1610
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Franklin, VA
Posts: 3
Donjoe is an unknown quantity at this point
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?
Reply With Quote
  #3   Spotlight this post!  
Unread 28-02-2014, 17:12
btgdaniel's Avatar
btgdaniel btgdaniel is offline
Registered User
FRC #1731 (Fresta Valley Robotics)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Warrenton, VA
Posts: 20
btgdaniel is an unknown quantity at this point
Re: Display processed images on Dashboard?

Yes, as shown in this attachment:
Attached Thumbnails
Click image for larger version

Name:	masked_display.png
Views:	6
Size:	1.8 KB
ID:	16417  
__________________
Team 1731
Fresta Valley Robotics

Catch the FeVeR ~ If You Can!
Reply With Quote
  #4   Spotlight this post!  
Unread 01-03-2014, 12:34
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #5   Spotlight this post!  
Unread 01-03-2014, 13:24
btgdaniel's Avatar
btgdaniel btgdaniel is offline
Registered User
FRC #1731 (Fresta Valley Robotics)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Warrenton, VA
Posts: 20
btgdaniel is an unknown quantity at this point
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!
__________________
Team 1731
Fresta Valley Robotics

Catch the FeVeR ~ If You Can!
Reply With Quote
  #6   Spotlight this post!  
Unread 02-03-2014, 08:51
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #7   Spotlight this post!  
Unread 02-03-2014, 09:09
btgdaniel's Avatar
btgdaniel btgdaniel is offline
Registered User
FRC #1731 (Fresta Valley Robotics)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Warrenton, VA
Posts: 20
btgdaniel is an unknown quantity at this point
Re: Display processed images on Dashboard?

Many thanks - I'll try that (eventually).
__________________
Team 1731
Fresta Valley Robotics

Catch the FeVeR ~ If You Can!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:26.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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