Medical Image Segmentation

What Is Medical Image Segmentation?

Medical image segmentation is a process that partitions a 2D or 3D medical image into multiple segments or extracts regions of interest, each segment representing a specific category or tissue type (for example, normal or tumor tissue). By distinguishing different parts of an image, medical image segmentation facilitates more accurate subsequent diagnosis, treatment planning, and monitoring of diseases. Medical image segmentation is an indispensable tool in modern medical practice.

Typically, medical image segmentation is part of a workflow that involves the following steps:

  • Accessing medical images
  • Image preprocessing
  • Segmentation
  • Analysis and interpretation

MATLAB®, Image Processing Toolbox™, Computer Vision Toolbox™, and Medical Imaging Toolbox™ provide features that enable medical image segmentation as well as application examples for each of the above steps.

Medical image segmentation for tumor tissue with areas showing normal and tumor tissue.

Medical image segmentation for tumor tissue using deep learning and the blockedImage object in MATLAB to handle large, high-resolution images. (See code example.)

Medical Image Segmentation Workflow

Accessing Medical Images

In MATLAB, you can import and export DICOM, DICOM-RT, HDF5, Interfile, NIfTI, and Tif format medical images with the DICOM Browser app or easy-to-use functions.

For large images, such as pathological images, that cannot fit in memory and are challenging to process, the blockedImage object represents an image as a collection of smaller blocks of data that can be independently loaded and processed. This approach accelerates the reading and processing of big images and multiresolution images. The blockedImage object also supports parallel computing leveraging multicore CPU or GPU.

Image Preprocessing

The main goals of medical image preprocessing and augmentation are to reduce image acquisition artifacts and to standardize images across a data set. You can enhance image quality for segmentation through background removal, denoising, resampling, registration, and intensity normalization to minimize artifacts and improve segmentation accuracy.

Side-by-side comparison of original ultrasound and ultrasound with speckle noise filtered out.

Reducing speckle noise in an ultrasound image using the specklefilt function in MATLAB. (See code example.)

Segmentation

The core step of medical image segmentation partitions the image into meaningful regions corresponding to different tissues, organs, and bones. After segmentation, you can use postprocessing to remove noise, smooth boundaries, and fill gaps to improve accuracy and reliability. Examples of postprocessing tasks include morphology and filtering.

Connecting to MONAI Label within the Medical Image Labeler app in MATLAB to apply fully automated and interactive deep learning models for segmenting radiology images.

Detecting the discontinuity in pixel value is a common technique, as the pixel grey value discontinuity normally indicates the edge of an object.

Screenshot of the Image Segmenter app with controls for threshold method and opacity.

Using thresholding in the Image Segmenter app in Image Processing Toolbox to segment the bone from the soft tissue in an MRI image of a knee.

Another common technique is based on similarity detection, such as region growing and clustering.

Side-by-side images of original stained tissue and segmented image with cell nuclei highlighted in blue.

Color-based medical image segmentation using K-means clustering. (See MATLAB code example.)

You can use the Color Thresholder, Image Segmenter, or Volume Segmenter apps in MATLAB to quickly try different image segmentation algorithms on your image without referring to documentation, remembering the syntax, or writing code. Once the results satisfy your requirements, you can export the algorithm into a MATLAB function with one click. You can also use MATLAB functions for edge detection, feature-based segmentation, and clustering in your image segmentation algorithm.

Deep learning is also used for semantic image segmentation. This approach can help you associate every pixel of an image with a class label.

For deep learning applications, traditional manual labeling is error prone. The Medical Image Labeler and Image Labeler apps enable you to manually or semiautomatically label your data set with high accuracy at high speed. You can then use the Deep Network Designer app to build, visualize, and train deep learning networks.​ You can also use the Experiment Manager app to manage multiple deep learning experiments and analyze and compare results and code.

Analysis and Interpretation

Object analysis, or quantitatively analyzing and interpreting segmented regions for area, volume, and morphological features, is crucial for disease diagnosis, treatment planning, and efficacy assessment.

Screenshots showing examples of medical image segmentation: four CT scan images and a plot of axial displacement.

Using the Medical Image Labeler app to segment a CT scan of a spine by applying finite element analysis. (See MATLAB code example.)

For more medical image processing–related apps, functions, and workflows for designing and testing diagnostic imaging applications, refer to Medical Imaging Toolbox.


See also: MATLAB for image processing and computer vision, medical imaging, image segmentation