Go to Post I didn't know that Dean Kamen had 3 arms. - kevin.li.rit [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 23-01-2013, 19:44
Kusha's Avatar
Kusha Kusha is offline
Crimpin' ain't easy
AKA: Kusha Gharahi
no team (Looking for a team)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Dallas, Texas
Posts: 207
Kusha is a jewel in the roughKusha is a jewel in the roughKusha is a jewel in the roughKusha is a jewel in the rough
Drawing on the live camera feed?

How would I go about drawing stuff on the live camera feed on the dashboard?
I'm programming in java.
__________________
“Be the change that you wish to see in the world.”

― Mahatma Gandhi
Reply With Quote
  #2   Spotlight this post!  
Unread 23-01-2013, 20:58
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: Drawing on the live camera feed?

First things first, you have to create a SmartDashboard extension with a class extending WPICameraExtension. From there you have two options: either you can override the processImage() function and use WPIJavaCV or OpenCV functions to draw on the image, or you can override paintComponent() (if you choose the latter route, make sure to call super.paintComponent() in order to actually draw the feed image). The processImage() method is what I prefer, because if you're drawing based off of the information in the image, there's no need to keep that data around for paintComponent(). However, paintComponent() provides the flexibility of the entire Swing drawing API, so it's a matter of what you want to do with it.
__________________
I code stuff.
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 10:09.

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