shape matching a gear
11 years

Is it possible to shape match the gear object as attached (with holes in the body)? I tried setting up with Threshold and Shape Match module, putting the gear on top of a black cloth. When I run it, the red box does not surround the gear, but appears only 2 red edges on the left and bottom edge of the 320x240 window.  What else do I need to do to fix it?


Anonymous 11 years
Yes, this should be possible. One issue we noticed was in the image you are matching to there are small black specs in the image which may throw off the matching. You can use the blob fill set to a small size to fill those holes before matching.

If you can post the image that you are trying to match to we can test the entire sequence and send back a configured robofile that should do the trick.

shape matching a gear
11 years
Dear STeven,

I had cleaned up the image for matching, as shown in gear1.gif, pls comment if this is ok.
1.jpg is the image as seen from webcam
2.jpg is the image as seen after the Threshold
3.jpg is the image as seen after fill module to remove small holes
4.jpg is the image as seen in the shape matching

The red lines of the matching box appear on the left and bottom of the 320x240 screen only, not surrounding the gear, not sure why.

I can see there are something sticking out from the gear teeth, they appears randomly, will it help to improve the matching if they are eliminated, and how to eliminate them?

The confidence level in matching sometimes drops below 50%, average around 70%.


Anonymous 11 years
Ok, thanks for the images and robofile. That really helps us understand what issues you are having.

If you download the latest version (just uploaded) we have fixed a couple things that will draw the red square more accurately and fixed the final view to not mangle the object (some of the inner holes were causing an issue).

We tested the provided images and robofile and if you change the threshold to 82 (to eliminate some of the spurious pixels on the end of the gears) you get about a 70% match.

Note that you can do other things to remove unwanted pixels. If the change in threshold does not work have a look at the Blobs->Smooth Hull at the default setting of 2 will increase the match to 76%.

Nevertheless, the Shape matching is very sensitive to shape ... anything above a 20% match is probably ok to work with.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index