Go to Post In FIRST, success = inspiration. - Daniel Brim [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 06-02-2012, 09:43
iblis432 iblis432 is offline
Co Captain/Chief Programmer
AKA: Bobby
FRC #2106 (Junkyard Dogs)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Virginia
Posts: 146
iblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to behold
modifying the camera image on the dashboard

I was successful in integrating the vision code from the example into the robot code and all works well on that end, but I am having trouble supplying that data to the dashboard. I am trying to send the image of that black and red screen that appears when looking at the rectangle, along with the overlay. My preference would be to have an unchanged image next to the modified image.

My first try was to simply send the image through "Set User Data High" but it returned a blank image on the dashboard.

Next I tried copying the code from the vision processing vi into my dashboard code, hoping I could just have the computer process the square locations and build the new image, but again the image remained blank.

I can post the code this evening. Does anyone know how I can get what I am looking for?
__________________
"Don't worry, programming can fix it"
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2012, 12:27
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: modifying the camera image on the dashboard

Quote:
Originally Posted by iblis432 View Post
My first try was to simply send the image through "Set User Data High" but it returned a blank image on the dashboard.

Next I tried copying the code from the vision processing vi into my dashboard code, hoping I could just have the computer process the square locations and build the new image, but again the image remained blank.
Is it a blank white, or a blank black? The red/black processed version is a binary image, and if you try to display that without selecting the binary palette for the indicator it will be presented as black and slightly less black. If that's your problem, you can fix it by changing the palette for the image indicator.
Reply With Quote
  #3   Spotlight this post!  
Unread 06-02-2012, 16:45
iblis432 iblis432 is offline
Co Captain/Chief Programmer
AKA: Bobby
FRC #2106 (Junkyard Dogs)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Virginia
Posts: 146
iblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to behold
Re: modifying the camera image on the dashboard

Thanks for the help, that was not the issue but I got it working now, although honestly I don't know what's all that different.
__________________
"Don't worry, programming can fix it"
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2012, 18:01
PSHRobotics PSHRobotics is offline
Registered User
FRC #1182
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Missouri
Posts: 38
PSHRobotics is an unknown quantity at this point
Re: modifying the camera image on the dashboard

Could you provide information about how you fixed your problem?
We are able to see the processed image when we run the dashboard out of labview (by pressing the arrow in our edited Dashboard Main vi). However, when we build the Dashbaord.exe we get a plain/gray screen which to us seems like no data is being sent to the Dashboard when we run it as the .exe
Reply With Quote
  #5   Spotlight this post!  
Unread 10-02-2012, 09:10
iblis432 iblis432 is offline
Co Captain/Chief Programmer
AKA: Bobby
FRC #2106 (Junkyard Dogs)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Virginia
Posts: 146
iblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to behold
Re: modifying the camera image on the dashboard

Why certainly, here is a brief description, and either this evening or tomorrow I will upload the code.

Basically I changed what we wanted. I no longer have the two images combined, and instead have the particle overlay going directly onto the camera image.

I copied the part of the vision processing code that creates the overlay (including the scores limiter, this is important), and I pasted it into the dashboard project. I then took the pre-existant vision indicator and connected it to where the overlay's output is. I'm sure that sounds confusing, so I will be sure to give you a copy of the code ASAP
__________________
"Don't worry, programming can fix it"
Reply With Quote
  #6   Spotlight this post!  
Unread 10-02-2012, 19:04
PSHRobotics PSHRobotics is offline
Registered User
FRC #1182
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Missouri
Posts: 38
PSHRobotics is an unknown quantity at this point
Re: modifying the camera image on the dashboard

Quote:
Originally Posted by iblis432 View Post
Why certainly, here is a brief description, and either this evening or tomorrow I will upload the code.

Basically I changed what we wanted. I no longer have the two images combined, and instead have the particle overlay going directly onto the camera image.

I copied the part of the vision processing code that creates the overlay (including the scores limiter, this is important), and I pasted it into the dashboard project. I then took the pre-existant vision indicator and connected it to where the overlay's output is. I'm sure that sounds confusing, so I will be sure to give you a copy of the code ASAP
Actually it makes perfect sense and that is what we were thinking about doing if we could not get a way to see the other image off the dashboard or if that used too much of the crio's processing. Thanks!
Reply With Quote
  #7   Spotlight this post!  
Unread 10-02-2012, 22:28
iblis432 iblis432 is offline
Co Captain/Chief Programmer
AKA: Bobby
FRC #2106 (Junkyard Dogs)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Virginia
Posts: 146
iblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to behold
Re: modifying the camera image on the dashboard

yep : ) basically the image created on the dashboard is not generated by the cRIO, but instead by your computer, having them work in parallel to compute what to do.
__________________
"Don't worry, programming can fix it"
Reply With Quote
  #8   Spotlight this post!  
Unread 11-02-2012, 17:55
CRLS97 CRLS97 is offline
Registered User
FRC #0097
 
Join Date: Jan 2011
Location: Cambridge
Posts: 28
CRLS97 is an unknown quantity at this point
Re: modifying the camera image on the dashboard

Quote:
Originally Posted by iblis432 View Post
yep : ) basically the image created on the dashboard is not generated by the cRIO, but instead by your computer, having them work in parallel to compute what to do.

after having your computer process it, is there a way of sending the data back to the crio so the code running on the crio can use that information to do whatever one programs it to do?
Reply With Quote
  #9   Spotlight this post!  
Unread 11-02-2012, 18:57
iblis432 iblis432 is offline
Co Captain/Chief Programmer
AKA: Bobby
FRC #2106 (Junkyard Dogs)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Virginia
Posts: 146
iblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to behold
Re: modifying the camera image on the dashboard

I do not doubt that there is a way, I just personally do not know how. I have it so both the robot and the computer are doing the same process, I just don't have the lag time of sending processed images to the dashboard
__________________
"Don't worry, programming can fix it"
Reply With Quote
  #10   Spotlight this post!  
Unread 12-02-2012, 11:10
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: modifying the camera image on the dashboard

Quote:
Originally Posted by CRLS97 View Post
after having your computer process it, is there a way of sending the data back to the crio so the code running on the crio can use that information to do whatever one programs it to do?
Here's an example.
Reply With Quote
  #11   Spotlight this post!  
Unread 13-02-2012, 18:46
Ross3098's Avatar
Ross3098 Ross3098 is offline
Programmer
AKA: Colin Ross
FRC #3098 (The Captains)
Team Role: Programmer
 
Join Date: Sep 2011
Rookie Year: 2010
Location: Waterford
Posts: 41
Ross3098 will become famous soon enoughRoss3098 will become famous soon enough
Re: modifying the camera image on the dashboard

We are having a lot of trouble with the dashboard processing as well. We are using THE EXACT SAME CODE as the robot vision processing (Rectangular Target Processing.vi) is and it works on the cRIO with no issues (other than massive lag to other robot systems). We wire the unfiltered feed to the dashboard and it clearly shows in the window.

Our problem is with the IMAQColorThreshold vi. The image leaving the vi is absolutely white. Our parameters are exactly the same as the cRIO processing code and we have no other ideas.

__________________
2012 FRC Championship: 4th pick, Quarterfinalist: Thanks 1507, 51!
2012 Michigan State Championship: 4th Seed, 3rd Alliance Captain, Semifinalist: Thanks 33 and 2137!
2012 Northville District: 3rd Pick, Quarterfinalist. Thanks 302, 4405!
2012 Waterford District: 2nd Pick, Finalist. Thanks 573, 3601!
2011 Waterford District: 8th seed, 1st pick, Semi Finalist. Thanks to 573 and 3770
2011 Ann Arbor District: 2nd seed, Finalist. Thanks to 548 and 247.
2011 Michigan State Championship: Semi Finalist. Thanks to 548 (Again) and 74.
2011 FIRST World Championship: 8th seed, Quarterfinalist. Thanks to 74(Again) and 846.
Reply With Quote
  #12   Spotlight this post!  
Unread 17-02-2012, 14:30
iblis432 iblis432 is offline
Co Captain/Chief Programmer
AKA: Bobby
FRC #2106 (Junkyard Dogs)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Virginia
Posts: 146
iblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to behold
Re: modifying the camera image on the dashboard

In the attached files are both our robot code and our dashboard code. I hope this helps everyone, and sorry for being slow about getting it to you.
Attached Files
File Type: zip 2012 Dashboard Project (2).zip (213.3 KB, 31 views)
File Type: zip system02.zip (2.55 MB, 17 views)
__________________
"Don't worry, programming can fix it"
Reply With Quote
  #13   Spotlight this post!  
Unread 19-02-2012, 08:37
iblis432 iblis432 is offline
Co Captain/Chief Programmer
AKA: Bobby
FRC #2106 (Junkyard Dogs)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Virginia
Posts: 146
iblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to behold
Re: modifying the camera image on the dashboard

well then, I'm assuming this helped everyone and answered their questions?
__________________
"Don't worry, programming can fix it"
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 22:22.

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