Main Content

色彩分割器

对彩色图像进行阈值化处理

说明

色彩分割器允许您根据不同颜色空间对颜色通道设置阈值,从而分割彩色图像。使用此 App,您可以为彩色图像创建二值分割掩膜。

色彩分割器支持四种颜色空间的分割。在每个颜色空间中,该 App 将图像、三个颜色通道和所有像素的颜色值显示为三维颜色空间图中的点。您可以通过为颜色通道值设置窗口或者在图像或三维颜色空间图中绘制 ROI 来选择掩膜中包含的颜色。有关使用该 App 的示例,请参阅Segment Image and Create Mask Using Color Thresholder

颜色空间颜色通道阈值控制
RGB

Three histograms of the red, green, and blue pixel intensities

HSV

The circular hue colorwheel and two histograms of the saturation and value intensities

YCbCr

Three histograms of the Y, Cb, and Cr intensities

L*a*b*

Three histograms of the L*, a*, and b* intensities

Color Thresholder app

打开 色彩分割器 App

  • MATLAB® 工具条:在 App 选项卡上的图像处理和计算机视觉下,点击色彩分割器图标。

  • 在 MATLAB 命令提示符下,使用 colorThresholder 函数和编程用法中所述的语法。

编程用途

全部展开

colorThresholder 打开色彩分割器,您可基于不同颜色空间进行探索以创建彩色图像的分割掩膜。

colorThresholder(im) 打开色彩分割器,将图像 im 加载到 App 中。

colorThresholder close 关闭色彩分割器的所有打开的实例。

版本历史记录

在 R2014a 中推出