Detection of a known Object (By Template)
I need help with Object detection. I habe to detect position of a Fork and a Knife on a Plate. The Plate is on a Tray. The Objects are always the same but the Positions can vary.
I'm wokring with c开发者_运维技巧# and AForge + EmguCV
Can someone help me with this?
Here is a sample pic:
The brightness and color or the knife/fork-pixels are mostly determined by reflection, so I don't think classic template matching would work with this picture.
The knife has almost no corners, so I'm not sure if an interest point-based algorithm like SIFT would work here.
I think the best approach here could be to use an edge detector (Laplace, Sobel, Canny), trace the lines and perform geometric template-matching the way they did it back in the 1980's.
Here's a very good reference for this approach: Object Recognition by Computer
I would go for template matching methods which are looking image gradients. Those approaches are robust to changing lighting conditions.
You can take a look at the fast template matching algorithm implemented in: https://github.com/dajuric/accord-net-extensions
Samples included.
The implemented template matching algorithm is based on orientation of gradients, which are very resilient to changing lighting condition. In order to detect your object, a template must be made (e.g. in Paint) and then rescaled.
精彩评论