MATLAB: How to perform grayscale reconstruction by erosion

gray scale reconstructionImage Processing Toolbox

On a gray scale image i want to perform reconstruction by erosion as well as reconstruction by dilation.

Best Answer

There is an imreconstruct that does reconstruction. You give it a smaller "marker" image and your larger binary image and it returns an image with only the blobs that have marker(s) in them. See my attached demos.