loading
 
Shape recognition Giving spurious results
Jon Sutton from United Kingdom  [2 posts]
7 year
It's been a while since I first started experimenting with RR.
Now I'm back at it to create a working application, I'm not able to achieve reliable shape recognition.
I'm trying to recognize aluminium profiles from their end sections.
I'm using a reasonable quality USB camera & Lens. And a source of Red light, this allows me to pick out the aluminium quite nicely. Then processing with: Roberts edge, Smooth Hull, Integrate (4) and border gives me a good looking outline for my profiles.
Creating training images from snaps of these pages is failing to give reliable recognition!
Can anyone suggest what I'm doing wrong/missing?
I have reduced the training images to B&W png's and removed external clutter.

  
Steven Gentner from United States  [1446 posts] 7 year
Jon,

The shape match module assumes a filled white object on black background. Try using the Fill to fill in your parts before matching. I've attached a quick solution that differs a bit from yours to give you other ideas on how to segment those parts and use the shape match to determine a shape comparison.

Note, this will probably *not* work in production since its not clear how the lighting will vary and/or if more than 2 rails are visible at any time. Many more tests on images from the production line will help to isolate a good solution.

STeven.

Test.zip
Jon Sutton from United Kingdom  [2 posts] 7 year
Thanks for that Steven,
I had tried filled shapes as well, but, had the same issue.
I like your method for pulling out highlights as a mask before processing.
Some useful tips there.

Jon

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