In this paper the degraded video with blur and noise is enhanced by using an algorithm based on an iterative procedure.
In this algorithm at first we estimate the clean data and blur function using Newton optimization method and then the
estimation procedure is improved using appropriate denoising methods. These noise reduction techniques are based on
local statistics of clean data and blur function. For estimated blur function we use LPA-ICI (local polynomial
approximation - intersection of confidence intervals) method that use an anisotropic window around each point and
obtain the enhanced data employing Wiener filter in this local window. Similarly, to improvement the quality of
estimated clean video, at first we transform the data to wavelet transform domain and then improve our estimation using
maximum a posterior (MAP) estimator and local Laplace prior. This procedure (initial estimation and improvement of
estimation by denoising) is iterated and finally the clean video is obtained. The implementation of this algorithm is slow
in MATLAB1 environment and so it is not suitable for online applications. However, MATLAB has the capability of
running functions written in C. The files which hold the source for these functions are called MEX-Files. The MEX
functions allow system-specific APIs to be called to extend MATLAB's abilities. So, in this paper to speed up our
algorithm, the written code in MATLAB is sectioned and the elapsed time for each section is measured and slow
sections (that use 60% of complete running time) are selected. Then these slow sections are translated to C++ and linked
to MATLAB. In fact, the high loads of information in images and processed data in the "for" loops of relevant code,
makes MATLAB an unsuitable candidate for writing such programs. The written code for our video deblurring
algorithm in MATLAB contains eight "for" loops. These eighth "for" utilize 60% of the total execution time of the entire
program and so the runtime should be potentially decreased by considering these loops in C. However, after
implementing eighth "for" in C using the MEX library, the measured run time unexpectedly increased. According to the
timing in MEX, this runtime increscent is not because of connecting MATLAB to MEX but it is related to loops. Our
simulation shows implementation of a loop in C++ takes two times more than the same loop in MATLAB. In spite of C
functions, the OpenCV2 functions take less time, so OpenCV that is an open source computer vision library written in C
and C++ (and it is an active development on interfaces for MATLAB) would be useful for getting more speed. After
implementation the "for" loops of our algorithm using OpenCV library, our simulations show the run time decreases a
lot.
|