You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 25, 2022. It is now read-only.
I succesfully used the watershed function from Matlab, but OpenCV variant is not working.
I'm not sure if this is mexopencv related, maybe I misunderstood the watershed algorithm in OpenCV.
I'm using following int8 depth image:
because openCV using RGB image format, I replicated these values in a MxNx3-matrix.
As marker I have an int32 matrix where I pointed every local minimum (5 in total),
By using following function
resultOpenCV= cv.watershed(rgbImage,marker);
The segmented matrix looks like this:
In Matlab using following function (even without markers)
resultMatlab= watershed(rgbImage(:,:,1));
This is the correct result:
Where am I wrong?
Thank you
The text was updated successfully, but these errors were encountered:
Ultimately these two functions are different implementations of the algorithm; MATLAB watershed implements the watershed transform, while OpenCV cv::watershed implements an interactive marker-based watershed segmentation.
Hey,
I succesfully used the watershed function from Matlab, but OpenCV variant is not working.
I'm not sure if this is mexopencv related, maybe I misunderstood the watershed algorithm in OpenCV.
I'm using following int8 depth image:

because openCV using RGB image format, I replicated these values in a MxNx3-matrix.

As marker I have an int32 matrix where I pointed every local minimum (5 in total),
By using following function
The segmented matrix looks like this:

In Matlab using following function (even without markers)
This is the correct result:

Where am I wrong?
Thank you
The text was updated successfully, but these errors were encountered: