Go to Post Welcome to The 2018 FIRST Robotics Competition: Bureaucracy Bash! - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-02-2012, 02:26
Luiz12 Luiz12 is offline
Registered User
FRC #4210
 
Join Date: Jan 2012
Location: South Gate
Posts: 45
Luiz12 is an unknown quantity at this point
Simple Crosshair

Hi I am a rookie programmer who barely started using labview. I basically finished all my controls including the kinect so I was wondering if it was possible to add a simple + crosshair to the video camera feed. I have the camera directly to the router not cRio. So is there a way I can do this without to much complication.
  #2   Spotlight this post!  
Unread 14-02-2012, 02:59
its da PAT!!!'s Avatar
its da PAT!!! its da PAT!!! is offline
Registered User
AKA: Pat Miller
FRC #0829 (Digital Goats)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2005
Location: indianapolis
Posts: 186
its da PAT!!! has a spectacular aura aboutits da PAT!!! has a spectacular aura aboutits da PAT!!! has a spectacular aura about
Send a message via AIM to its da PAT!!!
Re: Simple Crosshair

The simple way is to place tape on on the screen. When you open the driver user, the drive station will default to the same place every time.
__________________

2012 Boilermaker Engineering Excellence Award
2010 Boilermaker Rockwell Automation Innovation in Control Award
2009 Buckeye J&J Gracious Professionalism Award
2009 Boilermaker J&J Gracious Professionalism Award
2008 Boilermaker J&J Gracious Professionalism Award
2007 St. Louis Regional Champion


  #3   Spotlight this post!  
Unread 14-02-2012, 03:07
Luiz12 Luiz12 is offline
Registered User
FRC #4210
 
Join Date: Jan 2012
Location: South Gate
Posts: 45
Luiz12 is an unknown quantity at this point
Re: Simple Crosshair

Is there a way I can program something..
  #4   Spotlight this post!  
Unread 14-02-2012, 07:54
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,756
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: Simple Crosshair

The first step is to open the Getting Started Window of LabVIEW. It is up when you first launch and it is available from the View menu. Create a project based on the Dashboard template.

When built, that code will create the same thing as the initial installation.

There are a couple ways to add crosshairs. One, go to the panel, right click in open space and choose lines from the decoration palette.Place and size the lines, color them if you need to. You could use rectangles if you wanted thicker lines.

The second approach is to add the lines into the image programmatically. Go to the diagram and find the loop near the top that Reads the MJPG and the next step it does is clear the overlays. Instead, you want to right click on the Clear and choose Replace Overlay and choose the Line function. Copy it and hook up another. Hook up the parameter values to describe the line endpoints and color.

To test it, stop the other dashboard EXE and run your VI using the run arrow. To build it into an EXE, you go to the bottom of the project window, open the Build Specifications, and right click and Build. The resulting dialog will tell you where the EXE was saved. Copy it to the Program Files/FRC Driver Station folder and you are good to go. The DS will launch yours next time it starts up.

Greg McKaskle
  #5   Spotlight this post!  
Unread 14-02-2012, 08:49
ratdude747's Avatar
ratdude747 ratdude747 is offline
Official Scorekeeper
AKA: Larry Bolan
no team
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Madison, IN
Posts: 1,064
ratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond repute
Re: Simple Crosshair

Quote:
Originally Posted by Greg McKaskle View Post
The second approach is to add the lines into the image programmatically. Go to the diagram and find the loop near the top that Reads the MJPG and the next step it does is clear the overlays. Instead, you want to right click on the Clear and choose Replace Overlay and choose the Line function. Copy it and hook up another. Hook up the parameter values to describe the line endpoints and color.

To test it, stop the other dashboard EXE and run your VI using the run arrow. To build it into an EXE, you go to the bottom of the project window, open the Build Specifications, and right click and Build. The resulting dialog will tell you where the EXE was saved. Copy it to the Program Files/FRC Driver Station folder and you are good to go. The DS will launch yours next time it starts up.

Greg McKaskle

I did A similar technique last year.

what I did was I used the "draw rectangle" overlay block twice, one for each crosshair. I did it this way so I could adjust the thickness...

It also was linked to the tilt servo position so it would automatically rotate the image when the camera passed 90 degrees... it also changed the crosshairs to a set of parallel lines that could be used to line up with the minibot pole.
__________________
Dean's List Semi-finalist 2010
1747 Harrison Boiler Robotics 2008-2010, 2783 Engineers of Tomorrow 2011, Event Volunteer 2012-current

DISCLAIMER: Any opinions/comments posted are solely my personal opinion and does not reflect the views/opinions of FIRST, IndianaFIRST, or any other organization.
  #6   Spotlight this post!  
Unread 14-02-2012, 08:56
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,173
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Simple Crosshair

You know the Kinect is only used during the first 15 seconds of the match, correct? I apologize if that seems a silly question.

HTH
__________________
Fast, cheap or working - pick any two!
  #7   Spotlight this post!  
Unread 14-02-2012, 13:06
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: Simple Crosshair

Quote:
Originally Posted by wireties View Post
You know the Kinect is only used during the first 15 seconds of the match, correct? I apologize if that seems a silly question.
It does seem very silly. I think you posted in the wrong thread.
  #8   Spotlight this post!  
Unread 14-02-2012, 19:08
hsekhon27 hsekhon27 is offline
Registered User
FRC #0280 (TNT)
Team Role: Programmer
 
Join Date: Dec 2011
Rookie Year: 2011
Location: Taylor, MI
Posts: 23
hsekhon27 is an unknown quantity at this point
Re: Simple Crosshair

Quote:
Originally Posted by Greg McKaskle View Post
The first step is to open the Getting Started Window of LabVIEW. It is up when you first launch and it is available from the View menu. Create a project based on the Dashboard template.

When built, that code will create the same thing as the initial installation.

There are a couple ways to add crosshairs. One, go to the panel, right click in open space and choose lines from the decoration palette.Place and size the lines, color them if you need to. You could use rectangles if you wanted thicker lines.

Greg McKaskle
After I create a dashboard project, how do I deploy it?
  #9   Spotlight this post!  
Unread 14-02-2012, 19:34
Rogue Leader Rogue Leader is offline
Registered User
FRC #0696 (Circuit Breakers)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Glendale, CA
Posts: 78
Rogue Leader is an unknown quantity at this point
Re: Simple Crosshair

Quote:
Originally Posted by hsekhon27 View Post
After I create a dashboard project, how do I deploy it?
If I'm correct, you would open a program called the "FRC Driver's Station" once your computer is connected to the robot, Once that's open you would also launch a separate program called "FRC Dashboard," although I think the Driver's Station would open up both.Then launch the cRIO Robot Project, then deploy it (from RobotMain). You need to launch these in order to run the robot, so I hope I helped you in some way.
  #10   Spotlight this post!  
Unread 14-02-2012, 21:01
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,919
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Simple Crosshair

Quote:
Originally Posted by hsekhon27 View Post
After I create a dashboard project, how do I deploy it?
From the Project Explorer window
Build Specifications -> FRC PC Dashboard right-click and choose Build
It's going to put the new Dashboard in the project folder under builds. Something like:
My Documents\LabVIEW Data\builds\FRC Dashboard Project\FRC PC Dashboard
You can test it by running it from there, but for competition it'll need to get copied to the folder C:\Program File\FRC Dashboard

There are several common variations:
  1. You can change the Destination Directory under Properties for the build specification. That will automatically put your Dashboard in the FRC Dashboard folder.
  2. You can change where the Driver Station looks for the Dashboard program. That's defined in an ASCII file located at: C:\Users\Public\Documents\FRC\FRC DS Data Storage.ini (shouldn't be edited while the Driver Station app is running).
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 14-02-2012 at 21:51.
  #11   Spotlight this post!  
Unread 14-02-2012, 21:28
MAldridge's Avatar
MAldridge MAldridge is offline
Lead Programmer
AKA: Rube #1
FRC #0418 (LASA Robotics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Austin
Posts: 117
MAldridge will become famous soon enoughMAldridge will become famous soon enough
Re: Simple Crosshair

assuming you do dev on a separate computer, you just need to copy the three files that the build will spit out into the dashboard folder on your driver station.

If memory servers, its just in the x86 programs folder.
__________________
'Why are you a programer?' --Team Captain
'Because the robot isn't complicated enough!' --Me
  #12   Spotlight this post!  
Unread 14-02-2012, 22:58
hsekhon27 hsekhon27 is offline
Registered User
FRC #0280 (TNT)
Team Role: Programmer
 
Join Date: Dec 2011
Rookie Year: 2011
Location: Taylor, MI
Posts: 23
hsekhon27 is an unknown quantity at this point
Re: Simple Crosshair

Thank you!!
  #13   Spotlight this post!  
Unread 22-02-2012, 23:07
Gary Bonner Gary Bonner is offline
Registered User
FRC #3974
 
Join Date: Jan 2002
Rookie Year: 2000
Location: PA
Posts: 120
Gary Bonner has a spectacular aura aboutGary Bonner has a spectacular aura about
Re: Simple Crosshair

Is there a way to disable the snap-to-grid when drawing lines on the panel?
  #14   Spotlight this post!  
Unread 23-02-2012, 08: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,756
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: Simple Crosshair

Hit the <g> key to toggle it

Greg McKaskle
  #15   Spotlight this post!  
Unread 23-02-2012, 11:04
CodeMonkey's Avatar
CodeMonkey CodeMonkey is offline
Self Proclaimed Ruler of Universe
AKA: Omar Issa Attar
FRC #0599 (Robodox)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Los Angeles, CA
Posts: 20
CodeMonkey is an unknown quantity at this point
Re: Simple Crosshair

Quote:
Originally Posted by ratdude747 View Post
I did A similar technique last year.

what I did was I used the "draw rectangle" overlay block twice, one for each crosshair. I did it this way so I could adjust the thickness...

It also was linked to the tilt servo position so it would automatically rotate the image when the camera passed 90 degrees... it also changed the crosshairs to a set of parallel lines that could be used to line up with the minibot pole.
I was wondering, how did you get the lines to change from crosshairs to parallel.
__________________
Closed Thread


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 14:28.

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