Watershed c++ source sode

asked 2013-05-07 15:10:16 -0600

djou gravatar image

Hi :) I want you guys help me to find watershed segmentation source code in c++.

I am trying to segment a brain MRI to extract tumore area (the lightest area), I tried the opencv function, but it don'tgive accurate result or maybe it does not work, I don't know exactly...

Here is the result that I got using opencv function:

watershed(InputArray image, InputOutputArray markers);

image description

And here is the result I want to get,

image description

I found this images in this paper:

Detection and Quantification of Brain Tumor from MRI of Brain and it’s Symmetric Analysis

proposed by Sudipta Roy, Samir K. Bandyopadhyay

So I want to try another source code of watershed segmentation....I hope you understand what I want to say...

thank you in advance :) :) and sorry for my bad english

edit retag flag offensive close merge delete


I do not see what it is doing wrong? It segmented the most bright area in your input. For the rest, this forum only handles openCV problems, not C++ algorithms, see FAQ.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-05-08 06:32:56 -0600 )edit

ok, but the result of opencv function should be like the seconde example, in figure 6 ... why it does not segment the region of interest it self ?

djou gravatar imagedjou ( 2013-05-08 07:26:14 -0600 )edit

because of how the watershed implementation of openCV is defined probably. Try to perform watershed again only on the selected region of interest after the first iteration.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-05-08 09:02:19 -0600 )edit