1
$\begingroup$

I know that watershed and grabcut algorithms are both common tools for image segmentation. They both seem to rely on predefined markers to form something like a source-sink system and then uses the gradient of the image to find the boundaries.

The largest difference I observe is that grabcut uses a graph structure where the gradient translates to edge weights, while watershed intuitively works by slowly adding water to the gradient image. But to me, it seems like they would yield similar results?

My question is what are the relative strengths and weaknesses between these two algorithms? When should I use one over another?

$\endgroup$
1
$\begingroup$

Watershed-based segmentation will typically lead to over-segmentation, and is very sensitive to local image noise (e.g. see discussion here). Typically watersheds are pruned/merged by using thresholds on size (area/relief/volume).

I have not had much direct experience of GrabCut, mostly know it from reading papers. However I can say that it is a more "modern" approach than watersheds (i.e. much more recently developed). Because it is based on global optimization (via graph cuts), it is less sensitive to local image noise, compared to watersheds.

$\endgroup$
0
$\begingroup$

For future reference,

In the specific case of opencv and what I experienced,

Grabcut only separates foreground from background (i.e. only supports 2 labels) while watershed supports segmenting with multiple labels

Grabcut is much slower than watershed, I don't have hard stats, but watershed was able to process in near real time on an image that grabcut requires around 5 secs to process

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.