Anti-interference high-altitude parabolic capturing method capable of automatically filtering shaking target area
Technical Field
The invention relates to the technical field of image recognition, in particular to an anti-interference high-altitude parabolic capturing method for automatically filtering a shaking target area.
Background
At present, traditional high-altitude parabolas all have methods for drawing or generating building areas, but still have high requirements for the installation position and content of a camera, and do not allow the blocking of areas such as trees or other vegetation which are easy to shake, although some algorithms provide a target filtering algorithm, the shaking of objects in practical application still can seriously interfere with a parabolic tracking algorithm, so that the overall parabolic monitoring effect is influenced.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides an anti-interference high-altitude parabolic capturing method for automatically filtering a shaking target area.
The technical scheme adopted by the invention for solving the technical problem is as follows: the improvement of an anti-interference high-altitude parabolic capturing method for automatically filtering a shaking target area is characterized by comprising the following steps of:
s10, accessing a camera address, extracting a single-frame picture and drawing an identification area;
s20, accessing a video stream, obtaining each single-frame picture in the video stream, cutting to obtain an identification area, then using a foreground modeling algorithm to the picture, performing ecological transformation on a modeling mask and generating a target identification frame;
s30, judging whether a shaking area exists according to the number of the target identification frames, if so, initializing a shaking area mask and an original mask, continuously counting the number of foreground and background for a period of time based on the input mask, generating a shaking mask area, performing morphological operations such as opening and closing operations on the generated shaking area, merging the adjacent or wrapped shaking areas, outputting the automatically generated shaking area mask, and circularly repeating the steps after shielding the shaking area by using the generated shaking area mask;
s40, establishing a tracker for each target identification frame, establishing a speed model by using Kalman filtering, and predicting a target track result;
s50, updating the tracker by using the predicted track result and the real track result in matching based on the IOU, outputting the result, judging whether the tracking object is an interference object according to the number of continuous unmatched successful frames, and filtering out a target identification frame which is judged to be the interference object;
and S60, drawing the track result of the target identification frame conforming to the predicted track result into the picture and the stored video for output.
In the above technical solution, in the step S20, each acquired single-frame picture is subjected to noise removal, blur removal, picture binarization and image gray scale operation.
In the above technical solution, in the step S30, the continuous shaking area needs to be filtered according to the intersection of the shaking areas to eliminate the interference of weeds or leaves.
In the above technical solution, the track generation in step S60 includes the following steps:
s601, inputting a tracking result;
s602, establishing a track model for the same tracker;
s603, when the track is not updated for a long time, defining the track as ending;
s604, filtering tracks with insufficient track quantity and wrong direction;
s605, judging whether the track meets small shaking or not based on MSE, and filtering part of irregular tracks such as mosquitoes, birds and the like;
and S606, drawing the result into the picture and the stored video and outputting the result.
In the above technical solution, the foreground algorithm in the step S20 is a GMM or VIBE algorithm.
The invention has the beneficial effects that: the method carries out an algorithm for automatically generating the area easy to misreport in the existing drawing area, such as the swaying of the leaves blown by wind, the crown of a tree and the like, fundamentally solves a series of performance reduction caused by the swaying of the tree or other objects in the algorithm area through the superposition of masks, and has substantial significance for capturing the parabolic track.
Drawings
FIG. 1 is a flow chart of an anti-interference high-altitude parabolic capturing method for automatically filtering a shaking target area according to the present invention.
Detailed Description
The invention is further illustrated with reference to the following figures and examples.
The conception, the specific structure and the technical effects produced by the present invention will be clearly and completely described in conjunction with the embodiments and the attached drawings, so as to fully understand the objects, the features and the effects of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments, and other embodiments obtained by those skilled in the art without inventive efforts are within the protection scope of the present invention based on the embodiments of the present invention. In addition, all the connection/connection relations referred to in the patent do not mean that the components are directly connected, but mean that a better connection structure can be formed by adding or reducing connection auxiliary components according to specific implementation conditions. All technical characteristics in the invention can be interactively combined on the premise of not conflicting with each other.
Referring to fig. 1, as shown in the figure, the present invention provides an anti-interference high altitude parabolic capturing method for automatically filtering a shaking target area, comprising the following steps:
s10, accessing the camera address, extracting a single-frame picture, drawing an identification area, and dividing the identification area.
S20, accessing a video stream, obtaining each single-frame picture in the video stream, performing noise removal, fuzzy removal, picture binaryzation and image gray level operation on each obtained single-frame picture, cutting to obtain an identification area, then using a foreground modeling algorithm for the picture, wherein the foreground modeling algorithm is a VIBE algorithm, performing ecological transformation on a modeling mask and generating a target identification frame.
S30, judging whether a shaking area exists according to the number of the target identification frames, if so, initializing a shaking area mask with the same size as an original mask, generating and recording the existing shaking area, continuously counting the number of foreground and background for a period of time based on the input mask, generating the shaking area mask, performing morphological operations such as opening and closing operations on the generated shaking area, merging the adjacent or wrapped shaking areas, filtering the continuous shaking area according to the intersection of the shaking areas, eliminating the interference of weeds or leaves, outputting the automatically generated shaking area mask, shielding the shaking area by using the generated shaking area mask, and then repeating the steps in a circulating manner, updating the shaking area in a circulating manner, and automatically and circularly updating the generated shaking area.
And S40, establishing a tracker for each target identification frame, establishing a speed model by using Kalman filtering, and predicting a target track result.
S50, matching based on the IOU is carried out by using the predicted track result and the real track result to update the tracker, the result is output, whether the tracking object is an interference object or not is judged according to the number of frames which are continuously unmatched successfully, the tracking object is regarded as the interference object if three continuous frames are unmatched successfully, and the target identification frame which is judged to be the interference object is filtered.
And S60, drawing the track result of the target identification frame conforming to the predicted track result into the picture and the stored video for output.
Through the superposition of the mask, a series of performance reduction caused by the shaking of trees or other objects in the algorithm area is fundamentally solved.
The track generation in step S60 includes the following steps:
s601, inputting a tracking result.
And S602, establishing a track model for the same tracker.
And S603, defining the track to be ended when the track is not updated for a long time.
And S604, filtering tracks with insufficient track quantity and wrong direction.
S605, judging whether the track meets the requirements of small shaking and filtering irregular tracks such as partial mosquitoes, birds and the like based on MSE.
And S606, drawing the result into the picture and the stored video and outputting the result.
Drawing the tracking result into a picture and a video for output, and further eliminating the interferents.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.