Loading ...
Sorry, an error occurred while loading the content.

47657Re: [SeattleRobotics] Re: Robomagellan cone color(s) and cmvision

Expand Messages
  • robotMaker
    Feb 23, 2013
    • 0 Attachment
      Orange is a unique color?
          Agreed, meant to be easily seen.

      Not used much in nature perhaps?
          Not in nature but used by people's clothing.

      From: KM6VV <KM6VV@...>
      To: SeattleRobotics@yahoogroups.com
      Sent: Friday, February 22, 2013 12:17 AM
      Subject: Re: [SeattleRobotics] Re: Robomagellan cone color(s) and cmvision

      Hi Will,

      Thanks very much for the tips.  Hadn't heard of BGR.  I did get my cmvision running, but not great results from my first experiments.  I will try to add some of your steps. 

      Orange is a unique color?  Not used much in nature perhaps?

      Thanks and 73!

      Alan  KM6VV

      On 2/21/2013 9:38 PM, Will Smith wrote:
      Hi Alan,
      I use OpenCV for my cone finder implementation. OpenCV is an included component of ROS as well. I demoed it at the SRS meeting last month.
      I wrote the prototype in python but will probably port it over to C++ for easier integration with libv4l (using a webcam.)
      A brief rundown of what I do. Typing on my tablet so please excuse brevity!
      - Acquire frame and perform lens correction. OpenCV uses BGR instead of RGB. Convert to HSV. In my app I display the HSV value at the cursor position. A color picker... in this case I choose cone color. I also have sliders to choose tolerances for the next stage.
      - Using the color and three tolerance bands I call the opencv inRange function. This is a thresholding operation that will isolate the cone(s) color. Note that red wraps around the H axis at 255. I then threshold again to a 1 bit image.
      - Perform a dilation to make unified, measurable blobs.
      - Acquire contours. Throw out anything too small or large for expected range. I also check center of mass for the contour to isolate cone shape, along with size ratio checks.
      - measure blob height and calculate estimated range.
      Hope that helps. This method is pretty robust and flexible, thanks to the cone's unique color!

    • Show all 15 messages in this topic