That's making sense. The video shows the high-pass using something like a Canny edge detector. He mentions that he's adding up pixels in the video and the resultant is the bottom graphs with peaks and valleys. I think this might be faster than detecting the lines that form the part edge using something like a Hough transform and then calculating slope:
Hough
However, Nisma stated this method took a few 100 ms but the histogram method took tens of milliseconds (whatever that algorithm is?).
I'm kind of lazy and hoping someone can just contribute some code snippets since I'm new to vision. It's fun stuff but someone could figure this out 10 times faster than me.
Thanks for the response. Sounds like you use a real PNP so I may ask you about the interface software as I develop one in Visual C#.
Right now I'll probably just focus on hardware provisions with a top and bottom camera so I can continue writing a generic interface using Visual C# (which I'm also learning). The code will be open source so experts out there can easily contribute. Here's a vid of what I have so far:
00040 - YouTube