2
나는 더블 양자화 효과를 감지하기 위해 이미지의 양자화 된 DCT 계수에 대한 히스토그램을 원한다. 내가 hist (x)를 사용할 때 10으로 범주화하고 hist (x, 20) 또는 30으로 변경하면 DQ 효과가 실제로 나타나지 않습니다. 그래서 거기에 더 좋은 방법이 무엇입니까 ?? MATLAB에더블 Quantiztion 효과를 표시하려면 dct coefcient에 대한 히스토그램을 수행하는 방법은 무엇입니까?
im = jpeg_read('image');
% Pull image information - Lum, Cb, Cr
lum = im.coef_arrays{im.comp_info(1).component_id};
cb = im.coef_arrays{im.comp_info(2).component_id};
cr = im.coef_arrays{im.comp_info(3).component_id};
% Pull quantization arrays
lqtable = im.quant_tables{im.comp_info(1).quant_tbl_no};
cqtable = im.quant_tables{im.comp_info(2).quant_tbl_no};
% Quantize above two sets of information
qcof = quantize(lum,lqtable);
bqcof = quantize(cb,cqtable);
rqcof = quantize(cr,cqtable);
hist(qcof,30); %lum quantized dct coefficient histogram