MATLAB Answers

Make squares in image white

2 views (last 30 days)
Nathan Jaqua
Nathan Jaqua on 2 Dec 2019
Answered: Matt J on 2 Dec 2019
In Matlab, I have this checkbox image that I am doing some work with. Now, I need to make it so all the squares are white and the other part of the image is black after I have done the imread() function. Then, I need to reverse it so the squares are black and the other part is white. I have managed to make it all black with what I have at the moment, but I haven't managed to get the white squares so far. What command or functions do I need to use?
My Code so far:
A=imread('chkbox.gif');
image(A);
colormap(gray(128));

  0 Comments

Sign in to comment.

Accepted Answer

Matt J
Matt J on 2 Dec 2019
imcomplement(A);

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.