How do I use graythresh on an indexed image in MATLAB?

Posted by user198729 on Stack Overflow See other posts from Stack Overflow or by user198729
Published on 2010-04-06T17:56:38Z Indexed on 2010/04/09 3:33 UTC
Read the original article Hit count: 253

Filed under:
|
I = imread('coins.png');
level = graythresh(I);
BW = im2bw(I,level);
imshow(BW)

The above is an example from the MATLAB documentation using a grayscale image. How can I make it work with an indexed image like alt text in this post?

© Stack Overflow or respective owner

Related posts about matlab

Related posts about image-processing