|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Adding crosshairs to camera image
Quote:
The default dashboard camera display also has to be modified to read directly from the camera if your programmer has not already done so. This thread has details on how to do that as well as some general information on custom dashboards. |
|
#2
|
|||||
|
|||||
|
Re: Adding crosshairs to camera image
Flip the image on the camera or in the Dashboard.
For a crosshair you might find a multi-line or oval overlay easier than a bitmap. Vision Motion->Vision Utilities->OverlayI've also done a crosshair just by drawing it on the Dashboard front panel itself and dragging it on top of the camera output. No computational work required that way. Attached is a Dashboard overlay example from last year's default framework. Last edited by Mark McLeod : 16-04-2011 at 22:22. |
|
#3
|
|||
|
|||
|
Re: Adding crosshairs to camera image
As a mechanical way to do what you want, I saw one team had placed a pointer stick on their robot, between the camera and the pole. As you're watching the image, line up the stick with the pole and you're golden. I thought it was rather clever.
|
|
#4
|
|||
|
|||
|
Re: Adding crosshairs to camera image
Camera looked through a piece of polycarbonate with strips of electrical tape indicating left and right limits of the compliance of the minibot deployment mechanism. If robot was touching the base and pole was between the markers, deployment was successful every time.
|
|
#5
|
|||
|
|||
|
Re: Adding crosshairs to camera image
I was going to mention. As a last ditch MacGyver, a rubber band around the monitor makes a decent horizontal crosshair.
But being a SW guy, this also isn't hard to do the right way. The game code for last year included some overlay code that drew a light blue line vertically on the center of the screen and some ovals on the target. You can use it as an example. The code in the loop marked the various ellipses, and the single icon on the right drew the line. The icon on the far left returns the image sizes, or you can use constants if the image size is well known. Add this to the dashboard code as was done in 2010. Greg McKaskle Last edited by Greg McKaskle : 17-04-2011 at 08:34. Reason: More detail |
|
#6
|
||||
|
||||
|
Re: Adding crosshairs to camera image
got it.
what i did is I added the servo postion to the dashboard typedef and then made a custom dashboard (I have done this a few times before). I then discived all of the NI vision (as opposed to FIRST vision) stuff... and I have it so: it overlays 2 rectangles on the image for each line of the crosshair (1 px seemed too thin...) and has a case structure that flips the image 180 degrees when the servo angle reaches a certain point (i put in 110 degrees). sound good? Last edited by ratdude747 : 17-04-2011 at 21:15. |
|
#7
|
|||
|
|||
|
Re: Adding crosshairs to camera image
If it looks good, it sounds good.
Greg McKaskle |
|
#8
|
||||
|
||||
|
Re: Adding crosshairs to camera image
i modded it so the crosshairs change when flipped over... the code will be tested and dialed in tonight.
|
|
#9
|
||||
|
||||
|
Re: Adding crosshairs to camera image
some minor tweaks and it works great now. life is good.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|