-
Notifications
You must be signed in to change notification settings - Fork 1
Ideas and Experiments
James Ward edited this page Sep 11, 2013
·
6 revisions
Here are some things to try:
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
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).