Summary of the invention
In view of this, the invention reside in provides the method for removing based on the cement pavement image groove of one dimensional fourier transform, above-mentioned in the identifying of damaged road surface image to solve, and cutting is judged into by accident the problem of crack treatment.
For addressing the above problem, the invention provides the method for removing based on the cement pavement image groove of one dimensional fourier transform, comprising:
Acquisition comprises the pavement image of cutting image;
The windowing size of Fourier transform is set, determines the gray value sequence of pavement image; Wherein, described gray value sequence comprises:
n=0,1,…N-1
Wherein,
N is the width of rectangular window in the brachymemma process, l
1And l
2Be respectively sequence x
1(n) and x
2(n) number in the brachymemma scope, l
1=l
2X (n) comprises two with x
1(n) and x
2(n) carry out the sequence that continuation and brachymemma form take M as the cycle
Cycle is M=s+t;
A is the gray-scale value of described pavement image; B is the gray-scale value of cutting image; S is the number of pixels of cutting image spacing; T is the width of cutting image;
According to the gray value sequence x(n of the windowing that arranges to described pavement image) carry out Fourier transform, obtain the amplitude spectrum x (k) of its frequency spectrum;
(k=0,1,…,N-1)
In every value be at 1 o'clock, | X (k) | spectrum peak position be k=[N/M] and frequency multiplication place;
The spectrum peak of filtering cutting, and inverse fourier transform; Image behind the output filtering.
Preferably, the spectrum peak of described filtering cutting comprises:
Frequency spectrum after the stack is composed peaks uniformly-spaced to filter 10.
Method of the present invention can effectively be removed the cutting in the pavement image, avoids in the pavement detection process cutting image being mistaken for damaged road surface, improves the accuracy in detection on road surface.
Embodiment
For clearly demonstrating the scheme among the present invention, the below provides preferred embodiment and is described with reference to the accompanying drawings.
Referring to Fig. 1, Fig. 1 is the process flow diagram of the inventive method embodiment, comprising:
Step 11: the pavement image that obtains to comprise the cutting image;
The pavement image that comprises the cutting image that video recording equipment is taken, the cutting image in the pavement image is level of approximation and the straight line that runs through image, and these cuttings are equidistantly arranged, and gray scale is basic identical, therefore has in vertical direction periodically.Unified highway construction standard is followed in the cutting of cement pavement in construction, width and the spacing of cutting are all fixed, and can calculate cutting width and spacing in the correspondence image in conjunction with the parameter that gathers vision facilities.In addition, because cutting interblock space occurrence number with respect to the interior interval of group is less, and has integer relation, and is little on the periodicity impact of integral body, thereby the impact on spectral shape is little, so think that cycle of images is " cutting width and spacing distance sum " when processing.
Step 12: the windowing size of Fourier transform is set, determines the gray value sequence of pavement image;
The periodicity of cement cutting pavement image shows on the benchmark vertical direction, and establishing the cutting image spacing is s pixel, and the width of cutting image is t pixel; The gray-scale value of pavement image is A, the gray-scale value B of cutting image-region.So, x
1(n) the pixel grey scale value sequence of expression cutting interval location, i.e. the gray-scale value of pavement image is shown in (1); x
2(n) the pixel grey scale value sequence of expression cutting position is shown in (2).X (n) is with x
1(n) and x
2(n) carry out the sequence that continuation and brachymemma form take M as the cycle, shown in (3), its cycle is M=s+t.
n=0,1,…N-1 (3)
Wherein
N is the width of rectangular window in the brachymemma process, l
1And l
2Be respectively sequence x
1(n) and x
2(n) number in the brachymemma scope.
Step 13: according to the windowing that arranges the gray value sequence of described pavement image is carried out Fourier transform, obtain its frequency spectrum;
To sequence x
1(n) and x
2(n) do respectively that leaf transformation obtains X in the N point discrete Fourier
1(k) and X
2(k),
With
Be respectively x
1(n) and x
2(n) carry out the result of continuation and brachymemma take M as the cycle, it is ring shift stack afterwards, therefore according to the time-domain cyclic shift character of discrete Fourier transformation, can obtain leaf transformation X (k) in the N point discrete Fourier of sequence x (n), and then obtain the amplitude spectrum of x (n), shown in (4).
(k=0,1,…,N-1) (4)
In the cutting cement pavement, M is far smaller than the number of pixels on the image vertical direction, that is to say in sequence x (n), and M is far smaller than the rectangular window width (N) for the sequence brachymemma, and according to the natural quality of cutting, cutting number and skip number in the image are basic identical.In order to process conveniently, when the qualitative analysis of spectral characteristic, might as well establish l
1=l
2, formula (4) can be transformed to formula (5) so.
(k=0,1,…,N-1) (5)
Formula (5) has reflected the frequency domain characteristic of sequence x (n), works as in the formula
In every value be at 1 o'clock | X (k) | value larger, obvious spectrum peak is arranged, the position of therefore composing the peak is k=[N/M] and frequency multiplication place.
Step 14: eliminate the spectrum peak of cutting, and inverse fourier transform;
When eliminating the spectrum peak, adopt 10 spectrums of uniformly-spaced filtering peak best, and the frequency spectrum sequence that will eliminate behind the spectrum peak is carried out inverse fourier transform.
Step 15: the image behind the output filtering.
Only have pavement image in the filtered image, eliminated cutting.
Method of the present invention can effectively be removed the cutting in the pavement image, avoids in the pavement detection process cutting image being mistaken for damaged road surface, improves the accuracy in detection on road surface.
For the method for setting forth among each embodiment of the present invention, within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.