A kind of expansion method for tracking target based on geometric proportion relation
Technical field
The present invention relates to a kind of motor-driven expansion method for tracking target, particularly one is followed the tracks of motor-driven expansion order calibration method according to geometric proportion relation, is mainly used in image processing, computer vision.Belong to target detection tracing technical field in photoeletric measuring system.
Background technology
In photoeletric measuring system, in order to improve tracking accuracy, the visual field of detector is all smaller, and target size is bigger than normal again.Therefore in detector, target presents the form of expansion.Distant object imaging, because the degraded factors such as the aberration of atmospheric turbulence, thrashing and optical system cause target very fuzzy in the imaging of system, poor contrast; In addition, target is without texture information, different, without characterizing and identification clarification of objective information.Target also exists attitude to change obvious feature, and along with the variation of targeted attitude, trace point also can drift about thereupon.Choosing stable unique point and carry out locking tracking, is a great problem that expansion target following faces.
At present, the conventional algorithm for expansion target is coupling, comprises the coupling of the aspect such as gray scale, feature.Due to the motion of target, may there is the variations such as size, shape, attitude in target, add the various interference such as background, illumination, and image is processed the precision problem of minimum measurement unit, coupling is followed the tracks of and be can not get definitely best matched position, and this can bring the drift of trace point.Because target is without texture and notable feature information, attitude changes greatly, and traditional tracking based on gray feature is easy of losing target in the time that target occurs that larger attitude changes, for this situation, there is again afterwards adopting skeletal extraction feature point tracking expansion target.Although this method can be processed the situation that attitude changes, but, for this class expansion target of aircraft, when target occurs in the time blocking (as vertical with imaging surface with wing place plane in fuselage), the simple method that relies on skeletal extraction can not be obtained fuselage or wing place axis, thereby cause trace point to be lost, can not meet actual needs.Therefore in the urgent need to studying the engineering application demand of new method to adapt to follow the tracks of.
Summary of the invention
The technology of the present invention is dealt with problems: for the deficiencies in the prior art, a kind of expansion method for tracking target based on geometric proportion relation is provided, from in essence by out abstract the geometry information of motor-driven expansion target, simultaneously according to known prior imformation, according to certain geometric proportion relation, realize target is at larger attitude variation and the tenacious tracking under circumstance of occlusion.
For realizing such object, technical scheme of the present invention: a kind of expansion method for tracking target based on geometric proportion relation, comprises the steps:
Step 1, image pre-service: adopt Gaussian smoothing filtering to process pending image, remove the impact of noise, obtain filtered smoothed image;
Step 2, use Fuzzy C-Means Cluster Algorithm FCM(Fuzzy C-Means Cluster) step 1 is obtained level and smooth after Image Segmentation Using, obtain bianry image;
Step 3, the image that utilizes the method for skeletal extraction to obtain step 2 are processed, and extract the skeleton point on aircraft;
Step 4, the skeleton point obtaining according to step 3, choose frame head and tail unique point according to certain rule, is calculated to be the length of image planes middle machine body;
In step 5, known reality, head is to the proportionate relationship of fuselage and wing intersection point and fuselage length, and the fuselage length of obtaining according to step 4 is calculated to be image planes middle machine body and wing intersection point;
Step 6, intersection point that step 5 is obtained are in conjunction with interframe continuity correction trace point position, and last trace point is trace point in present frame.
Wherein, in described step 2, use Fuzzy C-Means Cluster Algorithm FCM(Fuzzy C-Means Cluster) step 1 is obtained level and smooth after Image Segmentation Using, the method that obtains bianry image is:
Step (21), initialization: given cluster classification is counted C=2 in C(the present invention), set iteration stopping threshold epsilon, initialization fuzzy partition matrix U
(0), iterations l=0, Fuzzy Weighting Exponent m (m=2 in the present invention);
Step (22), by U
(l)substitution formula (5), calculates cluster centre matrix V
(l):
Wherein n is number of pixels to be clustered, and m is FUZZY WEIGHTED index, and c is cluster classification number, u
ikfuzzy classification matrix U while being the l time iteration
(l)in the capable k column element of i, x
kfor k pixel value in image to be clustered, v
icluster centre matrix V while being the l time iteration
(l)in i cluster centre value;
Step (23), according to formula (6), utilize V
(l)upgrade U
(l), obtain new fuzzy classification matrix U
(l+1):
Wherein d
ikfor the Euclidean distance of k element and i cluster centre in image to be clustered, d
jkfor the Euclidean distance of k element and j cluster centre in image to be clustered;
Step (24) if || U
(l)-U
l+1|| < ε, iteration stopping.Otherwise, put l=l+1, return to step (22);
Step (25), calculate the Euclidean distance of the cluster centre value that each pixel distance above-mentioned steps (21)-(24) in image to be clustered obtain, the pixel value nearest apart from cluster centre is set to 1, otherwise is set to 0, the bianry image after being cut apart thus.
Wherein, in described step 3, the image that utilizes the method for skeletal extraction to obtain step 2 is processed, and extracts the skeleton point on aircraft, and the present invention adopts successively the iterative refinement algorithm of cancellation frontier point to extract skeleton, and algorithm is as follows:
If known target point is labeled as 1, background dot is labeled as 0, and definition frontier point is that itself is labeled as 1, and in its 8-connected region, has at least a point to be labeled as 0 point.Algorithm is considered the 8-neighborhood centered by frontier point, and note central point is p
1, 8 points of its neighborhood are designated as respectively p around central point clockwise
2, p
3..., p
9, wherein p
2at p
1top;
Comprise frontier point carried out to two step operations:
(3.1) mark meets the frontier point of following condition simultaneously:
(3.1.1)2≤N(p
1)≤6;
(3.1.2)S(p
1)=1;
(3.1.3)p
2·p
4·p
6=0;
(3.1.4)p
4·p
6·p
8=0;
Wherein N (p
1) be p
1non-zero adjoint point number, S (p
1) be with p
2, p
3..., p
9, p
2the number of the value of these points from 0 → 1 during for order.When to after all boundary point check, by all marks point remove.(42) mark meets the frontier point of following condition simultaneously:
(3.2) mark meets the frontier point of following condition simultaneously:
(3.2.1)1≤N(p
1)≤6
(3.2.2)S(p
1)=1;
(3.2.3)p
2·p
4·p
8=0;
(3.2.4)p
2·p
6·p
8=0;
Above two steps operations form an iteration, algorithm iterate until not point meet again flag condition, at this moment remaining some composition skeleton point.
Wherein, in described step 4, the skeleton point obtaining according to step 3, chooses frame head and tail unique point according to certain rule, is calculated to be the length of image planes middle machine body, and its method is:
Skeleton end points in the skeleton point that step (41), determining step three obtain, calculates its position;
Step (42), the skeleton end points obtaining for step (41), be considered as head and tail unique point (head is on a left side) by minimum horizontal ordinate and maximum end points;
Step (43), the head and the tail unique point that obtain according to step (42), calculate this 2 distances in imaging surface according to Euclidean distance, is also the fuselage length in imaging surface;
Wherein, in described step 5, whole word changes into above: in described step 5, suppose in body axis system, head place place is labeled as an A, and fuselage and wing place crossing point of axes are labeled as B, tail place place is labeled as C, the ratio of the length of known AB and AC length, the fuselage length of obtaining according to step 4 is calculated to be image planes middle machine body and wing intersection point, and its method is:
The ratio of the length of known above-mentioned AB and AC length is R, and in the imaging surface being obtained by step (42), head and tail unique point coordinate are respectively (x
h, y
h), (x
t, y
t), desired fuselage and wing point of crossing coordinate are (x
c, y
c), take head on a left side as example, can obtain according to the geometric proportion relation between line segment:
Can obtain thus, fuselage and wing point of crossing transverse and longitudinal coordinate are respectively suc as formula shown in (8) and formula (9):
x
c=x
h+R·(x
t-x
h) (8)
y
c=y
h+R·(y
t-y
h) (9)
Wherein, in described step 6, the intersection point that step 5 is obtained is in conjunction with interframe continuity correction trace point position, and last trace point is trace point in present frame.The trace point position that previous frame obtains is P
o, the position of intersecting point obtaining according to step 5 in present frame is P
n, as follows according to trace point method in interframe continuity correction present frame:
P
c=(1-α)·P
o+α·P
n (10)
Wherein, α is modifying factor, and the present invention gets 0.95, P
cfor the trace point position through revised present frame.
The present invention's beneficial effect is compared with prior art:
(1) the present invention adopts the method for skeletal extraction to obtain the architectural feature point on Aircraft Targets to the image after cutting apart, and has solved traditional dependence gray-scale value and has carried out the problem that feature point extraction causes poor robustness.
(2) the present invention, according to certain Rule Extraction head and wing unique point from the skeleton point extracting, has solved traditional gray scale angle point and has extracted the problem of operator to illumination and attitude sensitive.
(3) the invention provides a kind of motor-driven expansion method for tracking target that utilizes geometric proportion relation, compared with the method for carrying out aircraft tracking with the skeleton point of simple dependence extraction, the present invention has incorporated the aircraft geometry information of priori, obtain aircraft according to this geometry constant rate and change the trace point under blocking more greatly and certainly in attitude, solve aircraft the problem that trace point is lost in the time blocking (as vertical with imaging surface with wing place plane in fuselage) occurs, realized aircraft and changed the tenacious tracking under blocking more greatly and certainly in attitude.
Accompanying drawing explanation
Fig. 1 is the inventive method realization flow figure;
Fig. 2 is the present invention carries out track and localization result to the 1st two field picture of sequence used;
Fig. 3 is the present invention carries out track and localization result to the 86th two field picture of sequence used;
Fig. 4 is the present invention carries out track and localization result to the 215th two field picture of sequence used;
Fig. 5 is the present invention carries out track and localization result to the 945th two field picture of sequence used;
Fig. 6 is that the present invention follows the tracks of the each trace point geometric locus obtaining to sequence used.
Embodiment
Below in conjunction with accompanying drawing, embodiments of the invention are elaborated.The present embodiment is implemented under take technical solution of the present invention as prerequisite, provided detailed embodiment and concrete operating process, but protection scope of the present invention is not limited to following embodiment.
The present invention is based on a kind of expansion method for tracking target based on geometric proportion relation, input picture is single station flash ranging model plane image sequence.
As shown in Figure 1, the invention provides a kind of expansion method for tracking target based on geometric proportion relation, comprise following steps:
Step 1, image pre-service.Due to the defect of illumination or imaging system, the pending image obtaining can be subject to the impact of noise, thereby affects follow-up processing.Therefore,, before carrying out follow-up Processing Algorithm, pending image is carried out to pre-service.This method adopts Gaussian smoothing filtering to remove the impact of noise, obtains filtered smoothed image.
Step 2, use Fuzzy C-Means Cluster Algorithm FCM(Fuzzy C-Means Cluster) step 1 is obtained level and smooth after Image Segmentation Using, obtain bianry image.In essence, to cut apart be a process of pixel being classified based on certain attribute to image.The property complicated and changeable of natural image has determined that it is uncertain that many pixels belong in the problem of which cluster at it, thereby considers that from the angle of fuzzy clustering image ratio of division is more reasonable.Fuzzy C-Means Cluster Algorithm (FCM, Fuzzy C-Means Cluster) be from hard C mean algorithm (HCM, Hard C-Means Cluster) develop, its essence is a kind of nonlinear iteration optimization method of based target function, the Weighted Similarity in objective function employing image between each pixel and each cluster centre is estimated.The task of FCM algorithm is exactly by iteration, selects a rational fuzzy membership matrix cluster centre, makes objective function reach minimum, thereby obtains optimal segmentation result.
Fuzzy C-Means Cluster Algorithm is divided by the iteration optimization of objective function is realized to set, and it can express the degree that each pixel of image belongs to a different category.If n is pixel count to be clustered, c is classification number (c=2 in the present invention), and m is FUZZY WEIGHTED index (getting m=2 in the present invention), and it controls degree of membership all kinds of shared degree.The value of objective function is that in image, each pixel, to the weighted sum of squares of C cluster centre, can be expressed as:
Wherein, u
ikbe the degree of membership of k pixel to i class, d
ikbe the distance of k pixel to i class, U is fuzzy classification matrix, and V is cluster centre set.
Clustering criteria will be sought best group exactly to (U, V), makes J
m(U, V) minimum.J
mminimization can be realized by iterative algorithm below:
(2.1) initialization: given cluster classification is counted C=2 in C(the present invention), set iteration stopping threshold epsilon, initialization fuzzy partition matrix U
(0), iterations l=0, Fuzzy Weighting Exponent m (m=2 in the present invention);
(2.2) by U
(l)substitution formula (12), calculates cluster centre matrix V
(l):
Wherein n is number of pixels to be clustered, and m is FUZZY WEIGHTED index, and c is cluster classification number, u
ikfuzzy classification matrix U while being the l time iteration
(l)in the capable k column element of i, x
kfor k pixel value in image to be clustered, v
icluster centre matrix V while being the l time iteration
(l)in i cluster centre value;
(2.3) according to formula (13), utilize V
(l)upgrade U
(l), obtain new fuzzy classification matrix U
(l+1):
Wherein, d
ikfor the Euclidean distance of k element and i cluster centre in image to be clustered, similarly, d
jkfor the Euclidean distance of k element and j cluster centre in image to be clustered;
(2.4) if || U
(l)-U
l+1|| < ε, iteration stopping.Otherwise put l=l+1, return to step (2.2);
(2.5) calculate the Euclidean distance of the cluster centre value that each pixel distance above-mentioned steps (2.1)-(2.4) in image to be clustered obtain, the pixel value nearest apart from cluster centre is set to 1, otherwise is set to 0, the bianry image after being cut apart thus.
Experiment is found, adopts fuzzy C-means clustering method to cut apart image and can obtain than the better effect of method that adopts Threshold segmentation, especially obvious to natural image.This is because natural image is complicated and changeable, level complexity, and each pixel belongs to the definite boundary of which kind of neither one.The degree that fuzzy C-means clustering belongs to each pixel which kind of shows with the form of probability, and directly think unlike hard C mean cluster (HCM) method that each pixel determines which kind of belongs to, therefore fuzzy C-means clustering method is cut apart to the property complicated and changeable that can better embody natural image for image.
Step 3, the image that utilizes the method for skeletal extraction to obtain step 2 are processed, and extract the skeleton point on aircraft.Skeleton has the topological sum shape information identical with the original, can effectively describe object, is a kind of geometric properties of function admirable.The method that realizes skeletal extraction has multiple thinking, and Medial-Axis Transformation (medial axis transform, MAT) is the more effective technology of one.But the method need to be calculated the distance of all frontier points to All Ranges internal point, calculated amount is very large.Therefore, the present invention adopts successively the iterative refinement algorithm of cancellation frontier point to extract skeleton.
If known target point is labeled as 1, background dot is labeled as 0.Definition frontier point is that itself is labeled as 1, and in its 8-connected region, has at least a point to be labeled as 0 point.Algorithm is considered the 8-neighborhood centered by frontier point, and note central point is p
1, 8 points of its neighborhood are designated as respectively p around central point clockwise
2, p
3..., p
9, wherein p
2at p
1top.
Algorithm comprises frontier point is carried out to two step operations:
(3.1) mark meets the frontier point of following condition simultaneously:
(3.1.1)2≤N(p
1)≤6;
(3.1.2)S(p
1)=1;
(3.1.3)p
2·p
4·p
6=0;
(3.1.4)p
4·p
6·p
8=0;
Wherein N (p
1) be p
1non-zero adjoint point number, S (p
1) be with p
2, p
3..., p
9, p
2the number of the value of these points from 0 → 1 during for order.When to after all boundary point check, by all marks point remove.
(3.2) mark meets the frontier point of following condition simultaneously:
(3.2.1)1≤N(p
1)≤6
(3.2.2)S(p
1)=1;
(3.2.3)p
2·p
4·p
8=0;
(3.2.4)p
2·p
6·p
8=0;
Above two steps operations form an iteration, algorithm iterate until not point meet again flag condition, at this moment remaining some composition skeleton point.
Step 4, the skeleton point obtaining according to step 3, choose frame head and tail unique point according to certain rule, is calculated to be the length of image planes middle machine body, and method is as follows:
(4.1) the skeleton end points, in the skeleton point that obtains of determining step three, calculates its position.Its rule is that all skeleton points that obtain for step 3, if only have a skeleton point in its eight neighborhood, judge that this point is skeleton end points;
(4.2), the skeleton end points that obtains for (4.1), minimum horizontal ordinate and maximum end points are considered as to head and tail unique point (head is on a left side);
(4.3), according to (4.2) obtain head and tail unique point, calculate this 2 distances in imaging surface according to Euclidean distance, be also the fuselage length in imaging surface;
Step 5, suppose in body axis system, head place place is labeled as an A, and fuselage and wing place crossing point of axes are labeled as B, and tail place place is labeled as C, the ratio of the length of known AB and AC length, the fuselage length of obtaining according to step 4 is calculated to be image planes middle machine body and wing intersection point.For the different aircraft of specific model, the geometry of itself is similar.No matter which kind of attitude occurs aircraft change, this specific geometric relationship is constant.The invention reside in and probe into so a kind of unchangeability, thereby solve the aircraft problem that trace point is lost under larger attitude variation and circumstance of occlusion.Method according to these geometric proportion Relation acquisition tenacious tracking points is as follows:
The ratio of the length of known above-mentioned AB and AC length is R, and in the imaging surface being obtained by step (4.2), head and tail unique point coordinate are respectively (x
h, y
h), (x
t, y
t), desired fuselage and wing point of crossing coordinate are (x
c, y
c), take head on a left side as example, can obtain according to the geometric proportion relation between line segment:
Can obtain thus, fuselage and wing point of crossing transverse and longitudinal coordinate are respectively suc as formula shown in (15) and formula (16):
x
c=x
h+R·(x
t-x
h) (15)
y
c=y
h+R·(y
t-y
h) (16)
Wherein, in described step 6, the intersection point that step 5 is obtained is in conjunction with interframe continuity correction trace point position, and last trace point is trace point in present frame.The trace point position that previous frame obtains is P
o, the position of intersecting point obtaining according to step 5 in present frame is P
n, as follows according to trace point method in interframe continuity correction present frame:
P
c=(1-α)·P
o+α·P
n (17)
Wherein, α is modifying factor, and the present invention gets 0.95, P
cfor the trace point position through revised present frame.
In order to verify the robustness of the inventive method, experiment adopts model plane image sequence, totally 1321 frames, and the intercepting tracking results that wherein the 1st frame, the 86th frame, the 215th frame and the 945th two field picture obtain is respectively as shown in Fig. 2,3,4,5.In figure, three grey rectangle frames are the tracking frame being respectively centered by head, fuselage and wing intersection point and tail unique point, and the grey cross at rectangle frame center represents last head, fuselage and wing intersection point and the tail unique point of extracting.As can be seen from the figure, when target generation attitude changes (driftage, pitching and rolling, as shown in Figure 2 and Figure 5) time, utilize the method for skeletal extraction can accurately obtain stable head and tail unique point, utilize geometric proportion relation can obtain the intersection point of fuselage and wing simultaneously; When target occurs, from blocking, (fuselage is vertical with imaging surface with wing place plane, as shown in Figure 3 and Figure 4) time, as long as can extract fuselage place axis, still can arrive according to head the constant rate of fuselage and wing intersection point and fuselage length, obtain stable trace point position, change the tenacious tracking greatly and under circumstance of occlusion thereby realize aircraft in attitude.
In order to verify the stability of the inventive method, experiment is tested totally to front 400 frames of above-mentioned model plane image sequence (1321 frames), Fig. 6 is that fuselage and the positioning error of wing intersection point between consecutive frame are respectively along the curve of X and Y-direction, stdx is the interframe error standard deviation of trace point along directions X, and stdy is the interframe error standard deviation of trace point along directions X.As can be seen from the figure, trace point is all less than a pixel along the error to standard deviation of X and Y-direction respectively, when target occurs, from blocking, (fuselage is vertical with imaging surface with wing place plane, as shown in Figure 3 and Figure 4) time, still can obtain the intersection point of fuselage and wing, thereby realize the tenacious tracking under blocking.
Non-elaborated part of the present invention belongs to those skilled in the art's known technology.
Those of ordinary skill in the art will be appreciated that, above embodiment is only for the present invention is described, and be not used as limitation of the invention, as long as within the scope of connotation of the present invention, the above embodiment is changed, and modification all will drop in the scope of the claims in the present invention book.