imbinarize function do not work im2bw also does not work

ı am trying to get an image in the binary form but the funtions for it doesn't work.
ı tried both imbinarize and im2bw.
I = imread('a.png');
BW = im2bw(I, 0.4);
figure
imshow(I)

Answers (1)

I = rgb2gray(imread('a.png'));
BW = im2bw(I, 0.4);

8 Comments

Ek Açıklama 2019-11-30 132428.pngı copied excactly the text you proposed but ı got this error mesage
Please change the other image file and do verify?
Can you share the code and error message in larger texts (The image above is not visible)?
I = rgb2gray(imread('a.png'));
BW = im2bw(I, 0.4);
figure
imshow(BW)
error message
'im2bw' requires Image Processing Toolbox.
Error in a (line 2)
BW = im2bw(I, 0.4);
the thing is ı tried installing image processing toolbox but ı couldn't and gotten a message that says something unexpected occured. ı tried a copule of times and yet nothing changed.
Just type ver in the command window, then enter, it shows all Toolboxes installed, is their Image Processing Toolbox, please confirm?
>>ver
Because all images functions are in image processing toolbox, this is the reason it showing the error. You have to install image processing toolbox or use Matlab platform in other system which already have image processing toolbox installed.
ı am so sorry for bothering so much but as ı have said before ı cannot install it when ı try ı get an error that says something unexpected happened.
how to install image processing toolbox?
and how to remove errors shown in below image?

Sign in to comment.

Categories

Asked:

on 30 Nov 2019

Commented:

on 20 Jan 2021

Community Treasure Hunt

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

Start Hunting!