当前位置:网站首页>[matlab] image binarization (imbinarize function)

[matlab] image binarization (imbinarize function)

2022-06-25 09:26:00 Nirvana;

【MATLAB】 Image binarization (imbinarize function )

Image binarization in MATLAB 2019 Tips in version : Not recommended ‘im2bw’ And switch to ‘imbinarize’. So I specially summarize im2bw and imbinarize Usage of ,‘im2bw’ Function from R2016a It is not recommended to use , Here's the picture :
 Insert picture description here
MATLAB The code is as follows :

%  Old edition im2bw
srcImage = imread(' Original picture .jpg');
%  Determine the threshold of binarization 
thresh = graythresh(srcImage);
%  Image binarization 
dstImage = im2bw(srcImage,thresh);
%  new edition imbinarize
srcImage = imread(' Original picture .jpg');
%  Image binarization 
dstImage = imbinarize(srcImage);

 design sketch

原网站

版权声明
本文为[Nirvana;]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202200552278765.html