Quantizing a Signal
quantize(v, n)—Returns a vector that assigns the elements of v to n equally-spaced and discontinuous levels.
Quantization produces an image with n levels of grey, and can be used for enhancing features of an image by choosing the appropriate threshold or number of levels. Quantization, along with binarization, can be a first step in image analysis.
Arguments
v is a real-valued vector or matrix.
If vector or matrix v contains units, then the elements of the returned vector will contain these same units.
n is an integer ≥ 1.
Additional Information
Quantization is used when storing or manipulating analog signals in a digital environment.
Quantization levels are chosen so that the lowest and highest levels are the minimum and maximum values of v:
Was this helpful?