Finding the number of quantized layers in MATLAB

I am working on image processing, and I have an image that was DCT'd and quantized for 8 x 8 512 x 512 matrix blocks, now I have to find the number of quantization levels that the image has. Should I take the top left pixel and put it in an array and then put it on the chart that calls hist?

+3
source share
1 answer

length(unique(x(:)))where xis your array of images. This is suitable for grayscale images.

+4
source

Source: https://habr.com/ru/post/1794170/


All Articles