perform_quantization.m
来自「基于wavelet和bandelet的spiht图像压缩!」· M 代码 · 共 18 行
M
18 行
function [y, nbr_bits, nbr_bits_tot, y_quant] = perform_quantization(x, T)
% perform_quantization - perform a nearly uniform quantization of the signal.
%
% [y, nbr_bits, nbr_bits_tot, y_quant] = perform_quantization(x, T);
%
% The quantizer is defined by y=Q_T(x) where:
% Q_T(x) = 0 if |x|<T
% Q_T(x) = sign(x) * ([x/T]+0.5)*T where [.]=floor
% (i.e. a nearly uniform quantizer with twice larger zero bin).
%
% y is the quantified value
% nbr_bit as same size as x and store the number of bits needed to code
% each entry of x
% nbr_bits_tot is just sum(nbr_bits_tot(:))
% y_quant is the signed token representing each entry of y.
%
% Copyright (c) 2004 Gabriel Peyr
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?