APP下载

Study on improved algorithm for estimation of motion blur direction based on radon transform

2018-07-23QiuxiangLIAOZaishengLU

机床与液压 2018年12期

Qiu-xiang LIAO, Zai-sheng LU

(Guangxi Colleges and Universities Key Laboratory of Image Processing and Intelligent Information Systems, Wuzhou University, Wuzhou 543002, China)

Abstract: Restoration of motion blurred images has practical significance in astronomy, military affairs, industrial control, road monitoring and criminal investigation. Estimation of PSF (Point Spread Function) is a key and difficulty in the study for restoration of motion blurred images. This paper carried out Fourier transform for motion blurred images to obtain a frequency spectrum diagram with bright and dark stripes. Based on the direction of bright stripes and the principle that the motion blur direction is vertical, the direction of the bright stripes in the frequency spectrum diagram could be obtained through Radon transform, thus the motion blur direction in PSF could be obtained. The cross-shaped bright line in the frequency spectrum diagram of blurred image could directly affect the accuracy of the experiment results. This paper analyzed the cause of the cross-shaped bright line, and put forward a simple and effective algorithm to remove the interference of the cross-shaped bright line. The experimental results indicate that the proposed algorithm is simple and effective, and it could accurately determine the blur direction through measurement with the error less than 1°.

Key words:Point spread function, Spectrum analysis, Degeneration, Radon transform, Cross bright line, Motion blur direction

1 Introduction

During photo shooting or photography, the image blur caused by relative motion of a camera or shot object at the exposure instant is called as motion blur [1]. Restoration of motion blurred images is of very important realistic significance in aspects such as astronomy, military affairs, industrial control, road monitoring and criminal investigation. At present, research on restoration of motion blurred images mainly focuses on the idea that a motion blurred image is generated after linear spatial filtering of a clear image; a degradation model of the blurred image is established; finally, a point spread function could be obtained through estimation, and Winer filtering of the self-correlation function is used to recover the image. During the whole research, estimation of the point spread function (PSF) is a key and difficult point [2]. PSF contains two parameters, i.e., motion blur direction and blur scale. The blur direction is deemed as the included angle between the image motion direction and the horizontal direction. The blur scale refers to the distance of pixel motion in the motion direction. In general, the larger blur scale is corresponding to the larger image blur degree [3]. A lot of domestic scholars made many studies on the accurate estimation of the point spread function (PSF). Reference [4] conducted first order differential computation to the blurred image by using Radon transform and Sobel operator, wherein the absolute error of blur direction could be controlled within 2°. The algorithm failed to achieve ideal estimation of a low SNR image. Reference [5] obtained the blur direction by using the Radon transform and obtained the blur scale through image spectrum analysis. However, the method only focused on the estimation under the condition of no noise interference. When external noise interference exists, the accuracy and effectiveness of the estimation results could be reduced. Reference [6] estimated the blur scale through threshold division of a frequency spectrogram based on the global mean standard deviation method, but the selection of thresholds was complicated. This paper adopts Radon transform to obtain the motion blur direction in the point spread function (PSF) and conducts principle analysis of reasons for generation of cross-shaped bright lines in the measurement results, and puts forward an algorithm to eliminate interference of cross-shaped bright lines. It is verified in the experimental results that the proposed algorithm is simple and effective.

2 Degradation model and frequencyspectrum characteristic analysis ofmotion blurred image

The key point of image restoration is the establishment of a degradation model. As shown in Fig.1, the degradation functionh(x,y) is used to model the degradation course. If the additive noisen(x,y) is added on the input imagef(x,y), the combined information will generate a degraded imageg(x,y).

Fig.1 The image degradation model

In Fig.1,h(x,y) involves the whole physical process of degradation. This is the degradation mathematic model function to be found and also the point spread function (PSF) to be estimated.

IfHis linear and spatially unchanged, the degradation image in the spatial domain can be obtained by equation (1) as follows:

g(x,y)=h(x,y)*f(x,y)+n(x,y)

(1)

Where, sign* denotes the convolution, and the multiplication of convolution of the spatial domain and the frequency domain constitute a Fourier transform pair. Hence, from the perspective of frequency domain, Equation (1) can be expressed by equation (2).

G(u,v)=H(u,v)F(u,v)+N(u,v)

(2)

Motion blur caused by horizontal uniform linear motion will be discussed in the next content. Noise is set to ben(x,y)=0.

It is assumed that the imagef(x,y) has planar motion. Variation components of its motion in direction x and direction y are set asx0(t) andy0(t), respectively. Motion time is set as T. The integral for the period from shutter opening to shutter closing is equal to the total exposure of the medium. Hence, the blurred image is as follows:

(3)

(4)

This is the continuous function model of motion blurred image. Aiming at the discrete image, discretization is conducted to equation (4).

(5)

In the above equation,Ldenotes the totally rounded pixel quantity of object motion on the photo. Δtdenotes the time factor of each pixel influencing the image blur. It can be deduced from the above equation that the pixel value of motion blurred image is the superposition of products of the corresponding pixel value of original image and the corresponding time.

On the physical sense, the motion blurred image is generated after a series of time delays of the same object in an image and the accumulation of the time delays. In turn, a clear image could be simulated into a horizontal uniform motion blurred image by using the following equation:

(6)

Fourier transform is conducted to Equation (4) and then the following equation could be obtained:

(7)

According to Equation (2), the following formula can be obtained:

(8)

The image size is set asN×M. Equation (8) is discretized, so that its degradation function could be obtained:

(9)

Hence,H(u,v) is a sine function. It is set thatμa+νb=n. Whenn=0 is satisfied, the maximum value could be taken forH(u,v). When n is a none-zero integer,H(u,v)=0 could be satisfied, andG(u,v)=0 will be satisfied as well. In other words, parallel stripes in a bright-dark alternate manner would appear in the frequency spectrum of motion blurred image. Experiments are conducted on some images. Experimental results show that bright stripes in the frequency spectrogram of the motion blurred image are perpendicular to the blur direction. This conclusion was also mentioned in References [3,7-8]. Fig.2 displays an original image and a motion blurred image in the experiment (here, the blur direction is set as 30°, and the blur scale is 20 pixels).

Fig.2 Clear image and motion blurred image

Fig.3 compares the frequency spectrogram of motion blurred image directly treated by Fourier transform and the frequency spectrogram obtained after compression and center alignment of it.

Fig.3 Frequency spectrogram comparison of motion blurred image

According to time-domain features of Fourier transform, one can find that bright stripes are perpendicular to the blur direction. Hence, in order to detect the motion blur direction parameter in PSF, one only needs to detect the direction of bright stripes in the frequency spectrogram.

3 Estimation of motion blur directionbased on radon transform

In order to detect the direction of bright lines in a frequency spectrogram, most references at earlier stages adopted Hough transform to detect the direction of bright lines, such as References [9-10]. Hough transform could be directly applied to a binary image, so that binary segmentation could hardly be conducted appropriately to an image in actual processing. Hence, in general, Radon transform is more exquisite and accurate than Hough transform. The present paper will detect the direction of bright lines in frequency spectrogram based on Radon transform.

3.1 Theories of Radon transform

Under the two-dimensional circumstance, Radon transform could be roughly understood as follows: linear integration is conducted to the functionf(x,y) along straight lines with different directions in a plane (vertical distance between the straight line and the origin point is set asρ, its direction angle is set asθ). The obtained resultR(θ,ρ) is the Radon transform of functionf(x,y). Its definition form is as follows:

(10)

Schematic diagram of Radon transform definition is shown in Fig.4.

Fig.4 Schematic diagram of Radon transform definition

Radon transform is equivalent to projection of an image in space of polar coordinates (ρ,θ). With regard to a point in the space of polar coordinates (ρ,θ) corresponding to a straight line in rectangular coordinate space, Radon transform represents an integral of the image pixel point on each straight line. Hence, straight lines with high grey levels in the image are corresponding to bright spots in the (ρ,θ) space; straight lines with low grey levels are corresponding to dark spots in the (ρ,θ) space. Hence, detection of straight lines in the original image could be converted to detection of bright spots and dark spots in the space of polar coordinates (ρ,θ).

3.2 Estimation algorithm for motion blur direction

Two-dimensional Fourier transform is conducted to a motion blurred image, so that its frequency spectrogram can be obtained. After compression and center alignment of the frequency spectrogram, Radon transform of 1-180° is conducted to the frequency spectrogram. Finally, a matrixRwith 180 columns could be obtained. In matrixR, the value of each column is the projection value of the frequency spectrogram in one direction along a group of linear integrals. When Radon transform is conducted in the motion blur direction, a maximum value will exist in projection vectors as bright and dark stripes in the frequency spectrum are parallel to the integral straight line. The maximum value is also the maximum value in the whole matrix. The motion direction can be obtained by finding the column in which the maximum value of R matrix. In the experiments, a lena (size of 512×512) picture was used for simulation. Experimental results are shown in the Table 1.

Table 1 Experimental results of blur scaleL=50

Set motion direction value (unit is °)Measured value (unit is °) Error2590Wrong2626030300353504041145450505005555060600646406590Wrong

In the experiments, the blur scale was further increased to 52, 55, 58, 60, 70, 100, 150, 200 and 500, respectively. With the increase of blur scale, the measurement scope could be expanded to 25°-66°, while no obvious influence was brought. By analyzing the experimental results shown in Table 1, one can find that the motion direction of motion blurred image could be measured accurately when the motion direction ranged within 26°~64°. The maximum error was only 1°, which indicates the high accuracy. However, the results would be wrong when the motion direction was not within 26°~64°, wherein the mistakes of 90° or 180° would appear. The reason is that the cross-shaped bright lines appeared in the frequency spectrogram, bringing interference. The following diagram displays the motion blurred image of Lena (LEN=20, blue angle set as 30°), as well as its frequency spectrogram obtained after compression and center alignment.

Fig.5 Motion blurred image and its frequency spectrogram

4 Reasons and processing algorithm for generation of cross-shaped bright lines

According to equation (1), if the complete convolution exists between the blur convolution kernelh(x,y) and the original imagef(x,y), the size of the obtained motion blurred imageg(x,y) should be bigger than that off(x,y). However, the imaging space of a camera is unchanged during actual imaging, so that some edges around the obtained blurred image would be cut off in comparison with the actual blurred image. Due to the edge breaking, the convolution relation around the edges will be damaged, so that the degradation course is not a complete convolution. Finally, cross-shaped bright lines will appear in the centralized frequency spectrogram [8].

Existence of cross-shaped bright lines could directly influence experimental results, so it is necessary to treat them. In Reference [8], partitioned threshold assignment was used to avoid interference from cross-shaped bright lines, but no fixed algorithm was provided for selection of thresholds. In Reference [11], self-adaptive morphological filtering was conducted to a binary frequency spectrogram. The algorithm was complicated. In Reference [12], a slide domain method was used to obtain the mean value of grey levels of pixels in 8 neighborhoods of each pixel in the frequency spectrogram, so as to eliminate interference of cross-shaped bright lines on this basis. Nevertheless, the method is only applicable to a frequency spectrum treated by binary conversion. The frequency spectrum could be deleted easily, so detection accuracy could be influenced. In Reference [13], positions of cross-shaped bright lines were determined according to the image size; then, whether horizontal and vertical bright lines were cross-shaped bright lines caused by stripes in the image was judged according to widths of the bright lines. If the bright line was the cross-shaped bright line caused by stripes in the image, the dominant grey level would be assigned to the pixel value, so that the cross-shaped bright line could be eliminated. The algorithm proposed by the paper is an improvement of Reference [13].

The 90° or 180° would appear in the computation results due to the cross-shaped bright lines. Hence, a judgment could be set in the program: when 90° or 180° appears in the result, it would be assigned with “zero” value; after the assignment, the maximum value of the newRmatrix would be searched. In this way, interference brought by cross-shaped bright lines to the results could be avoided. Experimental results are shown in Table 2.

As shown in Table 2, the interference of cross-shaped bright lines is avoided after the algorithm improvement; the original experimental accuracy will not be influenced; the error is controlled within 1°. The algorithm is simple, effective and easy to implement.

Fig.6 shows the comparison of experimental results.

Table 2 Experimental results of the improved blur scaleL=50 algorithm

Set motion direction value (unit is °)Measure value (unit is °)Error25250262603030035350404114545050500555506060064640656507575080800100100013013001501500

Fig.6 Comparison of experimental results

5 Conclusion

This paper conducted two-dimensional Fourier transform to the motion blurred image so as to obtain its frequency spectrogram and the theoretical analysis for the principle has been performed that parallel bright and dark stripes in the frequency spectrogram are perpendicular to the blur direction-a point spread function (PSF) parameter. The direction of bright strips could be obtained based on Radon transform, so that the blur direction-an important parameter of PSF could be solved. Due to interference from cross-shaped bright lines in the frequency spectrogram, the experimental results could be limited in a small scope. The paper proposed an algorithm to eliminate interference of cross-shaped bright lines. It has been verified in the experimental results that the proposed algorithm can effectively avoid interference of cross-shaped bright lines in a simple and effective manner.

Acknowledgements

Supported by National Natural Science Foundation of China (No.61562074), Foundation of Young and Middle-aged Core Teacher Training Program of Wuzhou University, funded by the basic ability improvement project of young and middle-aged teachers in guangxi colleges in 2018(No.2018KY0542), funded by the research project of wuzhou university (No.2017B006).


登录APP查看全文