当前位置:妙知谷 >

游戏数码 >电脑 >

Matlab图像二值化

Matlab图像二值化

Matlab对灰度图像进行二值化

操作方法

(01)首先读取到一张图片I = imread('fordebug.bmp');

Matlab图像二值化

(02)用graythresh和im2bw命令thresh = graythresh(I);     %自动确定二值化阈值I2 = im2bw(I,thresh);       %对图像二值化----------------------------------------------------------------------------------------------------

Matlab图像二值化 第2张

(03)说明:thresh命令为 Matlab 自动确定最佳阈值2bw 为二值转换函数效果就出来了!Enjoy!

标签: MATLAB 二值化 图像
  • 文章版权属于文章作者所有,转载请注明 https://miaozhigu.com/zh-sg/sm/diannao/xvo7me.html