Hello Stackoverflowers,
My current assignment includes finding if a metal billet (log) is made out of one or two parts. My first go at this was searching for a black vertical line, indicating a separation between two logs. If i can't find a separation i conclude it's one piece.
This program worked flawless until.... dark colloured billets came along...
So i decided to use one other parameter which i know will always be true, depth. There will always be a depth different between a billet and the gap.
So i dediced to try two camera's mounted parallel to eachother, does anyone have any pointers how to set this up properly?
Or does somebody know another way to accomplish my task?
Thanks in advance!
Will work best IMO: Use a cheap laser line (around 20$ in a tools / hardware shop), and search the laser in the image. It the lines runs over the whole billet it is one piece. If there is a break in the line or a strong disortion there are 2 billets.
My idea:
Maybe you can use a kinect in the right distance if the billets are far away enough. Stereo Images use most time block matching on an epipolar line. This means take 3x3 pixels, go from left to right, and try to find 3x3 pixels which look similar. This could be a problem by using metal. First you have repeating patters. Second you have reflection, which will be different on each camera, since they have a slightly different viewing angle.
The kinect could have the same problems with the metal reflectness too, but not with repeating patterns:
"It depends on the material that is used to make the object. If the object is made out of metal, glass or it is shiny, the depth camera will face difficulty in capturing the image accurately."
OpenCV provides the rectifyStereoIamge (or something called similar) function which helps a lot when you use 2 cameras.