Implementation of a marker-controlled watershed approach to segment and classify nucleus regions in macrophage biomedical imagery.
Clone the repository and make sure all scripts are in your working directory (PATH) in MATLAB. Specify the directory of the source images by editing the corresponding code segment. Then run the scripts that are not inside the background_seg
folder in the following order:
compute_L_channel -> extract_background -> extract_cell_regions -> get_clumped_cells -> marker_controlled_watershed
The details of what each step performs are laid out below so you can alter or skip steps based on the type of input you will be providing into the pipeline.
compute_L_channel
-> First, the images are converted from RGB color space to LAB* color space. So if your source images are not in RGB color space this step may mess up the pipeline. Also, if your source imagery are already in LAB* color space, you should just skip this step and jump right into extract_background
extract_background
-> The macrophage imagery have blue nucleus regions imposed on a black background. This step employs a minimum-error-thresholding approach to separate the nucleus regions from the black background (or any other dominantly distributed areas in the image which are interpreted by the process as background).
extract_cell_regions
-> The detected nucleus regions in the extract_background
process are isolated and saved into a separate folder for further processing This aids in the segmentation of nucleus regions that containt two or more nuclei but are unable to be segmented solely by the background extraction process.
get_clumped_cells
-> The cell regions are classified as either containing a single nucleus or multiple nuclei by examining the region properties of the binarized images. The eccentricity (roundness) values are used to determine the number of nuclei contained inside a designated cell region.
marker_controlled_watershed
-> The final watershed step to segment the nuclei regions that are clusters i.e. contain two or more nuclei regions that cannot be separated by the previous thresholding method. For more information on the implementation of this step, please visit here.