Académique Documents
Professionnel Documents
Culture Documents
JPG
main-2.JPG
main-3.JPG
gui-1.JPG
gui-2.JPG
gui-3.JPG
gui-4.JPG
gui-5.JPG
gui-6.JPG
gui-7.JPG
mu_interp.JPG
psnr.JPG
2
3
4
5
6
8
9
10
11
12
13
14
15
16
17
IS
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
warning('off');
tic;
close all;
clear all;
%
if size(iJ3)>l
i=rgb2gray{i);
end
g=im2double(i);
%
%
bicubic interpolation-
scale=2;
if scale>0
[rJcJh]=size(g);
tempim=uintB(zeros(r+4,c+4_,h));
tempim(3:r+2,3:c+2J :)=g(: :,:);
newim=uintS{zeros(floor{r*scale) floor(c*scale);h));
for il=l:1 size(newim,1)
for j=l:l : size(newim>2)
for x_i=floor((i1-1)/scale)+l:1:floor((il-1)/scale)+5
for y_j=floor((j-l)/scale)+l:1:floor((j-l)/scale)+5
x_d=cubicCalcDistance{(il-l)/scale+3Jx_i);
f
y_d=cubicCalcDistance{(j-l)/scale+3,y_j);
newim(il,jj: )=newim(il,j :)+tempiin(x_i,y_jf t : )*x_d*y_d;
end
end
end
end
Decomposition
%&%'
38
39
49
41
42
43
44
45
46
47
43
end
ll=zeros(size(g));
l2=zeros(size(g));
l3=zeros(size(g));
49
se
w=imresize(w_,[256 256]);
subplot(2,2 3) iflishow(mat2gray(w));
51
52
53
54
55
56
57
53
59
60
61
62
63
64
65
66
67
63
69
70
71
72
73
alpha=2;
a=my_interp{gJ alpha/2)j
%
apply DUJT
apply SWT
A3=my_interp{HHl,2);
74
75
76
77
73
79
80
SI
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
SCylimresizetAl,size{LH));
y2=imresize(A2J size{HL));
yBimresizetAB,size(HH));
SC
al=yl+LH; %% estimated LH
a2=y2+HL; 5 estimated HL
a3=y3+HH; K% estimated HH
SCbl=my_interp(alf alpha/2);
b2=my_interp(a2f alpha/2);
b3=my_interp(a3f alpha/2);
apply IWT
rt=idwt2(abl,b2,b3,'db7);
rt=imresize(rt size(g));
subplot(2.,2,4) iinshow( mat2gray(rt))Jtitle('Proposed technique')
f
SC-
psnr calculation
it*
11
12
13
14
IS
16
17
1a
19
20
21
22
23
24
25
26
27
23
29
30
31
32
33
34
gui_Singleton, ...
gflguiCpeningFcn., ...
' gui_OutputFcn ' , @gui_OutputFcn, ...
'gui_LayoutFcn', [] , ...
' gui_OpeningFcn ' ,
);
35
36
37
33
39
});
and!
41
42
43
44
45
46
47
43
49
53
51
52
S3
54
55
56
57
53
59
60
61
62
63
64
65
66
67
63
69
})
gui_State . gui_Callback
str2func{varargin{
if nargout
[varargout{
1: nargout
}] = guOiainfcntgui-State, varargin{
});
else
guintairife n(gui_St ate, vararginf
;
end!
% End initialization code
DO NOT EDIT
guidata(hObject, handles);
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
93
99
108
101
102
103
104
105
106
1
}
handles . output;
save g
ii=rgb2gray(i);
gg=im2double(ii) ;
save gg
106
107
103
109
lie
111
112
113
114
115
116
117
113
119
120
121
122
123
124
125
126
127
123
129
130
131
132
133
134
135
136
137
133
139
140
save gg
save ii
% Executes on button press in pushbutton2.
function pushbutton2_Callback(h0bject, eventdata, handles)
handle to pushbutton2 (see GCBO)
% hGbject
to be defined in a future version of MATLAB
% eventdata reserved
structure with handles and user data (see GUIDATA)
% handles
load g
scale=2;
if scale>0
end
[rfcf h]=size(g);
tempim=uint8(zeros(r+4,c+4,h));
tejnpinr(3:r+2J3:c+2J :)=g(:,
newim=uint8(zeros(floor( r*scale) loo r(c*scale),h));
for il=l:1 : size(newim,1)
for j=l:1: size(newim,2)
for x_i=floor((il-l)/scale)+l:1:floor(( il-1)/scale)+5
for y_j=floor((j-1)/scale)+l:1:f loor((j-l)/scale)+5
x_d=cubicCalcDistance((il-l)/scale+3Jx_i);
y_d=cubicCalcDistance((j-l}/scale+3,y_j);
newim(il,j,:)=newim(il,j,:)+tempim(x_i y_j,:)*x_d*y_d_;
end
end
end
end
141
142
143
144
145
146
147
143
149
150
151
152
153
154
155
156
157
153
159
160
161
162
163
164
165
166
167
163
169
170
171
172
173
174
, p)
ll=zeros(size(g) );
l2=zeros(size(g) );
l3=zeros(size(g) );
w=idwt2(gJllJl2Jl3J db7 );
w=imresize(wJ [256 256]);
axes ( handle s . axes 3) imshow(ntat2gray (w) );
title( 'Super resolved image using WZP1)
interpolated
pl=psnrg,w)
fusing WZP
pl=pl( :,; jl);
P2=pl j
save p2
set (handles .16x12,. String,pl)
1
alpha=2;
a=my_interp(g,alpha/2);
175
176
177
173
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
apply DWT
%yl=imresize( Al.,size{LH));
%y2=iinresize( A2Jsize(HL));
% y3=iinresize( A3.,size(HH));
%
bl=my_interp( Aljalpha/2);
b2=my_interp{A2J alp ha/2);
b3=my_interp{ A3 alpha/2
j
apply IWT
%Al=my_interp{ LH1,2);
%A2=my_interp{HLl,2);
%A3=my_interp{HHlJ 2);
219
220
221
222
223
224
225
226
227
22S
229
230
231
232
233
234
235
236
237
233
239
240
241
242
243
244
245
246
247
243
249
250
251
252
253
load g
rt=g;
axes ( handle s . axes4) , imshow(mat2gray(rt ) ) jtit le( ' Proposed technique ' ) ;
%p2=p5nr(g.,a)
load p2
set ( handle s .text3, 'String ,p2)
1
handles)
version of MATLAB
(see GUIDATA)
handles)
version of MATLAB
(see GUIDATA)
close all;
2
3
4
5
6
7
3
end
else
[nn] = size(A)j
9
is
li
12
13
14
15
16
17
A_ =
% columns interpolation
A_col= filter2(filter_coefjA);
for i=l:n
A_ = [A_ A( :,1) A_col( i)]j
end
A_(:Jend) = [];
% rows interpolation
A_rows = filter2{filter_coeff A_ ) ;
for i=l:m
A_inter = [A_interj A_{i.,:); A_rows{i, )]j
end
A_inter(endJ :) = [];
1
IS
19
20
21
22
23
24
end!
[M N]=size{Iflil)j
4
5
Iml=im2double{Iffll)j
Im2=im2double{Iin2);
11
% convert to doubles
mse=5um(sum((Iml-Im2).*(Iml-Im2)))/(M*N);
A=10*loglO(25S/(mse))j