Skip to content

Commit e05fca8

Browse files
committed
Fixed display of images in codec.m and added results to Document folder
1 parent 320e623 commit e05fca8

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

Codec/codec.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
sub23 = lena_haar(257:512,257:512);
1515
figure
1616
subplot(4,4,1)
17-
imshow(sub11)
17+
imshow(sub11,[0,255])
1818
subplot(4,4,2)
1919
imshow(sub12)
2020
subplot(4,4,5)
@@ -126,10 +126,10 @@
126126
dq_lena(257:512,257:512) = dequantize_matrix(q_lena(257:512,257:512),4,8);
127127

128128
synth_lena = haar_reverse_multilevel(dq_lena,2);
129-
imshow(synth_lena)
129+
imshow(synth_lena,[0,255])
130130

131131
%%%%%%%% PSNR calculation %%%%%%%%
132-
[PSNR,MSE,MAXERR,L2RAT] = measerr(lena_gray_512,synth_lena)
132+
[PSNR,MSE,MAXERR,L2RAT] = measerr(lena_gray_512,synth_lena);
133133
% measerr already provides the PSNR but we can calculate it again using the
134134
% formula: 10 * log10((255^2)/MSE)
135135
PSNR_2 = 10 * log10((255^2)/MSE);

Documents/TD3-entropy.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
Sub-band Entropy Huffman
3+
LL2 11.2518 11.2827
4+
HL2 3.2664 3.2960
5+
LH2 2.6242 2.6762
6+
HH2 1.6033 1.7831
7+
HL 1.5156 1.7344
8+
LH 1.2970 1.5712
9+
LL 0.9978 1.4522
10+
Full Image 2.5659 2.6689
11+
12+
PSNR= 28.1571 for lena_gray_512 vs synth_lena

Documents/images/TD3-histogram.png

158 KB
Loading
447 KB
Loading
634 KB
Loading

0 commit comments

Comments
 (0)