Upload
pi194043
View
514
Download
2
Embed Size (px)
DESCRIPTION
application of normalized convolution towards image interpolation
Citation preview
Normalizedconvolution for
Image Interpolation
Pi19404
February 4, 2014
Contents
Contents
Normalized convolution for Image Interpolation 3
0.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 | 6
Normalized convolution for Image Interpolation
Normalized convolution for
Image Interpolation
0.1 Introduction
In this article we will look at the concept for normalized convolution
for image interpolation and how a sparsely and ununiformaly sampled
grid can be used for image reconstruction.
� Convolution is a neighborhood operation.
� For 1D case,the convolution of a signal f(t) with a filter h(t) can
be expressed as
y(n) =X
k
h(k)f(n� k) (1)
� Thus result of convolution at point n is weighted sum of samples
in the neighborhood of sample point n.
� Interpolation is process of estimation of value of signal at un-
known point based on set of known points.
� Many times we require analysis of irregularily sampled data, which
is more compilated than regularily sampled data.It is often re-
quired to reconstruct the irregularily sampled signal or resample
it onto a regular grid.
� One method to do this is to use interpolation techniques obtain
a regularily sampled signal.The missing values in the regularily sam-
pled grid are computed using intepolation which is implemented
using convolution operations.
� Let us consider a signal 1D signal x(t) = [x1; 0; 0; x4; x5; 0; 0] and h(t) =[1=3; 1=3; 1=3].
� The result of convolution is given by y(t) = [x1=3; x1=3; x4=3; x4 +x5=3; x4 + x5=3; x5=3; x1=3]
� convolution can be expressed as weighted average about a local
neighborhood.
3 | 6
Normalized convolution for Image Interpolation
� In general Let x1; : : : ; xn be set of values and w1; : : : ; wn be the
associated weights
� The convolution is given by
xavg =
Piw(i)f(x� i)P
iw(i)(2)
� The convolution can be made more effective by a normalized
operation which takes into account the missing samples.One of
applications of normalized convolution which is a method of in-
terpolating irregularily sampled data points.The conceptual basis
for the method is the signal/certainty philosophy separating the
values of a signal from the certainty of the measurements.
� Normalized Convolution can, for each neighborhood of the sig-
nal, geometrically be interpreted as a projection into a subspace
which is spanned by some analysis functions
� The idea of normalized convolution is to associate each signal
with a certainty component which expresses the level of confi-
dence in the reliability of each measure of the signal.
� Certainty associated with missing samples is 0 ,while that of
known samples is 1.
� Thus we can express a map c(t) associated with signal f(t) which
has the same dimensions as the signal f(t).The certanity map
associated with a signal is simple the locations at which samples
are to be found.
� In case of the above examples the certainty map is given by
c(t) = [1; 0; 0; 1; 1; 0; 0]
� Having both signal and associated certainty map leads to main
concept behind normalized convolution
� Let us consider the convolution of certainty map by filter h(t)yc(t) = [1=3; 1=3; 1=3; 2=3; 2=3; 1=3; 1=3]
� In normalized convolution we have two distinct weights ,a cer-
tainty c(t) which is associate with the signal and applicability a(t)which is associatedd with neighborhood.
� the applicability function determines neighborhood of convolu-
tion as well as weights associated with neighborhood pixel.
4 | 6
Normalized convolution for Image Interpolation
� For 1D signals it can be expressed as
xavg =sumkf(x� k) � c(x� k) � a(k)P
k c(x� k)a(k)(3)
xavg =(fc) � x
c � a(4)
� in case of above examples we get
y(t) = [x1; x1; x4; (x4 + x5)=2; (x4 + x5)=2; x5; x1]
� This is an approximation of original signal,where components
x1; x5 have been retained while the other components are inter-
polated values in the neighborhood.
� The division of certainty matrix ensures than the signal values
remain within a valid range and is primary reason for better
performance.
� when signal value increases due to applicability function ,the cer-
tainty values also increases by the same ammount and this will
compensate for the increase in the signal values and provide
a normalized measure.This behavior is also observed when the
signal value is reduced.
� Let us consider a gaussian applicability function.Only parameter
that neeeds to be controlled is the standard deviation � of the
gaussian function and the aperture/neighborhood size of the
gaussian.
� Due to normalization property we get a much better result
than a standard convolution would yeild
� The matlab code for the 2D normalized convolution is given
below.
1 im=double(imread('lena.png'));
2 figure(1);colormap(gray);imagesc(im);
3 cert = double(rand(size(im)) > 0.8); imcert = im.*cert;
4 figure(2);colormap(gray);imagesc(imcert);
5
6 %applicability function 3x3 gaussian with variance of 1
7 x = ones(7,1)*(-3:3)
8 y = x';
9 a = exp(-(x.^2+y.^2)/4);
10 figure(3);mesh(a);
5 | 6
Normalized convolution for Image Interpolation
(a) orignal (b) sampled (c) filter
(d) gaussian interpola-
tion
(e) normalized convo-
lution
11
12 imlp = conv2(imcert, a, 'same');
13 figure(4);colormap(gray);imagesc(imlp);
14
15 %convolution with certainty map
16 G=conv2(cert,a,'same');
17
18 %normalized convolution
19 c = imlp./G;
20 figure(5);colormap(gray);imagesc(c);
6 | 6