Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Object recognition and measuring size

I'd like to create a system for use in a factory to measure the size of the objects coming off the assembly line. The objects are slabs of stone, approximately rectangular, and I'd like the width and height. Each stone is photographed in the same position with a flash, so the conditions are pretty controlled. The tricky part is the stones sometimes have patterns on their surface (often marble with ripples and streaks) and they are sometimes almost black, blending in with the shadows.

I tried simply subtracting each image from a reference image of the background, but there are enough small changes in the lighting and the positions of rollers and small bits of machinery that the output is really noisy.

The approach I plan to try next is to use Canny's edge detection algorithm and then use some kind of numerical optimization (Nelder-Mead maybe) to match a 4-sided polygon to the edges. Before I home-brew something, though, is there an existing approach that works well in this kind of situation?

If it helps, it would be possible to 'seed' the algorithm with a patch of the image known to be within the slab (they're always lined up in the corner) to help identify its surface pattern and colors. I could also produce a training set of annotated images if necessary.

Some sample images of the background and some stone slabs:

BackgroundEasy caseDifficult case 1Difficult case 2

like image 859
Sam Avatar asked Oct 21 '22 22:10

Sam


1 Answers

Have you tried an existing image segmentation algorithm?

I would start with the maxflow algorithm for image segmentation by Vladimir Kolmogorov here: http://pub.ist.ac.at/~vnk/software.html In the papers they fix areas of an image to belong to a particular segment, which would help for you problem, but it may not be obvious how to do this in the software.

Deep learning algorithms for parsing scenes by Richard Socher might also help: http://www.socher.org/

And Eric Sudderth has at least one interesting method for visual scene understanding here: http://www.cs.brown.edu/~sudderth/software.html

I also haven't actually used any of this software, which is mostly, if not all, for research and not particularly user friendly.

like image 86
user1149913 Avatar answered Oct 25 '22 19:10

user1149913