Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Pixel classification might work here, but will never yield a 100% accuracy. The variance in the data is really big, rocks have different colours (which are also "corrupted" with lighting) and different texture. So, one must account for global information as well.</p> <p>The problem you deal with is foreground extraction. There are two approaches I am aware of.</p> <ol> <li><p>Energy minimization via graph cuts, see e.g. <a href="http://en.wikipedia.org/wiki/GrabCut" rel="nofollow">http://en.wikipedia.org/wiki/GrabCut</a> (there are links to the paper and OpenCV implementation). Some initialization ("seeds") should be done (either by a user or by some prior knowledge like the rock is in the center while water is on the periphery). Another variant of input is an approximate bounding rectangle. It is implemented in MS Office 2010 foreground extraction tool. The energy function of possible foreground/background labellings enforces foreground to be similar to the foreground seeds, and a smooth boundary. So, the minimum of the energy corresponds to the good foreground mask. Note that with pixel classification approach one should pre-label a lot of images to learn from, then segmentation is done automatically, while with this approach one should select seeds on each query image (or they are chosen implicitly). </p></li> <li><p><a href="http://en.wikipedia.org/wiki/Active_contour_model" rel="nofollow">Active contours</a> a.k.a. snakes also requre some user interaction. They are more like Photoshop Magic Wand tool. They also try to find a smooth boundary, but do not consider the inner area.</p></li> </ol> <p>Both methods might have problems with the reflections (pixel classification will definitely have). If it is the case, you may try to find an approximate vertical symmetry, and delete the lower part, if any. You can also ask a user to mark the reflaction as a background while collecting stats for graph cuts.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload