I have a Color Image, I need to quantize the image by taking the 2 MSB from each color plane. then I need to get the 64-bin Histogram

2 views (last 30 days)
I have a Color Image, I need to quantize the image by taking the 2 MSB from each color plane. then I need to get the 64-bin Histogram. How can I do that?

Accepted Answer

Walter Roberson
Walter Roberson on 27 May 2015
t = YourImage / 64; %leave 2 MSB
binnumber = t(:,:,1) * 16 + t(:,:,2) * 4 + t(:,:,3);
Now histogram the contents of binnumber, each of which will be from 0 to 63

More Answers (0)

Community Treasure Hunt

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

Start Hunting!