Hey,
I'm using Matlab to use OpenCV functions, I succesfull used the watershed function from Matlab, but OpenCV variant is not working.
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 I'm wrong?
Thank you