Go to Post Teamwork gracious professionalism robots = FIRST Robotics - Bcahn836 [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 16-01-2011, 23:31
mika.perlin mika.perlin is offline
Registered User
FRC #0955
 
Join Date: Jan 2010
Location: Corvallis, OR
Posts: 17
mika.perlin is an unknown quantity at this point
Camera tracking

In the process of tracking pegs with the camera with code I make (for obvious reasons) a binary image out of the camera image. The function to do that takes six integer inputs (min/max for three values depending on whether you're making an HSL, HSV, HSI, or RBG image). This is all fine, but look where I may I can't find the domain for these inputs. Anybody have any idea?
We're programming in Java (though it should be the same for C++) and I'm looking at threshold functions in the the wpilibj here: http://www.wbrobotics.com/javadoc/ed...olorImage.html

I'm making the binary image based off of HSL, so I can guess a domain of 0-360 for hue (if you wikipedia HSL you'll see why), but there's no intuitive domain for the other two values, especially as they are integers (if they were doubles or floats maybe I'd guess 0-1).

On a side note, does anybody know how to make the classmate display a live binary image instead of the normal camera image?
  #2   Spotlight this post!  
Unread 16-01-2011, 23:37
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: Camera tracking

Here's a video for 319s camera tracker.

http://www.screencast.com/users/mtid...1-d21e94c1c2b2

and here are the settings:

resolution 160x120
brightness 10
compression 0
color 50

threshold : 60,80,0,10,220,255

note there is only one color where the old code was built for 2

also the target layout with a dot on the peg and a strip above and beneath caused some issues with false positives for me.

If you want any other info just ask
__________________
"Never let your schooling interfere with your education" -Mark Twain
  #3   Spotlight this post!  
Unread 17-01-2011, 03:05
mika.perlin mika.perlin is offline
Registered User
FRC #0955
 
Join Date: Jan 2010
Location: Corvallis, OR
Posts: 17
mika.perlin is an unknown quantity at this point
Re: Camera tracking

Thanks.
I'm assuming then the domains are 0-255?

Also, I'm entirely new to image processing (I sorta taught myself a bit just today, and I'm working with what I know to write my code), and I was wondering how to get the camera identify the pegs with the rectangular strips above and below the peg as part of the peg as well. Right now my code would (hopefully; not yet tested) track just the peg in the middle. I feel like tracking the strips above and below the peg would be useful for zeroing in on the peg more precisely.

Do I have to separately identify the rectangles below and above and check their x position on the image relative to the peg reflector? I'm sort of starting to get ideas how to do this as I type, but any help would be greatly appreciated.
  #4   Spotlight this post!  
Unread 17-01-2011, 07:59
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: Camera tracking

For the most part, the Java imaging stuff are wrappers around the IMAQ libraries. The best manual for getting an overview of vision is the Vision Concepts manual. The best reference manual for you would be the C or CVI function reference manual. I'd assume the manuals are available in National Instruments/Vision/Documentation or something similar.

Also, you may find it useful to read the tutorial on http://decibel.ni.com/content/commun...#/?tagSet=1001 about vision targets.

Greg McKaskle
  #5   Spotlight this post!  
Unread 17-01-2011, 10:07
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: Camera tracking

Thanks Greg!

This stuff is awesome. It's a shame that all the documentation for FRC is scattered all over the web. I assume many teams will miss great, time saving docs like this.
__________________
"Never let your schooling interfere with your education" -Mark Twain
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 10: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