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

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

Answers (1)

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 Comments

thank you very much dear
firstly sorry, it is not gray (3 bands).
secodly if the image if of size(125*125) the viewing is not acceptable
regards
majid
What does 3 bands menas?
You can change resolutions of the image (upto certain level), inaddition how you define viewing is acceptable or not. (It is perception based), clarify?
sorry dear my image is 3 bands but suppose that its dimension is (100*100). so, if it converted into binary it viewing will be very poor. how can I enhance it
Use a higher resolution input device (scanner or camera).

Sign in to comment.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Products

Asked:

on 9 Feb 2019

Commented:

on 9 Feb 2019

Community Treasure Hunt

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

Start Hunting!