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

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

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

1 Comment

in chi-square statistic between two images I have NAN and INF which cannot be summed in the equation. How to solve this issue.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!