How to convert uint16 grayscale (obtained from .tiff) to uint8 grayscale?
4 views (last 30 days)
Show older comments
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?
0 Comments
Answers (1)
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
Image Analyst
on 27 Nov 2013
How big are your images? Quantizing them won't speed it up. How long does it take?
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!