imeka / ndarray-ndimage

Multidimensional image processing for ndarray
Apache License 2.0
14 stars 2 forks source link

Morphology #15

Open nilgoyette opened 1 year ago

nilgoyette commented 1 year ago

There's a problem with the border management in the morphological erosion. Currently we are doing:

The consequence of our current method can be seen in the following image. Wrong

I read more and I realized that it's not the right behavior: "Pixels beyond the image border are assigned the maximum value afforded by the data type." Thus all the padded voxels should be set to 1.

Our current method (working with windows to avoid padding) can't work. We can keep the window but we must pad with 1 if we want to avoid border effects.