Go to Post The most successful FIRST sponsor would be the one that put the most HS students into science and engineering programs at colleges and universities. - KenWittlief [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 03-02-2010, 20:20
Imadapocalypse's Avatar
Imadapocalypse Imadapocalypse is offline
The Walking Contradiction
AKA: Bryce Ribucan
FRC #2443 (Blue Thunder)
Team Role: Leadership
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Hawaii
Posts: 40
Imadapocalypse is an unknown quantity at this point
Send a message via AIM to Imadapocalypse
Reticle for camera

Okay so us here at team 2443 have figured out how to make the camera work. We just ran the CircleTrackerDemo and saw that it works just fine. We were wondering how the demo is able to draw on the camera image. The team wants to find a way to make a reticle for manual aiming.
__________________
The needs of the many out-weigh the needs of the few and the one

Reply With Quote
  #2   Spotlight this post!  
Unread 03-02-2010, 21:26
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: Reticle for camera

The functions for drawing into the image are in the IMAQ palette. The code on the cRIO isn't doing the drawing, though, because typically nobody watches the images. Instead, the info from the ellipse detection is shipped back to the dashboard, and the dashboard draws the annotations of the line and ellipses.

If you are using LV, open up your own dashboard template from the Getting Started window, and look at the top loop. It clears the annotations, then draws the lines in a subVI using polygons, and then draws the blue line. There is a whole palette for the shapes including text.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 04-02-2010, 02:28
Imadapocalypse's Avatar
Imadapocalypse Imadapocalypse is offline
The Walking Contradiction
AKA: Bryce Ribucan
FRC #2443 (Blue Thunder)
Team Role: Leadership
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Hawaii
Posts: 40
Imadapocalypse is an unknown quantity at this point
Send a message via AIM to Imadapocalypse
Re: Reticle for camera

you think there may be any possible way to get to it in java?
__________________
The needs of the many out-weigh the needs of the few and the one

Reply With Quote
  #4   Spotlight this post!  
Unread 04-02-2010, 07:21
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: Reticle for camera

If you are writing your dashboard in Java, you have a couple choices.

The images from the cRIO are just a jpeg. There is a small header in front when it comes in the TCP port, but that is easily skipped and is there for identifying future image formats that may be used. So, you can use whatever Java libs you like to display the jpg. Then in the same drawing canvas, use line, circle, or possibly even pixel operations to draw your reticule. I'm not familiar enough with Java libs to help you with the exact drawing commands.

Presumably you are not using Imaq Vision on the dashboard PC, but if you happen to be, the C version of the Imaq libraries also contain the routines to overlay graphics on an image and display the result. I suspect it isn't worth the effort to call those from Java.

Finally, the code is there in LV if you would like to look at it and consider making your dashboard in LV.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 04-02-2010, 08:06
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,766
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Reticle for camera

Quote:
Originally Posted by Imadapocalypse View Post
The team wants to find a way to make a reticle for manual aiming.
If you are thinking of mounting a reticle on the lens, I think you will find that it will out of focus.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Camera For Driving? frenchie4111 Programming 5 28-01-2010 09:26
Java/Netbeans Camera Code for Classmate PC and Axis Camera joshholat Programming 1 23-01-2010 14:59
Camera for turning DustinB_3 Programming 18 17-02-2007 21:00
Connections For Camera Eupher Programming 3 02-02-2005 14:35
Looking for a Digital Camera AJ Quick Chit-Chat 7 02-03-2003 20:16


All times are GMT -5. The time now is 09:39.

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