Is it possible to replace Scalar quantization into vector Quantization in matlab?
Afficher commentaires plus anciens
I used binary quantizer and non-uniform quantizer under scalar quantization. Is it possible to replace the following code with vector quantization? If so how can I modify?
my code:
C_code = gen_binary_codes(C, K);
Ls = 3;
Lr = 5;
BINsi=Ls;
Wsi=BINsi.^(1:-1:0); % weights
BINc =2;
Wc=BINc.^(3:-1:0);
II=[1 2];JJ=[1 2 4 5];
SIcode = SI_code(:,II);
Ccode = C_code(:,JJ);
featW = SIcode*Wsi' + (Ccode*Wc')*BINsi^2;
H1=hist(featW, 0:(BINsi^2*BINc^4-1));
II=II+1; JJ=JJ+1;
SIcode = SI_code(:,II);
Ccode = C_code(:,JJ);
featW = SIcode*Wsi' + (Ccode*Wc')*BINsi^2;
H2=hist(featW, 0:(BINsi^2*BINc^4-1));
% H3
G2=C(:,1:3);
D2=C(:,4:6); % d
r=2/pi*atan(Coef*D2./G2);
R_code = atan_vq(r, Lr);
W=Lr.^(2:-1:0);
featW = R_code*W';
H3 = hist(featW, 0:Lr^3-1);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Cast and Quantize Data dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!