Summary of the invention
In order to solve the high problem of false drop rate in algorithm of target detection, introducing a kind of SVM classifier based on BING feature and carrying out goal effectiveness determination methods.Simultaneously for ensureing algorithm execution efficiency, the method for image block coupling supplemental characteristic Point matching is adopted to carry out image registration.In order to the flase drop situation existed after removing image difference, introduce the error effect that multiple image difference is brought to reduce registration.And using variform method to remove differentiated noise effect, the real-time target finally achieving motion platform detects.
Concrete technical scheme is as follows: a kind of UAV Maneuver object detection method judged based on effective target, and described object detection method application carries out target effective judgement based on the SVM classifier of BING feature.
Further, described object detection method comprises the following steps:
A) previous frame image and current frame image are carried out registration;
B) registration result and current frame image are carried out difference and edge suppresses;
C) Morphological scale-space is carried out to difference image, be communicated with target area and remove noise impact;
D) on difference image, detect target area, and target area is effectively judged, extract actual motion target area;
E) select effective exercise target at original image center and show detected image.
Further, described steps A) specifically comprise the steps: previous frame image f
i-1carry out the yardstick scaling that zoom factor is s, image f
i-1wide before convergent-divergent is w, and height is h, image f
i-1low-resolution image f after convergent-divergent
i-1 sbe widely
gao Wei
at image f
i-1 son choose and with image center be, the wide and high rectangle tR being l, wherein l value is:
wherein
for
with
in minimum value, by f
i-1 son image, the image block f in tR region
i-1 tRas the module of low-resolution image template matches, at current resolution image f
i smatching stencil f
i-1 tR, obtain at f
i sthe position (x, y) of the optimum matching of upper masterplate central point, apply offset d x and the dy on the horizontal and vertical direction between following formulae discovery two two field picture:
Compensate the translation motion of video camera according to offset d x and dy, the translation motion between repetitive operation completes successive frame compensates.
Further, described steps A) also comprise and eliminate target rotary motion, specifically comprise the steps:
1) at image f
i-1 supper extract minutiae set
2) by each unique point
map to the coordinate under original size
3) with each unique point
centered by, at image f
i-1on choose elongated for l
featurerectangle frame, the image block in frame is stored as the regions module of this unique point
4) with each unique point
centered by, at image f
ion to choose the length of side be l
rangerectangle frame as hunting zone, right
mate, find the length of side to be l
rangethe position of mating most in rectangle frame, and calculate matching degree;
5) matching degree of all Feature Points Matching is sorted, retain front 18 pairs of match points that matching degree is the highest, based on these 18 pairs of match points, calculate the homography matrix H between two two field pictures, complete the compensation to video camera roto-translation movement.
Further, in steps A) middle acquisition image f
i-1corresponding registering images
in step B) in by registering images
with current frame image f
icarry out difference, obtain difference image d
i, whether effectively detect that moving target judges to difference image, described judgement comprises the following steps:
1) to difference image d
icarry out binary conversion treatment, the gray-scale value that gray-scale value is greater than the pixel of threshold value θ is set to 255, and the gray-scale value that gray-scale value is less than the pixel of threshold value θ is set to 0, described θ=30;
2) d is calculated
ithe quantity i of middle non-zero pixels point
1;
3) if i
1be greater than d
i1% of total pixel number amount judges that this frame registration error is comparatively large, abandons carrying out target detection at this frame, if i
1be less than d
i1% of total pixel number amount proceeds next step process.
Further, described step C) to difference image d
icarry out Morphological scale-space to be communicated with target area and to remove the impact of noise in difference image, step C) in the concrete following steps that adopt target area is communicated with to get up:
(1) to difference image d
icarry out expansive working, wherein expansion size of cores is k
1* k
1, described k
1=11;
(2) carry out etching operation, wherein corroding size of cores is k
1* k
1;
(3) carry out medium filtering, wherein filter kernel is of a size of k
2* k
2, described k
2=3;
(4) carry out expansive working, wherein corroding size of cores is k
3* k
3, described k
3=9; Obtain and be communicated with target area as suspected target region, complete connection.
Further, described step D) effective judgement is carried out to target area specifically comprise the steps:
(1) movement destination image in the existing unmanned plane real scene shooting video of intercepting is as the positive sample of training, and random other images that obtain are as training negative sample, and through test, be 400-600 at positive sample size, negative sample quantity is 800-1200;
(2) extract the BING feature of all positive and negative sample images respectively, specific implementation is:
For input picture s
i, calculate s
igradient image g
i, to gradient image g
icarry out dimensional variation, obtain the gradient image g that yardstick is gx*gx
i b, described gx value is 8; To g
i bin the pixel value of all pixels be normalized and obtain BING characteristic image, described normalized threshold gt is taken as 100;
(3) the BING characteristic image adopting SVM to align negative sample image corresponding is trained, and obtains the goal effectiveness judge templet w based on BING feature;
(4) image f is extracted respectively according to the method in step (2)
iin the BING characteristic image f in all suspected target regions
i b{ j} is to criterion template w and f
i bj} carries out and computing respectively, and the quantity i of non-zero points in statistical calculation result
2if, i
2>t then thinks that this region is effective exercise target area, if i
2<t then thinks that this region is lost motion target area, and wherein t is the parameter regulating object judgement Stringency.
The present invention's advantage is compared with prior art: compare based on the moving target detecting method of motion platform with existing, the moving target detecting method that the present invention proposes has following two features:
1) verification and measurement ratio is high, and false drop rate is low, and the impact by motion platform gesture change and external interference is little;
2) each step operation amount is lower, and method is real-time.
By to a large amount of different model, different loads, different location and Different periods shooting UAV Video test, proves the method proposed achieve real-time target detection, obtain good object detection results.
Embodiment
Below from image registration, image difference, Morphological scale-space, several aspects such as effective target judgement and Comparison of experiment results analysis, are described further the present invention by reference to the accompanying drawings.
1, image registration
As shown in Figure 1, Figure 2, shown in Fig. 3, Fig. 4, Fig. 5, previous frame image f
i-1wide be w, height is h.To f
i-1carry out the scaling that zoom factor is s, the low-resolution image f after convergent-divergent
i-1 swidely be
gao Wei
through test, when s is 4, matching speed is very fast, and too much can not affect matching precision.At image f
i-1 son choose centered by image center, the wide and high rectangle tR being l.L is excessive, and can reduce matching precision, l is too small, can reduce matching speed, and therefore by repeatedly testing, l can use following formulae discovery to obtain
Wherein min (x, y) represents the minimum value calculated in x and y.By f
i-1 son image, the image block f in tR region
i-1 tRas the template of low-resolution image template matches.At current low-resolution image f
i smatching template f
i-1 tR.Obtain at f
i sthe position (x, y) of the optimum matching of cope match-plate pattern central point.Use offset d x and dy in the horizontal and vertical directions between following formulae discovery two two field picture.
In image size reduction extremely
time use central area template matches to compensate the translation motion of video camera fast.By repeat this operation can to realize successive frame between translation motion compensate.
Following flow process is adopted to carry out the coupling of high-resolution and eliminate target rotary motion.
(1) at image f
i-1 supper extract minutiae set
(2) by each unique point
map to the coordinate under original size
(3) with each unique point
centered by, at image f
i-1on to choose the length of side be l
featurerectangle frame, the image block in frame is stored as the region template of this unique point
(4) with each unique point
centered by, at image f
ion to choose the length of side be l
rangerectangle frame as hunting zone.Right
mate, find the length of side to be l
rangethe position of mating most in rectangle frame, and calculate matching degree.The calculating of matching degree adopts common technology means of the prior art to realize, and such as calculate according to the difference of pixel gray-scale value and input point gray-scale value, the less matching degree of difference is higher.
(5) matching degree of all Feature Points Matching is sorted, retain front 18 pairs of match points that matching degree is the highest.
Based on these 18 pairs of match points, calculate the homography matrix H between two two field pictures.Complete the compensation to video camera roto-translation movement.The calculating of homography matrix can adopt RANSAC algorithm to reject Mismatching point further, obtains comparatively accurate homography matrix.After rejecting Mismatching point, if when the internal point quantity participating in calculating is greater than 4, a relatively accurate homography matrix can be calculated.This matrix can represent translation between two frames, rotation and perspective relation.
Wherein l
feature=8, l
range=16 achieve good effect in reality test, and the number of selected characteristic point can be determined according to hardware performance, and the computer that configuration is higher can select the unique point of about 200; Embedded device can be chosen the unique point of about 100.By the calculating of this homography matrix, one can be provided comparatively accurately and less hunting zone when following the tracks of.More accurately less hunting zone can the tracking more stable more fast of realize target.
2, image difference
Image f is obtained in previous step
i-1corresponding registering images
by registering images
with current frame image f
icarry out difference.Because unmanned plane attitudes vibration degree in flight course is different, when attitudes vibration is violent, also can there is larger error in process of image registration, needs to carry out edge to difference image and suppress to reduce the impact of Images Registration for testing result.
Specific implementation process is extract image f respectively
i-1gradient image, carry out the difference image d obtained with computing in this process after inverse is carried out to gradient image again with difference image
i.In some cases, because the result error of image registration is comparatively large, the d generated is caused
imiddle flase drop region is very large.Effectively moving target cannot be detected by difference image in this case, so add one at this to judge that link step is as follows:
(1) to difference image d
icarry out binary conversion treatment, the gray-scale value that gray-scale value is greater than the pixel of threshold value θ is set to 255, the gray-scale value that gray-scale value is less than the pixel of threshold value θ is set to 0, and arranging of threshold value θ needs to try one's best filtering noise while reservation target completeness, chooses empirical value θ=30 in an experiment;
(2) d is calculated
ithe quantity i of middle non-zero pixels point
1;
(3) if i
1be greater than d
ithink that this frame registration error is comparatively large, abandon carrying out target detection at this frame for 1% of total pixel number amount.If i
1be less than d
i1% of total pixel number amount proceeds next step process.