converting grey of three bands text image into into binary image into 1 band
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone
Suppose that I have the attached text image. How can I convert it into binary image (0,1) with acceptable viewing?
Regard;
Majid
0 个评论
回答(1 个)
KALYAN ACHARJYA
2019-2-9
编辑:KALYAN ACHARJYA
2019-2-9
grey of three bands
More clarification needed, but the question seems easy, if I undestood it properly. As RGB have three bands (Levels) and Gray has one level only (with qualtizations levels).
image1=imread('image.bmp');
gray_im=rgb2gray(image1);
image_bw=im2bw(gray_im,0.65); %0<threshold_value<1
imshow(image_bw);
Above mentioned is direct conversion to binary image. For improve the image quality, you can do it in number of ways, like local thresholding, global thresholding, you can use the Otshu's thresholding also. All depends on targeted applications.
Please refer the chapter of Image Segmentation, Book Digital Image Processing using Matlab Author: Golzalez (McGraw Hill), you will get numerous solution.
4 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!