color quantization gives map of 55 ,instead of 64 colors?

1 view (last 30 days)
my program is croping specific area from image and convert to lower color map
rgb2ind(image, 64, 'nodither');
this works fine ,but with the image of 13x11x3 it gives 55 colormap?
1-is it normal?
2- my program further reshape the modified colormap on the assumption that colormap is 64 , but i got the error "To RESHAPE the number of elements must not change."
So what should i do now? can i not get 64 map on such small image? or it doenst depend on size?

Answers (1)

Image Analyst
Image Analyst on 19 Nov 2014
You may not have 64 unique colors. Maybe your image has only 55 unique colors in it. Attach your RGB image so we can check it.

Community Treasure Hunt

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

Start Hunting!