What Is Image Segmentation?

3 things you need to know

图像分割是数字图像处理和分析中的常用技术,以将图像分为多个部分或区域,通常基于图像中的像素的特性。图像分割可能涉及将前景从背景中分离,或者基于颜色或形状的相似度分离像素的聚类区域。例如,医学成像中的图像分割的共同应用是检测和标记表示a的3D卷的图像或体素的像素。患者的大脑中的肿瘤或其他器官。

Why Image Segmentation Matters

Several algorithms and techniques for image segmentation have been developed over the years using domain-specific knowledge to effectively solve segmentation problems in that specific application area. These applications include medical imaging, automated driving, video surveillance, and machine vision.

医学影像

During medical diagnosis for cancer, pathologists stain body tissue with hematoxylin and eosin (H&E) to distinguish between tissue types. They then use an image segmentation technique called聚类to identify those tissue types in their images.聚类是在场景中分离一组对象的方法。K-means聚类算法发现分离,使得每个簇内的对象尽可能彼此彼此接近,并且远离其他簇中的其他对象尽可能远。

Using clustering to distinguish between tissue types (bottom) in an image of body tissue (top) stained with hematoxylin and eosin (H&E).

自动驾驶

在为自动驾驶汽车等自动车辆的观念设计时,semantic segmentation普遍用来帮助系统识别和找到道路上的车辆和其他物体。

Using semantic segmentation to associate each pixel of the image with a class label (such as car, road, sky, pedestrian, or bike).

图像分割方式如何运作

Image segmentation involves converting an image into a collection of regions of pixels that are represented by a mask or a labeled image. By dividing an image into segments, you can process only the important segments of the image instead of processing the entire image.

一种常见的技术是在像素值中寻找突然的不连续性,其通常表示定义区域的边缘。

使用阈值处理将转换为二进制图像以提高图像中文本的易读性。

另一种常见方法是检测图像区域中的相似性。遵循这种方法的一些技术是区域生长,聚类和阈值。

基于颜色值,形状或纹理分割区域。

A variety of other approaches to perform image segmentation have been developed over the years using domain-specific knowledge to effectively solve segmentation problems in specific application areas.

Image Segmentation with MATLAB

With马铃薯®,您可以:

  • 使用应用程序以交互方式探索不同的分段技术
  • Simplify image analysis workflows using built-in image segmentation algorithms
  • Perform deep learning for image segmentation

使用应用程序以交互式阈值图像

Image Segmenter App

Using the interactive Image Segmenter app, you can iteratively try several methods to segment an image before achieving the desired result. For example, you can use the app to细分和进一步改进具有不同方法的膝关节的MRI图像的结果。

使用图像分段器应用程序以交互方式应用不同的分段技术。

Color Thresholder App

此颜色阈值应用程序可允许您通过以交互方式操作图像来申请彩色图像,基于不同的颜色空间。例如,您可以使用颜色阈值应用程序create a binary maskusing point cloud controls for a color image.

使用颜色阈值应用程序应用颜色分割以将鸟类分离在背景中的前景中。

使用各种图像分段技术

在matlab和matlab的功能图像处理工具箱™, you can experiment and build expertise on the different image segmentation techniques, including thresholding, clustering, graph-based segmentation, and region growing.

阈值

使用Otsu的方法,imbinarize.performs thresholding on a 2D or 3D grayscale image to create a binary image. To produce a binary image from an RGB color image, useRGB2GRAY.首先将其转换为灰度图像。

Using thresholding to convert a color image to a binary image.

聚类

此技术允许您使用特定的聚类算法创建分段标记的图像。使用基于K-Means聚类的分割,imsegkmeans将图像分段为k个簇。

聚类技术将图案化背景分开在地板上。

基于图形的分段

Graph-based segmentation techniques like lazy-snapping enable you to segment an image into foreground and background regions. MATLAB lets you perform this segmentation on your image either programmatically (lazysnapping)或者使用图像分段器应用交互式。

Lazy-snapping to separate the foreground and background regions.

使用图像裂殖体应用程序交互的应用程序ly graph-based segmentation.

Region Growing

Region growing is a simple region-based (also classified as a pixel-based) image segmentation method. A popularly used algorithm isactivecontour,这检查了初始种子点的相邻像素,并迭代地确定是否应该将像素邻居添加到该区域。您还可以使用图像分部器应用程序在图像上执行此分段。

Using the Image Segmenter app to perform region growing.

Deep Learning for Image Segmentation

使用卷积神经网络(CNNS),一种名为语义分割的深度学习技术,允许您将图像的每个像素与类标签相关联。语义分割的应用包括自主驾驶,工业检验,医学成像和卫星图像分析。

语义分割技术的示意图。

Using马铃薯, you can design and train semantic segmentation networks with a collection of images and their corresponding labeled images, and then use the trained network to label new images. To标记培训图像,您可以使用图像贴标程序,视频贴标程序或地面真实贴标程序应用程序。

使用地面真理贴标程序应用程序执行语义分段。

了解有关图像分割的更多信息

Download application examples with code that is ready to run or modify, including Detecting a Cell Using Image Segmentation, Detecting and Measuring Circular Objects, and Texture Segmentation Using Gabor Filters.
With the Image Segmentation app, you can preview how images will look after segmenting them with intensity-based approaches as well as techniques such as graph cut, circle finding, and region growing.
Acquire an image and perform image analysis to find small objects, count them, and differentiate them by color.
使用深度学习网络了解语义分段的高级工作流程。此外,了解图像贴标程序应用程序如何在像素级别加快地面真理标记的工作流程。
Segment colors in an automated fashion using the L*a*b* color space and K-means clustering.
Detect a cell using edge detection and basic morphology.
Use watershed segmentation to separate touching objects in an image.
阅读关于图像处理概念和算法。