Go to Post Thanks, that clears things up a lot, and should probably have been obvious. - Branden Ghena [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 Rating: Thread Rating: 2 votes, 3.00 average. Display Modes
  #1   Spotlight this post!  
Unread 16-02-2013, 13:50
JTW JTW is offline
Registered User
FRC #4143
 
Join Date: Jan 2013
Location: Metamora
Posts: 4
JTW is an unknown quantity at this point
Cross-hairs and camera image overlay

We are working on the dashboard for LabView and the camera image on it. We are trying to figure out an easy way to overlay an image on the camera section, like a cross-hair. We would like to know the easiest way to overlay a cross-hair on the the image section and to also know if there's a way to add buttons to the dashboard to toggle between different overlaying images (like switch between different kinds of cross-hairs depending on which button is pressed).
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2013, 17:22
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: Cross-hairs and camera image overlay

I would suggest creating your own dashboard project from the Getting Started window. The diagram gets the image and clears any annotations and sends it to the display. Just after clearing the annotation is where you can add your own lines, circles, boxes, text, etc. The icons are in the vision/Utilities/Overlay palette. To select between different ones, use a case statement or subVI and a button or other selector.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 26-02-2013, 21:43
Patrick Levy Patrick Levy is offline
Registered User
FRC #3202
 
Join Date: Jan 2010
Location: Minnesota
Posts: 7
Patrick Levy is an unknown quantity at this point
Re: Cross-hairs and camera image overlay

I am trying to do the exact same thing. Please see attached image of my labview code. I put a couple input boxes on the dashboard front panel so that the cross hair could be adjusted while the program runs.

Should this do what I want? I don't have a cRio to test it on, but when I just run the dashboard program my camera image is just a white screen (I was thinking that I'd at least see the yellow line). What kind of coordinates would place a line across the center of the screen?

Thanks!

Pat Levy
Attached Thumbnails
Click image for larger version

Name:	Adding crosshairs in labview.png
Views:	782
Size:	45.8 KB
ID:	14201  
Reply With Quote
  #4   Spotlight this post!  
Unread 26-02-2013, 22:03
Suitster's Avatar
Suitster Suitster is offline
Registered User
AKA: Ethan Pellittiere
FRC #3951 (SUITS)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Honeoye
Posts: 79
Suitster is on a distinguished road
Re: Cross-hairs and camera image overlay

Quote:
Originally Posted by Patrick Levy View Post
I am trying to do the exact same thing. Please see attached image of my labview code. I put a couple input boxes on the dashboard front panel so that the cross hair could be adjusted while the program runs.

Should this do what I want? I don't have a cRio to test it on, but when I just run the dashboard program my camera image is just a white screen (I was thinking that I'd at least see the yellow line). What kind of coordinates would place a line across the center of the screen?

Thanks!

Pat Levy
While it is certainly possible to embed a line into the actual camera data, and the center would be n/2, where n=number of pixels, it is infinitely easier to create a new dashboard program in the Getting Started Window, and in the front panel for it, create a line with the decorations palette. Place the line over the camera indicator, and change the camera's IP to match the one on your robot.

To make the custom dashboard function as a normal one, build the dashboard, tothe FRC Dashboard folder, probably in C:/Program Files/FRC Dashboard, and overwrite the previous dashboard
__________________
2012 FLR Regional Champs, with 1507 and 191
Reply With Quote
  #5   Spotlight this post!  
Unread 27-02-2013, 07:39
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: Cross-hairs and camera image overlay

The attached code looks like it will draw one line.

As for whether to do it this way with an annotation or as an overlay. If it is dynamic, like putting a rectangle or circle over some element in the image, then it must be programmed by overlays/annotations. If it is just to indicate the center of the image, it can be done the other way, but the overlay is a bit more efficient since you avoid objects overlapping each other. But as you say, the cosmetic is less programming - an icon and a few wires less.

Greg McKaskle
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 08:58.

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