Quantize image using specified quantization levels and output values
quantizes
image quant_A = imquantize(A,levels)A using specified quantization values contained
in the N element vector levels.
Output image quant_A is the same size as A and
contains N + 1 discrete
integer values in the range 1 to N + 1 which are determined by
the following criteria:
If A(k) ≤ levels(1), then quant_A(k) = 1.
If levels(m-1) < A(k) ≤ levels(m) , then quant_A(k) = m.
If A(k) > levels(N), then quant_A(k) = N + 1.
Note that imquantize assigns values to
the two implicitly defined end intervals:
A(k) ≤ levels(1)
A(k) > levels(N)
adds
the quant_A = imquantize(___,values)N + 1 element
vector values where N = length(levels).
Each of the N + 1 elements
of values specify the quantization value for
one of the N + 1 discrete
pixel values in quant_A.
If A(k) ≤ levels(1), then quant_A(k) = values(1).
If levels(m-1) < A(k) ≤ levels(m) , then quant_A(k) = values(m).
If A(k) > levels(N), then quant_A(k) = values(N + 1).