Make squares in image white

1 回表示 (過去 30 日間)
Nathan Jaqua
Nathan Jaqua 2019 年 12 月 2 日
回答済み: Matt J 2019 年 12 月 2 日
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));

採用された回答

Matt J
Matt J 2019 年 12 月 2 日
imcomplement(A);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by