I would like to separate objects in OpenCv like the following image it shows: 
But if I am using cvDilate or cvErode the objects grow together… how to do that with OpenCv?
I would like to separate objects in OpenCv like the following image it shows:
Share
As far as I know OpenCV does not have “dilation with XOR” (although that would be very nice to have).
To get similar results you might try eroding (as in ‘d’), and using the eroded centers as seeds for a Voronoi segmentation which you could then AND with the original image.