Difference between FloodFill and Watershed [closed]

asked 2018-08-17 04:51:33 -0600

sazr gravatar image

What is the difference between OpenCV's functions floodFill() and watershed? I seem to understand that watershed takes some markers and fills from there. But it looks like flood fill does the same thing except it has a mask and seeds (not markers).

What is the difference and when is one method better/more applicable than the other?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-10-13 13:28:46.215277

Comments

Thanks I have looked into these but will look more closely. But there must be some succinct difference that an informed person can point out no? From my looking into it it just appears that the criteria for when to stop filling is different (floodfill is more strict in this case). Plus I would like to when one method is preferred over the other. I come here for expert/informed peoples experience that can usually directly answer my questions rather than searching through a wikipedia article for the answer.

sazr gravatar imagesazr ( 2018-08-17 05:32:18 -0600 )edit

In my understanding, floodfill takes all edges as a similar height, either edge or not, where in watershed, the edges strength define how high the edges will be and thus when those edges will overflow. It could result in a complete different segmentation.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-08-17 06:46:17 -0600 )edit

though the concepts behind it are similar, floodfill is for drawing, watershed is for segmentation.

berak gravatar imageberak ( 2018-08-18 07:31:19 -0600 )edit