converting grey of three bands text image into into binary image into 1 band

조회 수: 2(최근 30일)
Majid Al-Sirafi
Majid Al-Sirafi 2019년 2월 9일
댓글: Image Analyst 2019년 2월 9일
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

답변(1개)

KALYAN ACHARJYA
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
Image Analyst
Image Analyst 2019년 2월 9일
Use a higher resolution input device (scanner or camera).

댓글을 달려면 로그인하십시오.

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by