View Single Post
  #4   Spotlight this post!  
Unread 30-01-2012, 11:09
gnunes gnunes is offline
Registered User
FRC #1391 (Metal Moose)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Westtown School
Posts: 57
gnunes has a spectacular aura aboutgnunes has a spectacular aura aboutgnunes has a spectacular aura about
Re: Axis Camera Ball Detection

Better: cast the image to HSL (hue, saturation, and luminance) and use the color threshold to select only the pixels that match the ball. The result is a binary image that will be zero everywhere except where the color matches your criteria. Send that image to Particle Report to the the location of the matching regions, as well as other information, like their size, that you can use to determine which objects are balls. The Vision White Paper should be helpful here, although it is mostly about finding the reflective targets above the baskets: https://decibel.ni.com/content/docs/DOC-20173

You may also find this tutorial helpful: https://decibel.ni.com/content/docs/DOC-14726. It's all about picking out specific colored objects in an image. (It uses Vision Assistant, which I don't like, but may be helpful if you are new to image processing. Once you are more experienced, you will probably find it faster to write the code directly.)
Reply With Quote