IM = imreconstruct(marker,mask) performs morphological reconstruction of the image marker under the image mask. marker and mask can be two intensity images or two binary images with the same size. The returned image IM is an intensity image or a binary image, depending on the input images, and is the same size as the input images.
This can be done in one line of code with imreconstruct().
J= imreconstruct(marker,mask)performs morphological reconstruction of the imagemarkerunder the imagemask, and returns the reconstruction inJ. The elements ofmarkermust be less than or equal to the corresponding elements ofmask. If the values inmarkerare greater than corresponding elements inmask, thenimreconstructclips the values to themasklevel before starting the procedure.
The whole principle of Otsu is to work on intensities. So you could apply Otsu to the grayscale intensities, or the red channel intensities, or the blue channel intensities, etc, or some intensity derived from all 3 RGB channels, but the Otsu method has no concept of colour.
Best Answer