how can i convert a number of grayscale images into binary images

1 view (last 30 days)
respected sir, i am new to matlab please help me to convert a number of grayscale image into binary image, i had use im2bw command but it does not gives result, please help me sir, i am having image of about 3000 please help me to convert those images into binary thanks in advance.
  2 Comments
Stephen23
Stephen23 on 26 Oct 2015
Edited: Stephen23 on 26 Oct 2015
Everything stored on your computer is stored as binary information, including all of those images. What exactly do you mean by a "binary image"?
Image Analyst
Image Analyst on 26 Oct 2015
In image processing, a binary image is a logical image with values of true or false. Usually used to indicate a mask where you want to do processing inside.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 26 Oct 2015
I'm not surprised at all. I assume you used graythresh() to get the value to pass in to im2bw(). In my experience, most real world images can't be thresholded satisfactorily using the Otsu method. You'll have to come up with an algorithm that is better suited to your particular images.
To process a folder of 3000 files, see the FAQ for code examples:

Community Treasure Hunt

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

Start Hunting!