|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |