Skip to content

Ideas and Experiments

James Ward edited this page Sep 11, 2013 · 6 revisions

Here are some things to try:

Masking

At the moment we are just separating out the three channels. But, of course, a white surface has a large green component. We only want stuff with green only/predominantly.
One way to do this would be to use a mask. It's much easier to find green in an HSV image. To do this you would:

  • Convert to HSV. Our captured image is BGR. So use cv.cvtColor(frame, cv.cv.CV_BGR2HSV)
  • Select min and max HSV values to mask over (look it up!). mask = cv.inRange(hsv, min, max)
  • green_img = cv.split(frame)[1]
  • Mask the green image. masked_green = green_img & mask

Pole detection

Have a go at using the object identification routines to pick out the pole. That way all of your LED recognition routines only need to run on that part of the image. Much more reliable that way. Some things that could work:

  • Corner detection.
  • Edge detection.
  • Image recognition -> decorate the pole with a certain pattern that we then get OpenCV to find.
  • Colour recognition. Similar to the method above, but do it for a different colour (eg a red pole).
Clone this wiki locally