How to convert uint16 grayscale (obtained from .tiff) to uint8 grayscale?

4 views (last 30 days)
1. I used this:
X=imread(a .tiff file);
[Y,newmap] = imapprox(X,map,64);
imshow(Y, newmap);
Problem 1: I am getting an empty matrix for map
Problem 2: I used map=0:1:2^16; but getting all 255 in Y.
2. I want to use the converted grayscale image for GLCM. Should the grayscale image be indexed for measuring GLCM?

Answers (1)

Image Analyst
Image Analyst on 27 Nov 2013
Not all images are stored with a colormap, like color images for example don't have one. You don't need an indexed image or a quantized image for graycomatrix (GLCM). You can use a uint8 or uint16 image directly without alteration.
  2 Comments
Nasser
Nasser on 27 Nov 2013
But it is taking a long time to calculate GLCM for uint16 images. What to do?
Image Analyst
Image Analyst on 27 Nov 2013
How big are your images? Quantizing them won't speed it up. How long does it take?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!