Questions tagged [watershed]

Watersheds are a term commonly referred to in image processing. Gray level images are considered as topographic water reliefs, where each relief is flooded from its minima. When two lakes merge, a dam is built. The set of all dams that result are what is known as an image's watershed

A grey-level image may be seen as a topographic water relief, where the grey level of a pixel in the image is interpreted as the height within the relief. A drop of water falling on a topographic relief flows along a path to finally reach a local minimum. The watershed of a relief corresponds to the limits of the nearby catchment basins of the drops of water.

In image processing, different types of watershed lines may be computed. There are also many different algorithms to compute watersheds. Watershed algorithm is used in image processing primarily for image segmentation purposes.

Below is a visualization of the MRI of a heart visualized in a topographical way.

http://upload.wikimedia.org/wikipedia/commons/d/db/Relief_of_gradient_of_heart_MRI.png

Source: Wikipedia

These roughly correspond to the edge strength of the image, and the gradient of the image is shown below.

http://upload.wikimedia.org/wikipedia/commons/e/ea/Gradient_of_MRI_heart_image.png

Source: Wikipedia

Watersheds essentially calculate the final edges that are essentially the basins of where the water collects, and an example is shown below.

http://upload.wikimedia.org/wikipedia/commons/0/0d/Watershed_of_gradient_of_MRI_heart_image.png

Source: Wikipedia

Finally, the topographical visualization of the gradient (or the watershed) is shown below. The previous image is inevitably the result that is being sought, but the output of the watershed algorithm is what is shown below.

http://upload.wikimedia.org/wikipedia/commons/0/0f/Relief_view_of_the_watershed_of_the_gradient_of_an_MRI_heart_image.png

Source: Wikipedia


For more information about the different watershed algorithms that exist, check out the following links:

179 questions
0
votes
2 answers

extracting leaf after watershed segmentation in matlab

after I applied watershed segmentation, I want to extract remained leaf from image,and only I want to get without background like image-2. Please can you help me. Thanks a lot. I attach below also my code. I'm new at stackoverflow, therefore I'm not…
0
votes
2 answers

OpenCV Watershed segmentation miss some objects

My code is the same as this tutorial. When I see the result image after using cv::watershed(), there is a object(upper-right) that I want to find out, but it's missing. There are indeed six marks in image after using cv::drawContours(). Is this…
B.S Lee
  • 23
  • 1
  • 6
0
votes
0 answers

watershed of IRM images

I want to apply an algorithm of segmentation of ( watershed by markers ). I have a problem in this code. It's applied only with one image (lena.jpg) I want to use it with irm images but it's not working. I think that the problem is in image RGB and…
0
votes
0 answers

how can I extract pores from an input binary fingerprint image using marker control watershed segmentation in MATLAB

I am working on pore extraction from binary fingerprint image, On using the watershed segmentation, I managed to get the gradient image but now I want to extract the pores(white blobs) from the ridges(the lines across the fingerprint).How do I go…
0
votes
1 answer

How to create polygons for watershed segmentation

I have an image and would like to create polygons of segments this image using marker-controlled watershed. I wrote the following code but I can't separate objects attached each other and create the polygons of the object. How can solve those…
user30985
  • 573
  • 1
  • 6
  • 19
0
votes
2 answers

Use R to extract data for an identifier in a row and put it in a new column

I have some data that I used ArcGIS to get and I want to construct a database by watershed identifier (for example HUC_8=1404106). The data contains the watershed identifier (HUC_8), watershed Area, Soil type, and Soil Area. The watershed identifier…
MKWalsh
  • 89
  • 1
  • 1
  • 7
0
votes
0 answers

Image Segmentation watershed

My work is to find an individual leaf from an group of leaves in the image. The constrain is the individual leaf i have to segment must be complete in shape. I used marker based watershed transform. image1 I get this output I created the marker…
James
  • 11
  • 2
0
votes
1 answer

Image format mismatch for watershed segmentation in OpenCV

I'm trying to implement a watershed segmentation using Java wrapper for OpenCV. Here's what I'm doing: public void watershedSegmentation(Mat image) { Mat target = new Mat(image.rows(), image.cols(), CvType.CV_8UC3); …
metsburg
  • 2,021
  • 1
  • 20
  • 32
0
votes
1 answer

OpenCV Watershed : 4 point connectivity

I am writing a code for watershed in OpenCV. But i want the watershed boundaries to be 4 point connected and not 8 point. Currently this is the interface: void watershed(InputArray image, InputOutputArray markers) Does anybody have any solution for…
0
votes
1 answer

How to perform Watershed segmentation and Blob analysis on a single image?

I'm planning to write a program using Open-CV to count the number of objects in an image similar to the one below. The method I'm planning to employ is to use the histogram to threshold the image and then to use Blob detection to count the number…
Tru
  • 1,467
  • 5
  • 18
  • 27
-1
votes
1 answer

I am getting following error while installing pyswmm. "error: package directory 'bin' does not exist"

I am getting following error while installing pyswmm. "error: package directory 'bin' does not exist" `enter image description here I tried to install pyswmm but getting error message.
-1
votes
1 answer

Region growing with the watershed transform error

Hello guys I am new to image processing, I've been trying out this code from adfoucart but I have been receiving this…
Sara
  • 24
  • 3
-2
votes
2 answers

how to separate these two boundary in this image?

I have segmented an image using watershed algorithm. Now this image contains many objects. I want some selected objects for further analysis. My question is how to remove unwanted objects in this image. The input image itself is noisy. What is the…
ankit agrawal
  • 301
  • 1
  • 14
-3
votes
1 answer

Extract object after watershed segmentation

I have segmented my image using the Watershed algorithm, the result is pretty satisfying. Now, I would like to extract and store what has been segmented but I don't really know how to do it. Do you guys have an idea please ? Thank you.
kevin labille
  • 53
  • 1
  • 1
  • 6
1 2 3
11
12