Go to Post Sounds more like competition for Kentucky Fried Chicken - "I'll have the 3-piece dinner, a Winglet and two thighs..." - Dick Linn [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,752
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,170
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 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.
__________________
  #9   Spotlight this post!  
Unread 08-03-2012, 23:14
techkid86's Avatar
techkid86 techkid86 is offline
Magic Programer
FRC #3044 (0xBE4)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: ballston spa
Posts: 58
techkid86 is an unknown quantity at this point
Re: Simple Crosshair

i would like to use the drawrect function, but i am unsure where it is. i found a drawrect int value under constants for squawk, but i am not sure how it helps.
__________________
"you can build a perfect machine out of imperfect parts" -Urza
  #10   Spotlight this post!  
Unread 09-03-2012, 22:55
dvanvoorst dvanvoorst is offline
Registered User
FRC #2771 (Code Red)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Grand Rapids, MI
Posts: 61
dvanvoorst is an unknown quantity at this point
Re: Simple Crosshair

I'm feeling really stupid, but where do I find the option to draw the rectangles. I have the Dashboard Main.vi Front Panel open, and I right-click in an open area and i get a Controls pop-up, but I don't see any drawing tools there or anywhere else.
I haven't used Labview at all - but we'd really like crosshairs!
Thanks for any help you may be able to give me.
Dale
  #11   Spotlight this post!  
Unread 10-03-2012, 07: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,752
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

If you are on the panel, you will find the rectangle and lines in the decoration palette. If you are running on a pretty fast computer, this will be fine, but a more efficient method is available if programmed on the diagram. Give the decoration a try and post again if this isn't fast enough.

Greg Mckaskle
  #12   Spotlight this post!  
Unread 10-03-2012, 07:52
dvanvoorst dvanvoorst is offline
Registered User
FRC #2771 (Code Red)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Grand Rapids, MI
Posts: 61
dvanvoorst is an unknown quantity at this point
Re: Simple Crosshair

Hi Greg,
The problem is that I don't see anything called a decoration pallette. The closest thing I found was under Vision, Machine Controls, IMAQ Rectangle. But when I added that it just gave me a box where I could enter a start and end coordinates. I didn't see how I could just draw a box, or show the box that I specified by coordinates.
Remember that this is literally the first time I opened Labview. :-)
You mentioned a speed issue too. Is the "decoration" applied to each frame of the video feed? We'll be running this on the standard Classmate, so that could be an issue.
If I can't get this to work, there is always the rubber bands around the screen option.
Thanks for the time you give to all of us!
Dale
  #13   Spotlight this post!  
Unread 10-03-2012, 14:33
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,752
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

In the upper right of the palette is a search button. Try searching for decoration or rectangle.

Greg Mckaskle
  #14   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?
  #15   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.
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 04:41.

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