Ask Your Question

Revision history [back]

How to find top piece in a pile

I'm searching for this part in an image like this. I need to find the topmost part (the one that is unobscured) so I can pick it up with a suction cup. I have put together an explanation of what I have tried on a web page HERE.

Basically, I have tried feature detection, description and matching, with no success. I found the topmost part successfully by rotating the image 359 times and using matchTemplate on each rotation. Very accurate, but VERY slow.

Can someone recommend an algorithm that can accurately and quickly (< 10 secs) locate the top part?