Go to Post I'd rather have our robot not fall over. - Andy Baker [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 13-02-2010, 14:50
Drucifur Drucifur is offline
Registered User
FRC #0614
 
Join Date: Feb 2010
Location: Virginia
Posts: 4
Drucifur is an unknown quantity at this point
Creating a Binary Image for Autonomous

Does anybody know what the RGB values of the carpet will be at competition? I need to set them for imaqColorThreshold() as part of the autonomous ball tracking mode.

Thanks, and, if anybody knows where I can find some documentation on the National Instruments particle analysis, please pass it on.

Thanks again,
Drew
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2010, 18:31
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: Creating a Binary Image for Autonomous

More important than the RGB of the competition carpet is the carpet you'll test against, and the process you use to calibrate to a carpet sample.

What I'd recommend is to see if you can get it to work using the gray carpet commonly used in the past. If you can get it to work using just the luminance plane and mono thresholding, it will be faster anyway.

Later, try a piece of blue or green office carpet. If you can pretty quickly and reliably get it to work on different colors, you are set.

As for how I'd measure the color content, my favorite is to open the Vision Assistant, connect the camera directly to the PC, PC IP of 192..., and you should be able to snap Capture pictures directly into Vision Asst. Next, use the Extract Plane to do the luminance, followed by a threshold block. If you want to do color, just use a color threshold.

With whatever threshold you are using, select a piece of carpet in the image by dragging a rectangle over it. If you capture some other stuff in the rect, redraw it. The graphs in the configuration window will show you the color values inside your rectangle. Typically, you'd drag the sliders to one side and the other in order to configure the threshold. This may be useful to fine tune so you can determine how much shadow or other stuff you want to filter out. This also lets you experiment with RGB and HSL color modes and compare them to the luminance.

Finally, take the numbers and approach to the code and use the upper and lower numbers for your threshold. By doing this a few times under different lighting, you should be able to calibrate to almost any solid colored flooring quite easily, and then you'll be able to get numbers you can share with any other team who asks.

Also, if you are doing color based thresholding, be sure to change the white balance on the camera from auto to something else. It doesn't mater too much which you use as long as you are consistent, and again, Vision Asst is the fastest way to compare the camera settings to see which gives you the best threshold.

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for help with creating a timer. stuffssguy Programming 7 16-02-2008 22:09
Binary Driving Ryank Programming 2 16-01-2008 18:17
How to write image data to binary PGM file format(P5)? tommy_chai Programming 0 08-10-2007 08:22
binary in C sciguy125 Programming 9 13-11-2005 22:12
Image Discuss: autonomous mode destruction CD47-Bot Extra Discussion 5 15-02-2003 22:59


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

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