The VectorQuantizerEncoder
object performs
vector quantization encoding. The object finds the nearest codeword
by computing a distortion based on Euclidean or weighted Euclidean
distance.
To perform vector quantization encoding:
Define and set up your vector quantizer encoder. See Construction.
Call step
to perform the quantization
encoding according to the properties of dsp.VectorQuantizerEncoder
.
The behavior of step
is specific to each object in
the toolbox.
Note:
Starting in R2016b, instead of using the |
H = dsp.VectorQuantizerEncoder
returns
a vector quantizer encoder System object, H
.
This object finds a zero-based index of the nearest codeword for each
given input column vector.
H = dsp.VectorQuantizerEncoder(
returns
a vector quantizer encoder System object, 'PropertyName'
,PropertyValue
,...)H
,
with each specified property set to the specified value.
|
Source of codebook values Specify how to determine the codebook values as |
|
Codebook Specify the codebook to which the input column vector or matrix
is compared, as a k-by-N matrix.
Each column of the codebook matrix is a codeword, and each codeword
corresponds to an index value. The codeword vectors must have the
same number of rows as the input. The first codeword vector corresponds
to an index value of This property is tunable. |
|
Distortion calculation method Specify how to calculate the distortion as |
|
Source of weighting factor Specify how to determine weighting factor as |
|
Weighting factor Specify the weighting factor as a vector of length equal to
the number of rows of the input. This property applies when you set
the |
|
Behavior when input column vector is equidistant from two codewords. Specify whether to represent the input column vector by the
lower index valued codeword or higher indexed valued codeword when
an input column vector is equidistant from two codewords. You can
set this property to |
|
Enable output of codeword value Set this property to |
|
Enable output of quantization error Set this property to |
|
Data type of index output Specify the data type of the index output as: |
clone | Create vector quantizer encoder object with same property values |
getNumInputs | Number of expected inputs to step method |
getNumOutputs | Number of outputs of step method |
isLocked | Locked status for input attributes and nontunable properties |
release | Allow property value and input characteristics changes |
step | Perform vector quantization encoding |
This object implements the algorithm, inputs, and outputs described on the Vector Quantizer Encoder block reference page. The object properties correspond to the block parameters.