High altitude parabolic detection method and device, equipment and computer storage medium
1. A high altitude parabolic detection method, the method comprising:
acquiring a throwing object image with a throwing object to be detected from the image to be detected, and determining the position coordinates of the throwing object to be detected in each throwing object image;
acquiring associated position coordinates of the to-be-detected falling object according to the acquisition time and the position coordinates of each falling object image, and generating a motion track segment of the to-be-detected falling object based on the associated position coordinates;
determining the falling object to be detected as a high-altitude falling object in response to the motion track segment meeting a preset high-altitude parabolic condition, and determining the motion track segment as a parabolic track segment of a high-altitude parabolic event;
generating a complete parabolic trajectory of the high-altitude falling object based on the parabolic trajectory segment.
2. The method of claim 1, wherein the obtaining of the image of the falling object with the falling object to be detected from the image to be detected comprises:
generating a binary image corresponding to any image to be detected for any image to be detected; the binary image comprises a foreground moving object with a first pixel value and a background non-moving object with a second pixel value;
and in response to the fact that the pixel proportion of the foreground moving object in the binary image is larger than a preset proportion threshold value, determining that the to-be-detected falling object exists in any to-be-detected image, and determining that the any to-be-detected image is the falling object image.
3. The method according to claim 2, wherein the generating a binary image corresponding to any one of the images to be detected comprises:
inputting any image to be detected into a Gaussian mixture model to obtain an initial binary image corresponding to any image to be detected;
carrying out image denoising processing on the initial binary image to obtain a denoised binary image corresponding to any image to be detected;
and performing image repairing processing on the denoised binary image to obtain the binary image corresponding to any image to be detected.
4. The method of claim 2, wherein determining the location coordinates of the projectile to be measured in each image of the projectile comprises:
for any falling object image, acquiring an initial position coordinate set of a foreground moving object corresponding to the falling object image in a corresponding binary image;
determining a coordinate subset of the to-be-detected falling object in any falling object image based on a preset clustering algorithm and the initial position coordinate set;
and calculating a coordinate average value corresponding to the coordinate subset of the to-be-detected falling object, and determining the coordinate average value as the position coordinate of the to-be-detected falling object.
5. The method according to claim 4, wherein the determining a subset of coordinates of the to-be-detected falling object in any falling object image based on a preset clustering algorithm and the initial position coordinate set comprises:
classifying the foreground moving object corresponding to any falling object image based on a preset clustering algorithm and the initial coordinate set to obtain at least one moving object and a coordinate subset corresponding to any moving object;
determining the number of pixels corresponding to any moving object;
and determining the target moving object with the number of pixels larger than a preset number threshold value as the to-be-detected falling object, and determining the coordinate subset of the target moving object as the coordinate subset of the to-be-detected falling object.
6. The method of claim 1, wherein each falling object image comprises at least a first image with a first falling object and a second image with a second falling object, and the first image and the second image are two previous and next falling object images with adjacent acquisition times;
the acquiring the associated position coordinates of the falling object to be detected according to the acquisition time and the position coordinates of each falling object image comprises the following steps:
determining a similarity parameter between the first falling object and the second falling object according to the acquisition time of the first image and the second image, the position coordinate of the first falling object and the position coordinate of the second falling object;
matching the first falling object and the second falling object according to the similarity parameter and a budget target matching algorithm to obtain a matching result;
and acquiring the associated position coordinates of the first falling object or the second falling object according to the matching result.
7. The method of claim 1, wherein after generating the motion trajectory segment of the toss to be tested based on the associated position coordinates and before responding to the motion trajectory segment satisfying a preset high altitude parabolic condition, the method further comprises:
determining an included angle between a fitted straight line corresponding to the motion track segment and the vertical direction, the length of the motion track segment, and a falling percentage corresponding to a position coordinate meeting a preset falling condition in the associated position coordinates;
and determining that the motion track segment meets the preset high altitude parabolic condition in response to the included angle being smaller than a preset angle threshold, the length being larger than a preset length threshold and the falling percentage being larger than a preset percentage threshold.
8. The method according to claim 7, wherein the associated position coordinates at least include a third position coordinate of the falling object to be detected in a third image and a fourth position coordinate of the falling object in a fourth image, respectively, the third image and the fourth image are two frames of images of the falling object before and after adjacent acquisition times, and the preset falling condition is that a difference value of a horizontal coordinate between the third position coordinate and the fourth position coordinate is greater than a preset threshold value.
9. The method of claim 1, wherein the generating a complete parabolic trajectory of the high altitude projectile based on the parabolic trajectory segments comprises:
determining a starting falling object image to an ending falling object image of the high altitude parabolic event based on the parabolic track segment;
and performing interpolation processing on the coordinates of each relevant position of the to-be-detected throwing object in each throwing object image from the initial throwing object image to the final throwing object image according to image acquisition time to obtain the complete parabolic track.
10. The method according to any one of claims 1-9, further comprising:
acquiring an initial image, and determining a target detection area from the initial image based on a preset polygon outline;
and generating a minimum detection frame based on the target detection area, and performing image segmentation processing on the initial image based on the minimum detection frame to obtain the image to be detected.
11. A high altitude parabolic detection device, characterized in that it comprises:
the acquisition unit is configured to acquire a falling object image with a falling object to be detected from the image to be detected;
the determining unit is configured to determine the position coordinates of the falling object to be detected in each falling object image;
the acquisition unit is further configured to acquire the associated position coordinates of the to-be-detected falling object according to the acquisition time and the position coordinates of each falling object image;
the generating unit is configured to generate a motion trail fragment of the to-be-detected falling object based on the associated position coordinates;
the determining unit is further configured to determine the falling object to be detected as a high-altitude falling object in response to the motion track segment meeting a preset high-altitude parabolic condition, and determine the motion track segment as a parabolic track segment of a high-altitude parabolic event;
the generating unit is further configured to generate a complete parabolic track of the high-altitude falling object based on the parabolic track segment.
12. A high altitude parabolic detection apparatus comprising a processor, a memory storing instructions executable by the processor, the instructions when executed by the processor implementing a method as claimed in any one of claims 1 to 10.
13. A computer-readable storage medium, having a program stored thereon, for use in a high altitude parabolic detection apparatus, wherein the program, when executed by a processor, implements a method as claimed in any one of claims 1 to 10.
Background
In recent years, with the increase of the urbanization rate, more and more high-rise buildings and more attention is paid to the danger caused by high-altitude parabolic movement. High-altitude parabolic detection is used as an important technology in an intelligent video monitoring system, and by analyzing a building floor monitoring video, a cast object is detected, so that defense is arranged on the floor of a high-rise building in a city, and a possible high-altitude parabolic event is alarmed in real time. At present, along with the important position of high-altitude parabolic detection in the aspect of social safety, the traditional high-altitude parabolic detection method cannot meet the high requirements of the high-altitude parabolic detection on speed and precision.
Disclosure of Invention
The disclosed embodiments provide a high altitude parabolic detection method, apparatus, device, and computer storage medium.
The technical scheme of the disclosure is realized as follows:
the embodiment of the disclosure provides a high-altitude parabolic detection method, which comprises the following steps:
acquiring a throwing object image with a throwing object to be detected from the image to be detected, and determining the position coordinates of the throwing object to be detected in each throwing object image; acquiring associated position coordinates of the to-be-detected falling object according to the acquisition time and the position coordinates of each falling object image, and generating a motion track segment of the to-be-detected falling object based on the associated position coordinates; determining the falling object to be detected as a high-altitude falling object in response to the motion track segment meeting a preset high-altitude parabolic condition, and determining the motion track segment as a parabolic track segment of a high-altitude parabolic event; generating a complete parabolic trajectory of the high-altitude falling object based on the parabolic trajectory segment.
Therefore, the method not only can filter a single frame with the interferent, find out a single frame throwing object image with the throwing object to be detected, remove single frame false detection, but also can judge and restore the track by combining the position correlation information of the throwing object to be detected on a plurality of frames, effectively finish high-altitude parabolic event detection, and further improve the efficiency and the precision of high-altitude parabolic detection.
In the above method, the obtaining of the image of the falling object with the falling object to be detected from the image to be detected includes: generating a binary image corresponding to any image to be detected for any image to be detected; the binary image comprises a foreground moving object with a first pixel value and a background non-moving object with a second pixel value; and in response to the fact that the pixel proportion of the foreground moving object in the binary image is larger than a first preset proportion threshold value, determining that the to-be-detected falling object exists in any to-be-detected image, and determining that the to-be-detected image is the falling object image.
In the above method, the generating a binary image corresponding to any one of the images to be detected includes: inputting any image to be detected into a Gaussian mixture model to obtain an initial binary image corresponding to any image to be detected; carrying out image denoising processing on the initial binary image to obtain a denoised binary image corresponding to any image to be detected; and performing image repairing processing on the denoised binary image to obtain the binary image corresponding to any image to be detected.
Therefore, the method can screen the falling object image with the falling object to be detected by carrying out foreground binarization processing on the image to be detected and filtering the non-falling object image based on the pixel number of the foreground moving object in the binarized image, thereby improving the precision and speed of high-altitude detection processing.
In the above method, the determining the position coordinates of the falling object to be detected in each falling object image includes: for any falling object image, acquiring an initial position coordinate set of a foreground moving object corresponding to the falling object image in a corresponding binary image; determining a coordinate subset of the to-be-detected falling object in any falling object image based on a preset clustering algorithm and the initial position coordinate set; and calculating a coordinate average value corresponding to the coordinate subset of the to-be-detected falling object, and determining the coordinate average value as the position coordinate of the to-be-detected falling object.
In the above method, the determining a coordinate subset of the to-be-detected falling object in any falling object image based on a preset clustering algorithm and the initial position coordinate set includes: classifying the foreground moving object corresponding to any falling object image based on a preset clustering algorithm and the initial coordinate set to obtain at least one moving object and a coordinate subset corresponding to any moving object; determining the number of pixels corresponding to any moving object; and determining the target moving object with the number of pixels larger than a preset number threshold value as the to-be-detected falling object, and determining the coordinate subset of the target moving object as the coordinate subset of the to-be-detected falling object.
Therefore, by means of the density clustering algorithm, the clusters with the number of the imaging elements larger than the preset threshold value are used as the positions of the falling objects to be detected, other interference objects with small areas and non-falling objects in the images can be effectively filtered, and the high-altitude falling object detection precision is improved.
In the method, each falling object image at least comprises a first image with a first falling object and a second image with a second falling object, and the first image and the second image are two adjacent frames of falling object images with adjacent acquisition time; the acquiring the associated position coordinates of the falling object to be detected according to the acquisition time and the position coordinates of each falling object image comprises the following steps: determining a similarity parameter between the first falling object and the second falling object according to the acquisition time of the first image and the second image, the position coordinate of the first falling object and the position coordinate of the second falling object; matching the first falling object and the second falling object according to the similarity parameter and a budget target matching algorithm to obtain a matching result; and acquiring the associated position coordinates of the first falling object or the second falling object according to the matching result.
Therefore, the tracking matching of the front frame and the rear frame of the throwing object to be detected is carried out through the image acquisition time and the position coordinates of the throwing object to be detected, the associated information of the throwing object to be detected on the multi-frame throwing object image can be obtained, and the track fragment of the throwing object to be detected for track restoration is generated.
In the above method, after the generating the motion trajectory segment of the to-be-detected falling object based on the associated position coordinates and before responding to that the motion trajectory segment satisfies a preset high altitude parabolic condition, the method further includes: determining an included angle between a fitted straight line corresponding to the motion track segment and the vertical direction, the length of the motion track segment, and a falling percentage corresponding to a position coordinate meeting a preset falling condition in the associated position coordinates; and determining that the motion track segment meets the preset high altitude parabolic condition in response to the included angle being smaller than a preset angle threshold, the length being larger than a preset length threshold and the falling percentage being larger than a preset percentage threshold.
In the method, the associated position coordinates at least include a third position coordinate of the falling object to be detected in a third image and a fourth position coordinate of the falling object in a fourth image, the third image and the fourth image are two frames of falling object images before and after adjacent acquisition time, and the preset falling condition is that a difference value of a horizontal coordinate between the third position coordinate and the fourth position coordinate is greater than a preset threshold value.
Therefore, the generated track segment of the throwing object to be detected can be judged before track restoration, track segments which do not belong to high-altitude parabolic events are filtered, high-altitude parabolic track segments meeting high-altitude parabolic conditions are screened, and high-altitude parabolic track restoration is rapidly and accurately carried out.
In the above method, generating a complete parabolic trajectory of the high-altitude falling object based on the parabolic trajectory segment includes: determining a starting falling object image to an ending falling object image of the high altitude parabolic event based on the parabolic track segment; and performing interpolation processing on the coordinates of each relevant position of the to-be-detected throwing object in each throwing object image from the initial throwing object image to the final throwing object image according to image acquisition time to obtain the complete parabolic track.
Therefore, a starting frame to an ending frame corresponding to the high-altitude parabolic event are determined based on the parabolic track segments, and the complete parabolic track of the high-altitude parabolic event is restored based on the position information of the to-be-detected falling object in the starting frame to the ending frame.
In the method, an initial image is obtained, and a target detection area is determined from the initial image based on a preset polygon outline; and generating a minimum detection frame based on the target detection area, and performing image segmentation processing on the initial image based on the minimum detection frame to obtain the image to be detected.
Therefore, the negative influence on the false detection of the falling objects can be reduced, the task amount of image post-processing is reduced, and the high-altitude parabolic detection processing speed is further increased.
The disclosed embodiment provides a high altitude parabolic detection device, including:
the acquisition unit is configured to acquire a falling object image with a falling object to be detected from the image to be detected;
the determining unit is configured to determine the position coordinates of the falling object to be detected in each falling object image;
the acquisition unit is further configured to acquire the associated position coordinates of the to-be-detected falling object according to the acquisition time and the position coordinates of each falling object image;
the generating unit is configured to generate a motion trail fragment of the to-be-detected falling object based on the associated position coordinates;
the determining unit is configured to determine the falling object to be detected as a high-altitude falling object in response to the motion track segment meeting a preset high-altitude parabolic condition, and determine the motion track segment as a parabolic track segment of a high-altitude parabolic event;
the generating unit is configured to generate a complete parabolic track of the high-altitude falling object based on the parabolic track segment.
The embodiment of the present disclosure provides a high altitude parabolic detection device, which includes a processor, and a memory storing executable instructions of the processor, and when the instructions are executed by the processor, the high altitude parabolic detection device implements the high altitude parabolic detection method as described above.
The embodiment of the disclosure provides a computer readable storage medium, which stores a program, and is applied to a high altitude parabolic detection device, wherein the program is executed by a processor to realize the high altitude parabolic detection method.
According to the technical scheme provided by the embodiment of the disclosure, the high-altitude parabolic detection equipment can acquire a falling object image with a falling object to be detected from the image to be detected, and determine the position coordinates of the falling object to be detected in each falling object image; acquiring associated position coordinates of the to-be-detected falling object according to the acquisition time and the position coordinates of each falling object image, and generating a motion track segment of the to-be-detected falling object based on the associated position coordinates; determining the falling object to be detected as a high-altitude falling object in response to the motion track segment meeting the preset high-altitude parabolic condition, and determining the motion track segment as a parabolic track segment of a high-altitude parabolic event; and generating a complete parabolic track of the high-altitude falling object based on the parabolic track segment. Therefore, the robust post-processing method of adding single frame and multiple frames is provided, not only can the single frame with the interference object be filtered, the single frame image with the throwing object to be detected is found out, the single frame false detection is removed, but also the position correlation information of the throwing object to be detected on the multiple frames can be obtained based on the target matching algorithm to carry out track judgment and complete track restoration, the high-altitude parabolic event detection is completed quickly and accurately, and the efficiency and the precision of the high-altitude parabolic detection are further improved.
Drawings
Fig. 1 is a schematic flow chart of an implementation of a high altitude parabolic detection method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart illustrating an implementation process of a high altitude parabolic detection method according to an embodiment of the present disclosure;
FIG. 3 is a schematic view of a motion trajectory segment;
fig. 4 is a schematic flow chart illustrating an implementation of a high altitude parabolic detection method according to an embodiment of the present disclosure;
fig. 5 is a schematic flow chart illustrating an implementation of a high altitude parabolic detection method according to an embodiment of the present disclosure;
fig. 6 is a schematic flow chart illustrating an implementation of a high altitude parabolic detection method according to an embodiment of the present disclosure;
fig. 7 is a schematic flow chart illustrating an implementation process of a high altitude parabolic detection method according to an embodiment of the present disclosure;
fig. 8 is a schematic flow chart illustrating an implementation of a high altitude parabolic detection method according to an embodiment of the present disclosure;
fig. 9 is a schematic flow chart eight of an implementation process of the high altitude parabolic detection method according to the embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a high altitude parabolic detection apparatus according to an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of a high altitude parabolic detection apparatus according to an embodiment of the present disclosure.
Detailed Description
For the purpose of making the purpose, technical solutions and advantages of the present disclosure clearer, the present disclosure will be described in further detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present disclosure, and all other embodiments obtained by a person of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present disclosure.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first \ second \ third" are only to distinguish similar objects and do not denote a particular order, but rather the terms "first \ second \ third" are used to interchange specific orders or sequences, where permissible, so that the disclosed embodiments described herein can be practiced in other than the order shown or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing embodiments of the disclosure only and is not intended to be limiting of the disclosure.
In recent years, with the increase of the urbanization rate, more and more high-rise buildings and more attention is paid to the danger caused by high-altitude parabolic movement. High-altitude parabolic detection is used as an important technology in an intelligent video monitoring system, and by analyzing a building floor monitoring video, a cast object is detected, so that defense is arranged on the floor of a high-rise building in a city, and a possible high-altitude parabolic event is alarmed in real time.
Specifically, the high-altitude parabolic detection depends on the detection of a moving object in an image, and in the related art, the detection of the moving object is often performed by using an inter-frame difference method, a background difference method or an optical flow method.
The interframe difference method is based on the following principle: when moving objects exist in a video, the adjacent frames (or the adjacent three frames) have difference in gray level, and the absolute value of the gray level difference of the two frames of images is obtained, then the static objects are all represented as 0 on the difference image, and the moving objects, particularly the outlines of the moving objects, can be judged as moving objects due to the gray level change of non-0, when the absolute value exceeds a certain threshold value, so that the detection function of the objects is realized, namely, the adjacent inter-frame difference method directly performs difference operation on the adjacent two frames of images, and the absolute value of the difference operation is obtained to form the moving objects.
Although the interframe difference method can obtain the outline of the moving target, the method is simple and the operation complexity is small, the method has the defects that a camera needs to be fixed, the robust phase difference is low and the precision is low, and is generally only suitable for simple real-time motion detection.
The background difference method is based on the basic principle that a current frame in an image sequence and a determined or real-time acquired background reference model (background image) are subtracted to find differences, and an area with pixel difference exceeding a certain threshold value with the background image is calculated to be determined as a motion area, so that the characteristics of motion position, contour, size and the like are determined.
The background difference method can obtain the whole area of the moving target, and has the advantages of high speed, accuracy, poor robustness, fixed camera, difficult utilization of interframe information and image post-processing, and particularly, weak illumination or great influence on rainy and snowy weather.
The optical flow method is based on the following principle: and calculating motion information of an object between adjacent frames according to the corresponding relation between the previous frame and the current frame by using the change of pixels in the image sequence in a time domain and the correlation between the adjacent frames. Such as an algorithm applying an optical flow constraint equation, a conventional (Lucas Kanade, KL) algorithm.
Although the method can detect the whole area of a moving target, is suitable for the static and moving conditions of a camera, and has good robustness and high precision, most optical flow calculation methods have huge calculation amount and complex structure, so that the calculation time is high, and more problems need to be overcome in productization and practical use.
Therefore, under the condition of massive video data, the traditional high-altitude parabolic detection method is difficult to meet the high requirements of high-altitude parabolic detection on speed and precision. In view of this, how to ensure the high requirement of the high altitude parabolic detection on speed and precision is an urgent problem to be solved, which is the content to be discussed in the embodiments of the present disclosure, the following embodiments will be described in detail below.
The embodiment of the disclosure provides a high-altitude parabolic detection method, a high-altitude parabolic detection device, a high-altitude parabolic detection equipment and a computer storage medium, wherein a cast object image with a cast object to be detected is obtained from an image to be detected, and the position coordinates of the cast object to be detected in each cast object image are determined; acquiring associated position coordinates of the to-be-detected falling object according to the acquisition time and the position coordinates of each falling object image, and generating a motion track segment of the to-be-detected falling object based on the associated position coordinates; determining the falling object to be detected as a high-altitude falling object in response to the motion track segment meeting the preset high-altitude parabolic condition, and determining the motion track segment as a parabolic track segment of a high-altitude parabolic event; and generating a complete parabolic track of the high-altitude falling object based on the parabolic track segment. Therefore, the robust post-processing method of adding single frame and multiple frames is provided, not only can the single frame with the interference object be filtered, the single frame image with the throwing object to be detected is found out, the single frame false detection is removed, but also the position correlation information of the throwing object to be detected on the multiple frames can be obtained based on the target matching algorithm to carry out track judgment and complete track restoration, the high-altitude parabolic event detection is completed quickly and accurately, and the efficiency and the precision of the high-altitude parabolic detection are further improved.
The high-altitude parabolic detection method provided by the embodiment of the disclosure is applied to high-altitude parabolic detection equipment. The following describes an exemplary application of the high altitude parabolic detection device provided by the embodiment of the present disclosure, which may be implemented as a mobile phone terminal, a notebook computer, a tablet computer, a desktop computer, a server, various industrial devices, and the like.
In the following, the technical solutions in the embodiments of the present disclosure will be clearly and completely described with reference to the drawings in the embodiments of the present disclosure.
An embodiment of the present disclosure provides a high altitude parabolic detection method, and fig. 1 is a schematic flow chart illustrating an implementation process of the high altitude parabolic detection method provided by the embodiment of the present disclosure, as shown in fig. 1, in the embodiment of the present disclosure, a method for performing high altitude parabolic detection may include the following steps:
s100, acquiring a throwing object image with the throwing object to be detected from the image to be detected, and determining the position coordinates of the throwing object to be detected in each throwing object image.
It should be understood that, in the embodiment of the present disclosure, the high-altitude parabolic detection processing may be performed on a historical event, or may be performed in real time on a currently occurring event.
In some embodiments, the image to be measured refers to an image for which detection of a falling object is required. Wherein the image may be acquired in real time or stored locally.
In some embodiments, the image to be measured may be an RGB color image, a grayscale image, or other sensor image data (e.g., infrared image) based on image capturing and monitoring devices with different configurations.
The high-altitude parabolic detection equipment can be configured with image acquisition monitoring equipment such as a camera, and an image to be detected can be acquired in real time through the camera; or, a section of video collected by the camera history is stored locally, and the video stream can be read and analyzed locally to obtain the image to be detected.
Fig. 2 is a schematic diagram of a second implementation flow of the high altitude parabolic detection method according to the embodiment of the present disclosure, and as shown in fig. 2, the method for acquiring the image to be detected may include the following steps:
s101, acquiring an initial image, and determining a target detection area from the initial image based on a preset polygon outline.
It should be understood that for any image capturing and monitoring device, the range of images that can be captured may include the target monitoring object (such as a building) and greening or fixed devices under the building, such as lamp poles and numbers. Particularly, greening facilities such as trees and the like bring certain influence on the detection result of a moving object, the influence can be shown as that fallen leaves are easily judged to be high-altitude fallen objects, an additional processing task is brought to image post-processing, and the high-altitude parabolic detection processing speed is reduced.
Therefore, in the embodiment of the present disclosure, the monitoring picture of each image capturing and monitoring device may be analyzed, and a region without a blocking object is calibrated as a monitoring region of a target monitoring object (such as a building), so that when performing subsequent image analysis, only the monitoring region is analyzed, image contents of other non-monitoring regions are ignored, and the high-altitude parabolic detection processing speed is increased.
In some embodiments, the initial image refers to an image within a monitoring range acquired in real time by an image acquisition monitoring device, or a video within a monitoring range stored in a local history.
In the embodiment of the present disclosure, a polygon contour C, that is, a preset polygon contour, may be determined manually, and then an interested region R is marked from an initial image by the preset polygon contour as a target detection region, so as to omit other image contents with interference in the initial image.
Here, the high altitude parabolic detection device may perform binarization processing on the initial image based on a preset polygon profile, set image pixels of a target detection region corresponding to the preset polygon profile to 1 first, set image pixels outside the target detection region to 0, and then perform pixel dot multiplication on the binarized image and the initial image so that the image of the target detection region retains the original pixel values, and the image pixels outside the region are all 0, so as to determine the target detection region existing in the initial image.
Therefore, except for the selected target detection area, the pixels of other areas are all 0, and the obtained target detection area can cover a target monitoring object (such as a building) to the maximum extent, namely, the maximum extent covers the potential motion trail of the throwing object, and meanwhile, the influence of trees, sky, lamp posts and other interferents is avoided.
And S102, generating a minimum detection frame based on the target detection area, and performing image segmentation processing on the initial image based on the minimum detection frame to obtain an image to be detected.
It should be understood that in order to cover the potential motion trajectory of the falling object to the maximum extent, the target falling object in the actual situation may be an irregular polygon, and then the target falling object region needs to be regularized before the model is input. And generating a Bounding box minimum detection frame corresponding to the target falling object region.
The coordinate of the edge position of the target object falling object area can be taken to generate a minimum detection frame. May be to take the leftmost edge coordinate r of the target fall object region1Rightmost edge coordinate r2The uppermost edge coordinate k1And the lowest edge coordinate k2And then generating a minimum bounding box (r)1,k,r2,k2)。
In an implementation manner of the embodiment of the present disclosure, an image segmentation process, that is, image frame clipping may be performed on an initial image based on the minimum detection frame, so as to obtain an image to be detected.
It can be seen that in the embodiment of the present disclosure, negative effects on the false detection of the falling objects can be reduced based on S101a-S101b, the task amount of image post-processing is reduced, and the speed of the high-altitude parabolic detection processing is further increased.
It can be understood that there are many situations of high-altitude parabolic, and different natural conditions such as day, night, rain, etc. affect the detection accuracy of the falling object, and some natural objects such as swinging leaves, flying birds, moving people, etc. can affect the accurate detection of the falling object. Therefore, in order to overcome detection errors caused by other non-falling moving objects to high-altitude parabolic detection in the detection process, in the embodiment of the disclosure, an interference image or an abnormal image of the non-falling object may be filtered to obtain an image with the falling object and less noise, so as to reduce the false detection rate of the high-altitude parabolic detection.
It should be understood that images with excessive noise or abnormal images exist in the image to be detected, such as birds flying through the lens or leaves falling off, and the images have a large negative influence on false detection caused by detection of falling objects, so that the images to be detected have a small effect in high-altitude falling detection processing and can slow down the high-altitude detection processing.
Therefore, in the embodiment of the present disclosure, the obtained image to be detected may be filtered, the image to be detected determined to have excessive noise or an abnormal image to be detected may be filtered, and the image of the falling object when the falling object to be detected exists may be screened from the image to be detected.
In the embodiment of the present disclosure, one or more tossing objects may be used as the to-be-detected tossing object, that is, only one tossing object may exist in the to-be-detected image, or a plurality of different tossing objects may exist simultaneously.
In some embodiments, for any one determined image of the falling object with the falling object to be detected, the position coordinates of the falling object to be detected in any image of the falling object can be determined continuously, wherein the position coordinates of the falling object to be detected can be represented by the position coordinates of the center point of the falling object. A clustering method can be introduced to determine the position coordinates of each falling object to be detected in the falling object image.
S110, acquiring the associated position coordinates of the falling object to be detected according to the acquisition time and the position coordinates of each falling object image, and generating a motion track segment of the falling object to be detected based on the associated position coordinates.
In the embodiment of the disclosure, the trajectory segment of the tossing and dropping object may be generated based on a multi-frame post-processing method, wherein the corresponding motion trajectory segment may be generated based on the position coordinates of the tossing and dropping object to be detected in each tossing and dropping object image in which the tossing and dropping object to be detected exists.
It should be noted that, in the embodiment of the present disclosure, the motion trajectory segment may be formed by connecting the associated position coordinates of the to-be-detected falling object in the multiple continuous frames of falling object images with the acquisition time of the to-be-detected falling object.
In some embodiments, a preset target matching algorithm may be adopted to sequentially track and match the falling objects to be detected in two adjacent frames of parabolic images according to the collection time sequence of the falling object images, so as to obtain position correlation information, namely correlation position coordinates, of the falling objects to be detected on multiple frames of falling object images with continuous collection time, and connect based on the position coordinates of the falling objects to be detected in the multiple frames of continuously correlated falling object images to be detected, namely connect multiple correlation position coordinates, so as to generate corresponding falling object track segments.
In some embodiments, the toss to be measured may correspond to a set of associated position coordinates.
In other embodiments, since there is a falling object that is blocked by some object in the middle of falling for a short period of time, that is, there is a falling object to be detected on the images to be detected collected before and after the short period of time, the corresponding images to be detected are also determined to belong to the falling object images, but there is no falling object to be detected on the images to be detected collected within the period of time, and the corresponding images to be detected are also determined not to belong to the falling object images. Then, in the case that the falling object is blocked, two sets of associated position coordinates of the falling object to be detected may be obtained based on a preset target matching algorithm, where one set is before the blocking and the other set is after the blocking.
Therefore, when the motion trajectory segment of the to-be-detected falling object is generated based on the associated position coordinates, one motion trajectory segment of the to-be-detected falling object may be generated, and a plurality of trajectory segments of the to-be-detected falling object may also be generated.
In some embodiments, when a to-be-detected falling object exists in the falling object image, a motion trajectory segment corresponding to the to-be-detected falling object may be generated; under the condition that a plurality of to-be-detected falling objects exist in the falling object image, a plurality of motion track segments corresponding to the plurality of to-be-detected falling objects can be generated.
Fig. 3 is a schematic diagram of a motion trajectory segment, and as shown in fig. 3, for example, a parabolic image with 5 consecutive frames (i frame to i +4 frame), includes a trajectory segment a of a first throwing object 001, trajectory segments B1 and B2 of a second throwing object 002, trajectory segment C of a third throwing object 003, and trajectory segment D of a fourth throwing object 004. As can be seen, a plurality of to-be-detected falling objects exist in each frame of parabolic image, and the same to-be-detected falling object may correspond to a plurality of motion trajectory segments.
S120, in response to the fact that the motion track segment meets a preset high-altitude parabolic condition, determining the falling object to be detected as the high-altitude falling object, and determining the motion track segment as a parabolic track segment of a high-altitude parabolic event.
And S130, generating a complete parabolic track of the high-altitude falling object based on the parabolic track segment.
It can be understood that some objects to be thrown and dropped are not high-altitude objects to be thrown and dropped in a real scene, that is, the corresponding parabolic events are not real high-altitude parabolic events, for example, the third object to be thrown and dropped and the fourth object to be thrown and dropped in fig. 3 may be similar to a person who has hand-lifted objects or has the object lifted over the head, for example, an incident person stands in a window to eat an apple, and takes the apple with hand and puts the apple in mouth while biting the hand and then puts down the apple, so that the motion trajectory segment of the object to be thrown and dropped can be judged to determine whether the object to be thrown and dropped is a high-altitude object to be thrown and dropped, and whether the motion trajectory segment is a parabolic trajectory segment of a high-altitude parabolic trajectory event.
In the embodiment of the present disclosure, a high altitude parabolic condition may be preset, where the high altitude parabolic condition may be various threshold conditions of the high altitude parabolic condition, such as a threshold of an included angle between a motion trajectory segment and a vertical direction after straight line fitting, or a length threshold of the motion trajectory segment, or a falling percentage threshold corresponding to the motion trajectory segment, and the like, and the present disclosure does not specifically limit this.
In some embodiments, when the motion trajectory segment of the to-be-detected falling object meets the corresponding threshold conditions, it may be determined that the to-be-detected falling object is a high-altitude falling object, and the motion trajectory segment of the to-be-detected falling object is a parabolic trajectory segment of a high-altitude parabolic event.
In the embodiment of the disclosure, after the tossing object to be detected is determined to be the high-altitude tossing object, and the corresponding motion track segment is the parabolic track segment of the high-altitude parabolic event, the track reduction of the high-altitude parabolic event can be performed based on the parabolic track segment, so as to generate the complete parabolic track.
The embodiment of the disclosure provides a high-altitude parabolic detection method, which can acquire a falling object image with a falling object to be detected from an image to be detected and determine a position coordinate of the falling object to be detected in each falling object image; acquiring associated position coordinates of the to-be-detected falling object according to the acquisition time and the position coordinates of each falling object image, and generating a motion track segment of the to-be-detected falling object based on the associated position coordinates; determining the falling object to be detected as a high-altitude falling object in response to the motion track segment meeting the preset high-altitude parabolic condition, and determining the motion track segment as a parabolic track segment of a high-altitude parabolic event; and generating a complete parabolic track of the high-altitude falling object based on the parabolic track segment. Therefore, the robust post-processing method of adding single frame and multiple frames is provided, not only can the single frame with the interference object be filtered, the single frame image with the throwing object to be detected is found out, the single frame false detection is removed, but also the position correlation information of the throwing object to be detected on the multiple frames can be obtained based on the target matching algorithm to carry out track judgment and complete track restoration, the high-altitude parabolic event detection is completed quickly and accurately, and the efficiency and the precision of the high-altitude parabolic detection are further improved.
Fig. 4 is a schematic flow chart illustrating a third implementation process of the high altitude parabolic detection method according to the embodiment of the present disclosure, as shown in fig. 4, in the embodiment of the present disclosure, a method for acquiring a falling object image with a falling object to be detected from an image to be detected may include the following steps:
s103, generating a binary image corresponding to any image to be detected for any image to be detected; the binary image comprises a foreground moving object with a first pixel value and a background non-moving object with a second pixel value.
In the embodiment of the disclosure, whether the image to be detected has the falling object or not can be judged by adopting a single-frame binarization method, so as to determine the falling object image with the falling object to be detected.
For any image to be detected, the image to be detected may be converted into a binary image, that is, a grayscale image in which the image only includes the first pixel value and the second pixel value. For example, the binary image corresponding to the image to be detected includes a pixel value 0 and a pixel value 255.
In an implementation manner of the embodiment of the present disclosure, in order to distinguish a moving object from a non-moving object in an image, a region in which a pixel value in the image is greater than or equal to a critical pixel gray scale value is determined as a region in which the moving object exists, and a pixel value of the region in a binary image is set as a first pixel value, whereas a region in which a pixel value in the image is less than the critical pixel gray scale value is determined as a region in which the non-moving object exists, and a pixel value of the region in the binary image is set as a second pixel value, so that a binary image corresponding to any one of the optical flow images is obtained.
Here, the first pixel value in the binary image may be 255, which represents a foreground moving object, and the second pixel value may be 0, which represents a background non-pixel object.
Fig. 5 is a schematic flow chart of a fourth implementation process of the high altitude parabolic detection method provided in the embodiment of the present disclosure, and as shown in fig. 5, the method for generating a binary image corresponding to any image to be detected may include the following steps:
s103a, inputting any image to be detected into the Gaussian mixture model to obtain an initial binary image corresponding to any image to be detected.
S103b, carrying out image denoising processing on the initial binary image to obtain a denoised binary image corresponding to any image to be detected.
S103c, performing image patching processing on the denoised binary image to obtain a binary image corresponding to any image to be detected.
In the embodiment of the present disclosure, the binary image is a foreground binary image.
In the embodiment of the present disclosure, for any image to be detected, when a current image to be detected is converted into a binary image, foreground detection processing may be performed on the image to be detected based on a back gaussian mixture model, so as to obtain a foreground binary image corresponding to the image to be detected.
In some embodiments, in order to determine the form of the moving object in the binary image more accurately, the foreground binary image with more accurate form of the moving object can be obtained by performing image denoising and image inpainting on the foreground binary image obtained based on the gaussian mixture model
The image denoising method can be used for denoising the foreground binary image by using a mathematical morphology open operation method, and removing isolated dots, burrs and bridges of a moving object in the image to obtain a denoised binary image. Here, structural elements SE can be selected, such as:
and denoising the binary image obtained by the background extraction algorithm by using the structural element SE, and removing isolated dots, burrs and bridges to obtain a denoised binary image. Further, the structural elements are still adopted, the denoised binary image is subjected to image repairing processing based on mathematical morphology closed operation, and moving objects in the image are filled and leveled with small holes, small cracks are closed, and the like, so that a new foreground binary image is obtained.
And S104, responding to the fact that the pixel proportion of the foreground moving object in the binary image is larger than a preset proportion threshold value, determining that the to-be-detected falling object exists in any to-be-detected image, and determining that any to-be-detected image is the falling object image.
In the embodiment of the present disclosure, for any image to be detected, after obtaining the binary image corresponding to the image to be detected, the number of pixels occupied by the foreground moving object in the binary image may be used to represent the probability that the moving object exists in the image to be detected, and then it may be further determined whether a falling object exists in the current image to be detected based on the number of pixels occupied by the foreground moving object in the binary image.
Considering the negative influence on high-altitude parabolic detection caused by non-falling objects with too small area, such as leaves, existing in the image, a preset ratio threshold of the number of pixels of the falling objects in the binary image can be set, that is, an object whose ratio of the number of pixels to the number of pixels of the whole image exceeds a specified threshold exists in the binary image, and a potential falling object may exist in the image to be detected. At this time, whether the falling object to be detected exists in the image to be detected can be judged based on the comparison result of the pixel number ratio of the foreground moving object in the binary image and the preset ratio threshold, and whether the image to be detected is the falling image with the falling object can be determined.
Under the condition that the pixel number ratio of the foreground moving object in the binary image is larger than a preset ratio threshold, determining that at least one object to be thrown and dropped exists in the image to be detected; and otherwise, under the condition that the pixel number ratio of the foreground moving object in the binary image is less than or equal to the preset ratio threshold, determining that the to-be-detected throwing object does not exist in the to-be-detected image.
Based on the operation, the image with the throwing object to be detected in the image to be detected can be screened out and used as the throwing object image for carrying out subsequent high-altitude parabolic detection processing.
Therefore, in the embodiment of the disclosure, the foreground binarization processing is performed on the image to be detected, the non-falling object image is filtered based on the pixel number of the foreground moving object in the binarized image, and the falling object image in which the falling object to be detected exists is screened out, so that the precision and the speed of the high-altitude detection processing are improved.
Fig. 6 is a schematic flow chart of an implementation of a high-altitude parabolic detection method according to an embodiment of the present disclosure, as shown in fig. 6, in an embodiment of the present disclosure, a method for determining a position coordinate of a to-be-detected falling object in each falling object image may include the following steps:
and S105, acquiring an initial position coordinate set of the foreground moving object in the binary image for any falling object image.
S106, determining a coordinate subset of the falling object to be detected in any falling object image based on a preset clustering algorithm and the initial position coordinate set.
And S107, calculating a coordinate average value corresponding to the coordinate subset of the to-be-detected falling object, and determining the coordinate average value as the position coordinate of the to-be-detected falling object.
In the embodiment of the disclosure, for any image to be detected with a falling object, namely a falling object image, a clustering algorithm can be introduced to determine the position coordinates of the falling object to be detected in the falling object image.
In an implementation manner of the embodiment of the present disclosure, under the condition that it is determined that the tossing-down object to be detected exists in the current image to be detected, all pixel position coordinates of the foreground moving object in the binary image thereof may be obtained, so as to form a two-dimensional array of position coordinates, that is, an initial position coordinate set.
It should be understood that there may be more than one moving object in the current toss image, including toss, fallen leaves, etc., and that there is not only one toss. To determine the position of the drop, in embodiments of the present disclosure, the position of the drop may be determined by a Density Clustering algorithm, such as, without limitation, a Density-Based Spatial Clustering of Applications with Noise, DBSCAN.
The density clustering algorithm can be applied to initially classify all moving objects in the falling object images with falling objects. The foreground moving objects can be grouped into at least one class based on the position coordinates of the foreground moving objects as clustering parameters, if the falling objects are grouped into one class, the leaves are grouped into one class, and the class cluster corresponding to the falling object to be detected is determined from the class clusters.
In an implementation manner of the embodiment of the disclosure, for any falling object image, an initial position coordinate set of a foreground moving object in a binary image may be obtained, and a classification process is performed on the foreground moving object existing in any falling object image by using the initial position coordinate set based on a preset density clustering algorithm, so that at least one type of moving object and a coordinate subset corresponding to each type of moving object are obtained, and thus, the classification of the moving object in the falling object image based on the density clustering algorithm is realized.
It can be understood that, in any one of the falling object images, the area of the falling object is often larger than the area of the non-falling object, and in the disclosed embodiment, an area threshold corresponding to the falling object may be preset, so that a moving object in any one of the falling object images, the area of which is larger than the preset area threshold, is determined as the falling object to be detected, and a coordinate subset corresponding to the moving object is a coordinate subset of the falling object to be detected.
In some embodiments, the area of the moving object may be represented by the number of pixels in a cluster corresponding to the moving object, and when the number of pixels included in the moving object is greater than a preset number threshold, the moving object is determined as the tossing object to be detected, and the coordinate subset of the moving object is determined as the coordinate subset of the tossing object to be detected.
In other embodiments, in the case that the number of pixels included in the moving object is less than or equal to the preset number threshold, the moving object is determined not to be the toss to be detected, and the coordinate subset of the moving object is not the coordinate subset of the toss to be detected.
Here, after the determination of the falling object to be detected in any falling object image is completed and the coordinate subset corresponding to the falling object to be detected is obtained, a mean value operation may be performed based on the coordinate subset of the falling object to be detected, and the determined coordinate mean value is used as the position coordinate of the falling object to be detected.
Therefore, in the embodiment of the disclosure, by using a density clustering algorithm, the clusters with the number of the pixels larger than the preset threshold are taken as the positions of the falling objects to be detected, so that other interference objects with too small area in the image, which are not the falling objects, can be effectively filtered, and the precision of high-altitude falling object detection is improved.
Fig. 7 is a schematic flow chart illustrating a sixth implementation process of the high altitude parabolic detection method according to the embodiment of the present disclosure, as shown in fig. 7, in the embodiment of the present disclosure, the method for obtaining the associated position coordinates of the to-be-detected falling object according to the acquisition time and each position coordinate of each falling object image may include the following steps:
s111, determining a similarity parameter between the first falling object and the second falling object according to the acquisition time of the first image and the second image, the position coordinate of the first falling object and the position coordinate of the second falling object.
And S112, matching the first falling object and the second falling object according to the similarity parameter and the budget target matching algorithm to obtain a matching result.
S113, acquiring the associated position coordinates of the first throwing object or the second throwing object according to the matching result.
In the embodiment of the present disclosure, taking two consecutive falling image frames before and after as an example, if each falling object image at least includes a first image and a second image, a first falling object exists in the first image, a second falling object exists in the second image, the first image and the second image are two consecutive falling object images whose acquisition times are adjacent, and further obtaining the associated position coordinates of the falling object to be measured on the consecutive falling object images can be implemented by the following method:
in some embodiments, in the case where there is one cast in the first image, the first cast may refer to one cast in the first image, and in the case where there are a plurality of casts in the first image, the first cast may refer to a plurality of different casts in the first image; correspondingly, one or more second falling objects may be provided.
It will be appreciated that for the same falling object, its position on the current falling image will try to be below the corresponding position in the previous frame or both positions will coincide. Correspondingly, if it is unknown whether the falling objects in the two frames of parabolic images are the same falling object, if the distance between the positions of the falling object in the two frames of images is shorter, it indicates that the similarity of the falling objects corresponding to the two positions is higher, and the falling objects may be the same falling object.
In the embodiment of the present disclosure, the distance may be calculated based on the position coordinate of the falling object to be detected in the current frame and the position coordinate of the falling object in the adjacent previous frame of falling image, and the similarity of the falling objects in the two frames of images may be determined based on the distance. Here, a plurality of falling objects to be measured may exist in each falling object image, and then distance calculation needs to be performed based on position coordinates of any two falling objects between two frames of falling object images, so as to determine similarity between the two falling objects.
For example, before it is uncertain whether the first and second drops are the same drop, the position coordinates (x) of the first drop in the first image may be based on1,y1) And the position coordinate (x) of the second falling object in the second image2,y2) And constructing similarity parameters S (x, y) between adjacent frame objects.
In some embodiments, the distance difference may be calculated based on coordinates, such as coordinate x difference in the direction of the x coordinate axis, (x difference1-x2) Then based on (x)1-x2) A similarity parameter S (x, y) is determined. Wherein a distance threshold T may be presetmAnd determining a similarity parameter S (x, y) based on the comparison result of the distance difference value of the falling object on two continuous frames and a preset distance threshold. Here, at the distance difference (x)1-x2) Greater than a predetermined distance threshold TmIn the case of (3), it can be determined that the first and second throwing objects in two consecutive frames of throwing object images are not the same throwing object; at a difference in distance (x)1-x2) Less than or equal to a preset distance threshold TmDuring the process, it may be determined that a certain similarity exists between the first and second throwing objects in two consecutive throwing object images, and may be the same throwing object, and then a similarity parameter between the first and second throwing objects may be constructed based on the position coordinates of the first throwing object and the position coordinates of the second throwing object, as follows:
wherein, in the formula (2), x is x2-x1,y=y2-y1,K1And K2The weight value of the similarity on the x axis of the coordinate and the weight value on the y axis of the coordinate are respectively, namely, the position in the x direction is more heavily referred to or the position in the y axis direction is heavily referred to when the similarity parameter is determined.
In some embodiments, when a plurality of falling objects exist on two frames of parabolic images with continuous acquisition time, distance calculation may be performed based on position coordinates of any two falling objects between the two frames of parabolic images, so as to determine a similarity parameter between the two falling objects.
In some embodiments, a bipartite graph model may be constructed from similarity parameters between two falling objects, i.e., each falling object in the first image is a set of vertices, i.e., a first subset, each falling object in the second image is a set of vertices, i.e., a second subset, the similarity function is an edge between two vertices in the two subsets, and two ends of each edge are respectively associated with one vertex in the first subset and one vertex in the second subset.
After a bipartite graph model is constructed on the basis of similarity parameters between every two throwing objects in two continuous frames of parabolic images, multi-target matching can be carried out through a maximum matching method, such as Hungarian algorithm, whether the throwing object to be detected in the previous frame can be matched in the current frame is further determined, and under the condition that the throwing object to be detected can be matched, namely the first throwing object is obtained through matching in the second image, the position coordinate of the first throwing object in the second image is determined as the associated position coordinate of the first throwing object; in addition, in the case of being unable to match, that is, the first falling object is not matched in the second image, it may be that a new falling object exists in the second image, that is, the motion trajectory of the first falling object ends in the second image or the first falling object in the second image is occluded, and at this time, the position coordinates of the second falling object may be determined as the associated position coordinates of the second falling object.
In the embodiment of the disclosure, the tracking matching of the to-be-detected falling object is sequentially performed on the adjacent front and rear frames of parabolic images according to the image acquisition time sequence, so that the associated position coordinates of the to-be-detected falling object can be further connected according to the image acquisition time sequence, and the motion trajectory segment of the to-be-detected falling object can be obtained.
Tracking and matching of the front and rear frames of the falling object to be detected through the image acquisition time and the position coordinates of the falling object to be detected can obtain the associated information of the falling object to be detected on the multi-frame falling object image so as to generate a track segment of the falling object to be detected for track restoration.
Fig. 8 is a seventh implementation flow diagram of the high-altitude parabolic detection method according to the embodiment of the present disclosure, and as shown in the seventh implementation flow diagram, in the embodiment of the present disclosure, after the motion trajectory segment of the to-be-detected falling object is generated based on the associated position coordinates, and before the motion trajectory segment meets the preset high-altitude parabolic condition, the method for performing high-altitude parabolic detection may further include the following steps:
s140, determining an included angle between the fitted straight line corresponding to the motion trail segment and the vertical direction, the length of the motion trail segment, and the falling percentage corresponding to the position coordinate meeting the preset falling condition in the associated position coordinates.
It should be understood that the motion trajectory of the falling object to be measured does not satisfy a certain function rule, but has a certain regularity, and in the embodiment of the present disclosure, a straight line fitting method may be introduced to perform straight line fitting processing on the motion trajectory segment of the falling object to obtain the movement.
In an embodiment, since the parabolic event corresponding to the tossing object to be detected is not a true high-altitude parabolic event, and may be similar to a case where a person lifts an object by hand, or lifts the object over the head, for example, an event person stands at a window to eat an apple, holds the apple with a hand, bites the mouth, and then puts down the apple, an included angle between a fitted straight line of the motion trajectory segment and the vertical direction may be calculated, and the included angle may be used as one of determination factors for determining whether the tossing object to be detected is a high-altitude tossing object, and whether the motion trajectory segment of the tossing object to be detected is a parabolic trajectory segment of the high-altitude parabolic event.
In another embodiment, it should be understood that the real high altitude parabolic event has a certain height range, and the length of the motion track of the falling object to be measured needs to exceed a certain length range due to the certain height range. Therefore, the length of the motion track segment of the to-be-detected throwing object can be determined, and the length of the motion track segment can also be used as one of the judgment factors for judging whether the to-be-detected throwing object is a high-altitude throwing object or not and whether the motion track segment of the to-be-detected throwing object is a throwing track segment of a high-altitude throwing event or not.
Wherein, the frame number of the images contained in the motion trail segment, i.e. the parabolic images, can be used to characterize the length of the motion trail segment.
In another embodiment, it should be understood that in a true high altitude parabolic event, the falling object is in a falling state and the parabolic trajectory is in a parabolic state, that is, the coordinate x value of the falling object to be measured in the current frame should be larger than the coordinate x value of the previous frame, the previous two frames, or even the starting frame. Therefore, the falling percentage of the trajectory of the to-be-detected falling object, that is, the percentage of the position coordinate, which satisfies the preset falling condition, in the associated position coordinates corresponding to the motion trajectory segment of the to-be-detected moving object, of the coordinate x value greater than the coordinate x value of the previous frame, in the associated position coordinates in the whole motion trajectory segment, can be determined, and the falling percentage of the motion trajectory segment can also be used as one of the judgment factors for judging whether the to-be-detected falling object is a high-altitude falling object and whether the motion trajectory segment of the to-be-detected falling object is a parabolic trajectory segment of a high-altitude parabolic event.
Here, taking the example that the motion trajectory segment of the to-be-detected falling object at least includes two consecutive falling object images, namely, the third image and the fourth image, which are adjacent in acquisition time, the associated position coordinates of the to-be-detected falling object at least include the third position coordinate of the to-be-detected falling object in the third image and the fourth position coordinate of the to-be-detected falling object in the fourth image. The preset falling condition is that the difference value of the horizontal coordinates between the third position coordinate and the fourth position coordinate is larger than a preset threshold value.
S150, in response to the fact that the included angle is smaller than a preset angle threshold value, the length is larger than a preset length threshold value, and the falling percentage is larger than a preset percentage threshold value, it is determined that the motion track segment meets a preset high altitude parabolic condition.
In an implementation manner of the embodiment of the disclosure, an included angle threshold, a trajectory length threshold, and a falling percentage threshold of a high-altitude parabolic event are preset, a fitted straight line corresponding to a motion trajectory segment of a to-be-detected falling object is compared with a preset angle threshold and an included angle in a vertical direction, a length of the motion trajectory segment of the to-be-detected falling object is compared with a preset length threshold, a falling percentage corresponding to the motion trajectory segment is compared with a preset percentage threshold, and meanwhile, a comparison result of three determination factors is combined to determine whether the to-be-detected falling object is the high-altitude falling object, in other words, whether the trajectory segment corresponding to the to-be-detected falling object is the parabolic trajectory segment of the high-altitude parabolic event is determined.
Under the conditions that an included angle between a straight line and the vertical direction after fitting of the motion track segment is smaller than a preset included angle threshold value, the length of the motion track segment is larger than a preset length threshold value, and the falling percentage corresponding to the motion track segment is larger than a preset percentage threshold value, namely the three judgment factors simultaneously meet the corresponding preset threshold value conditions, the to-be-detected falling object is determined to be a high-altitude falling object, and the motion track segment corresponding to the to-be-detected falling object is a parabolic track segment of a high-altitude parabolic event.
In another embodiment of the disclosure, under the condition that at least one of the three determination factors does not satisfy the corresponding preset threshold condition, it is determined that the to-be-detected falling object is not a true high-altitude falling object.
Under the condition that an included angle between a straight line and the vertical direction after fitting of a motion track segment of the falling object to be detected is greater than or equal to a preset included angle threshold value, determining that the falling object to be detected is not a high-altitude falling object, wherein the motion track segment corresponding to the falling object to be detected is not a parabolic track segment of a high-altitude parabolic event; or determining that the falling object to be detected is not a high-altitude falling object under the condition that the length of the motion track segment is smaller than a preset length threshold, wherein the motion track segment corresponding to the falling object to be detected is not a parabolic track segment of a high-altitude parabolic event; or determining that the falling percentage corresponding to the movement track segment is larger than a preset percentage threshold value, and determining that the falling object to be detected is not the high-altitude falling object, wherein the movement track segment corresponding to the falling object to be detected is not the parabolic track segment of the high-altitude parabolic event.
Or determining that the falling object to be detected is not a high-altitude falling object under the condition that the included angle between the straight line and the vertical direction after the fitting of the motion track segment is greater than or equal to a preset angle threshold value and the length of the motion track segment is less than a preset length threshold value, wherein the motion track segment corresponding to the falling object to be detected is not a parabolic track segment of a high-altitude parabolic event; or determining that the falling object to be detected is not a high-altitude falling object under the condition that the included angle between the straight line and the vertical direction after the fitting of the motion track segment is greater than or equal to a preset angle threshold value and the falling percentage corresponding to the motion track segment is greater than a preset percentage threshold value, wherein the motion track segment corresponding to the falling object to be detected is not a parabolic track segment of a high-altitude parabolic event; or under the condition that the length of the motion track segment is smaller than a preset length threshold value and the falling percentage corresponding to the motion track segment is larger than a preset percentage threshold value, determining that the falling object to be detected is not a high-altitude falling object, wherein the motion track segment corresponding to the falling object to be detected is not a parabolic track segment of a high-altitude parabolic event.
Therefore, in the embodiment of the disclosure, the generated trajectory segment of the tossing and dropping object to be detected can be judged before trajectory restoration, trajectory segments which do not belong to a high-altitude parabolic event are filtered, and high-altitude parabolic trajectory segments meeting a high-altitude parabolic condition are screened out, so that the high-altitude parabolic trajectory can be quickly and accurately restored.
Fig. 9 is an implementation flow diagram of an eighth implementation flow of the high-altitude parabolic detection method provided in the embodiment of the present disclosure, as shown in fig. eight, in the embodiment of the present disclosure, the method for generating a complete parabolic trajectory of the high-altitude tossed object based on the parabolic trajectory segment may further include the following steps:
s131, determining a starting falling object image to an ending falling object image of the high-altitude parabolic event based on the parabolic track segment.
S132, performing interpolation processing on the coordinates of each relevant position of the to-be-detected throwing object in each throwing object image from the initial throwing object image to the final throwing object image according to image acquisition time to obtain a complete throwing track.
In the embodiment of the present disclosure, the parabolic event detection may be performed on the obtained parabolic track segments belonging to the high-altitude parabolic events based on the frame interval values between the parabolic images, and a start frame and an end frame corresponding to the same high-altitude parabolic event are determined, that is, a start falling object image to an end falling object image are determined.
In some embodiments, a frame interval threshold value between different high-altitude parabolic events may be preset, and a determination of a frame interval value between a parabolic image in a parabolic track segment and a previous frame of parabolic image is sequentially performed to determine whether the previous frame and the next frame of parabolic images belong to the same high-altitude parabolic event, so as to update a start frame and an end frame of the parabolic event.
Illustratively, the first image and the second image of the parabolic image of the front frame and the back frame are taken as an example for explanation.
Wherein the frame interval value of the current second image and the first image may be calculated after determining that the first image belongs to the first high altitude parabolic event and determining the first image as the end frame corresponding to the first high altitude parabolic event. Under the condition that the frame interval value is smaller than or equal to a preset frame interval threshold value, determining that the second image and the first image belong to the same high-altitude parabolic event, and updating an end frame of the first high-altitude parabolic event into the second image; correspondingly, in the case that the frame interval value is greater than the preset frame interval threshold value, it is determined that the second image and the first image do not belong to the same high altitude parabolic event, which indicates that the ending frame of the first high altitude parabolic event is the first image, and the second image belongs to a new parabolic event, i.e., a second high altitude parabolic event, and at this time, the second image may be determined as the starting frame of the new second high altitude parabolic event.
It can be understood that each frame of parabolic image in one parabolic track segment belongs to the same high-altitude parabolic event to a great extent, and as there may exist multiple parabolic track segments meeting the high-altitude parabolic condition for the falling object to be detected, it is necessary to determine multiple track segments belonging to the same high-altitude parabolic event based on the frame interval value, and then update the start frame to the end frame corresponding to the high-altitude parabolic event.
For example, after determining a start frame to an end frame of a high altitude parabolic event based on a first parabolic track segment of a first falling object, it may be continuously determined whether a next parabolic track segment is a parabolic track segment of the first falling object, a frame interval value between a start parabolic image of the next parabolic track segment and an end frame of an end parabolic image of the first parabolic track segment may be calculated, and if the frame interval value is greater than a preset interval threshold, the two parabolic track segments are different high altitude parabolic events; if the frame interval value is smaller than the preset interval threshold value, the two parabolic track segments are the same high-altitude parabolic event, and the ending frame of the high-altitude parabolic event can be continuously updated based on the next parabolic track segment until a starting parabolic image to an ending parabolic image of a complete high-altitude parabolic event are determined, namely, a complete high-altitude parabolic event occurring interval is determined.
For example, logic code to determine a high altitude parabolic event interval initializes a high altitude parabolic event start frame index d as followss0, end frame index deWhen it is 0, let δeFor the frame interval threshold between high altitude parabolic events, start is initialized simultaneously],ends=[]For recording the start and end frames of each high altitude parabolic event.
Based on the logic code, the interval of each high altitude parabolic event, i.e. the start frame to end frame list starts, ends, can be returned.
Here, the determination process of the high altitude parabolic events is cycled based on the time sequence of the parabolic images in the parabolic track segments, so that the start frame and the end frame corresponding to different high altitude parabolic events can be determined.
In the embodiment of the disclosure, after the high-altitude parabolic event occurrence interval corresponding to the high-altitude parabolic object is determined, the position coordinates of the parabolic object in each frame of parabolic images from the start parabolic image to the end parabolic image of the high-altitude parabolic event can be interpolated according to the time sequence, and the position coordinates of the parabolic object in each parabolic image in the high-altitude parabolic event interval are mapped on one plane image and connected, so that a complete parabolic track of the high-altitude parabolic event corresponding to the high-altitude parabolic object is formed.
In the embodiment of the disclosure, a starting frame to an ending frame corresponding to a high-altitude parabolic event are determined based on event detection, and a complete parabolic track of the high-altitude parabolic event is restored based on position information of a to-be-detected falling object in the starting frame to the ending frame.
Based on the above embodiments, in an embodiment of the present disclosure, fig. 10 is a schematic structural diagram of a high altitude parabolic detection apparatus proposed in an embodiment of the present disclosure, and as shown in fig. 10, the high altitude parabolic detection apparatus 10 includes an obtaining unit 11, a determining unit 12, and a generating unit 13.
An acquiring unit 11 configured to acquire a falling object image in which a falling object to be detected exists from an image to be detected;
a determining unit 12 configured to determine position coordinates of the falling object to be detected in each falling object image;
the obtaining unit 11 is further configured to obtain the associated position coordinates of the to-be-detected falling object according to the acquisition time and the position coordinates of each falling object image;
the generating unit 13 is configured to generate a motion trail segment of the to-be-detected falling object based on the associated position coordinates;
the determining unit 12 is further configured to determine the falling object to be detected as a high-altitude falling object in response to that the motion trajectory segment meets a preset high-altitude parabolic condition, and determine the motion trajectory segment as a parabolic trajectory segment of a high-altitude parabolic event;
the generating unit 13 is further configured to generate a complete parabolic trajectory of the high-altitude falling object based on the parabolic trajectory segment.
In some embodiments, the obtaining unit 11 is configured to, for any image to be detected, generate a binary image corresponding to the any image to be detected; the binary image comprises a foreground moving object with a first pixel value and a background non-moving object with a second pixel value; and responding to the fact that the pixel proportion of the foreground moving object in the binary image is larger than a preset proportion threshold value, determining that the to-be-detected falling object exists in any to-be-detected image, and determining that the to-be-detected image is the falling object image.
In some embodiments, the obtaining unit 11 is configured to input the any image to be detected into a gaussian mixture model, so as to obtain an initial binary image corresponding to the any image to be detected; performing image denoising processing on the initial binary image to obtain a denoised binary image corresponding to any image to be detected; and performing image repairing processing on the denoised binary image to obtain the binary image corresponding to any image to be detected.
In some embodiments, the determining unit 12 is configured to, for any one of the toss images, obtain an initial position coordinate set of a foreground moving object corresponding to the any one of the toss images in a corresponding binary image; determining a coordinate subset of the to-be-detected falling object in any falling object image based on a preset clustering algorithm and the initial position coordinate set; and calculating a coordinate average value corresponding to the coordinate subset of the to-be-detected falling object, and determining the coordinate average value as the position coordinate of the to-be-detected falling object.
In some embodiments, the determining unit 12 is configured to perform classification processing on a foreground moving object corresponding to any one of the falling object images based on a preset clustering algorithm and the initial coordinate set, so as to obtain at least one moving object and a coordinate subset corresponding to any one of the moving objects; determining the number of pixels corresponding to any moving object; and determining the target moving object with the number of pixels larger than a preset number threshold value as the to-be-detected falling object, and determining the coordinate subset of the target moving object as the coordinate subset of the to-be-detected falling object.
In some embodiments, each of the falling object images at least comprises a first image with a first falling object and a second image with a second falling object, and the first image and the second image are two adjacent falling object images in front and back frames of which the acquisition time is adjacent; the acquiring unit 11 is configured to determine a similarity parameter between the first falling object and the second falling object according to the acquisition time of the first image and the second image, the position coordinate of the first falling object, and the position coordinate of the second falling object; matching the first falling object and the second falling object according to the similarity parameter and a budget target matching algorithm to obtain a matching result; and acquiring the associated position coordinates of the first falling object or the second falling object according to the matching result.
In some embodiments, after generating the motion trajectory segment of the to-be-detected falling object based on the associated position coordinates and before responding to that the motion trajectory segment satisfies a preset high altitude parabolic condition, the determining unit 12 is further configured to determine an included angle between a fitted straight line corresponding to the motion trajectory segment and the vertical direction, a length of the motion trajectory segment, and a falling percentage corresponding to a position coordinate satisfying a preset falling condition in the associated position coordinates; and determining that the motion track segment meets the preset high altitude parabolic condition in response to the included angle being smaller than a preset angle threshold, the length being larger than a preset length threshold and the falling percentage being larger than a preset percentage threshold.
In some embodiments, the associated position coordinates at least include a third position coordinate of the falling object to be detected in a third image and a fourth position coordinate of a fourth image, respectively, where the third image and the fourth image are two frames of falling object images before and after adjacent acquisition times, and the preset falling condition is that a difference in a horizontal coordinate between the third position coordinate and the fourth position coordinate is greater than a preset threshold.
In some embodiments, the generating unit 13 is configured to determine a starting falling object image to an ending falling object image of the high altitude parabolic event based on the parabolic track segment; and performing interpolation processing on the coordinates of each relevant position of the to-be-detected throwing object in each throwing object image from the initial throwing object image to the final throwing object image according to image acquisition time to obtain the complete parabolic track.
In some embodiments, the obtaining unit 11 is further configured to obtain an initial image, and determine a target detection area from the initial image based on a preset polygon profile; and generating a minimum detection frame based on the target detection area, and performing image segmentation processing on the initial image based on the minimum detection frame to obtain the image to be detected.
In an embodiment of the present disclosure, further, fig. 11 is a schematic diagram of a composition structure of an aerial parabolic detection apparatus provided in an embodiment of the present disclosure, and as shown in fig. 11, an aerial parabolic detection apparatus 20 provided in an embodiment of the present disclosure may further include a processor 21, a memory 22 storing executable instructions of the processor 21, and further, the living body detection apparatus 20 may further include a communication interface 23, and a bus 24 for connecting the processor 21, the memory 22, and the communication interface 23.
In the embodiment of the present disclosure, the Processor 21 may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a ProgRAMmable Logic Device (PLD), a Field ProgRAMmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understood that the electronic devices for implementing the above-described processor functions may be other devices, and the embodiments of the present disclosure are not particularly limited. The biopsy device 20 may further comprise a memory 22, which memory 22 may be connected to the processor 21, wherein the memory 22 is adapted to store executable program code comprising computer operating instructions, and wherein the memory 22 may comprise a high speed RAM memory and may further comprise a non-volatile memory, e.g. at least two disk memories.
In the embodiment of the present disclosure, the bus 24 is used to connect the communication interface 23, the processor 21, and the memory 22 and the intercommunication among these devices.
In an embodiment of the present disclosure, memory 22 is used to store instructions and data.
Further, in the embodiment of the present disclosure, the processor 21 is configured to obtain a falling object image in which a falling object to be detected exists from the image to be detected, and determine a position coordinate of the falling object to be detected in each falling object image; acquiring associated position coordinates of the to-be-detected falling object according to the acquisition time and the position coordinates of each falling object image, and generating a motion track segment of the to-be-detected falling object based on the associated position coordinates; determining the falling object to be detected as a high-altitude falling object in response to the motion track segment meeting a preset high-altitude parabolic condition, and determining the motion track segment as a parabolic track segment of a high-altitude parabolic event; generating a complete parabolic trajectory of the high-altitude falling object based on the parabolic trajectory segment.
In practical applications, the Memory 22 may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (Hard Disk Drive, HDD) or a Solid-State Drive (SSD); or a combination of the above types of memories and provides instructions and data to the processor 21.
In addition, each functional module in this embodiment may be integrated into one recommendation unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware or a form of a software functional module.
Based on the understanding that the technical solution of the present embodiment essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and include several instructions for causing a high altitude parabolic detection device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method of the present embodiment. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiment of the disclosure provides high-altitude parabolic detection equipment, which acquires a falling object image with a falling object to be detected from an image to be detected and determines position coordinates of the falling object to be detected in each falling object image; acquiring associated position coordinates of the to-be-detected falling object according to the acquisition time and the position coordinates of each falling object image, and generating a motion track segment of the to-be-detected falling object based on the associated position coordinates; determining the falling object to be detected as a high-altitude falling object in response to the motion track segment meeting the preset high-altitude parabolic condition, and determining the motion track segment as a parabolic track segment of a high-altitude parabolic event; and generating a complete parabolic track of the high-altitude falling object based on the parabolic track segment. Therefore, the robust post-processing method of adding single frame and multiple frames is provided, not only can the single frame with the interference object be filtered, the single frame image with the throwing object to be detected is found out, the single frame false detection is removed, but also the position correlation information of the throwing object to be detected on the multiple frames can be obtained based on the target matching algorithm to carry out track judgment and complete track restoration, the high-altitude parabolic event detection is completed quickly and accurately, and the efficiency and the precision of the high-altitude parabolic detection are further improved.
Embodiments of the present disclosure provide a computer-readable storage medium on which a program is stored, which when executed by a processor implements a high altitude parabolic detection method as described above.
Specifically, the program instructions corresponding to a high altitude parabola detection method in the present embodiment may be stored on a storage medium such as an optical disc, a hard disc, a U-disc, etc., and when the program instructions corresponding to a high altitude parabola detection method in the storage medium are read or executed by an electronic device, the method includes the following steps:
acquiring a throwing object image with a throwing object to be detected from the image to be detected, and determining the position coordinates of the throwing object to be detected in each throwing object image;
acquiring associated position coordinates of the to-be-detected falling object according to the acquisition time and the position coordinates of each falling object image, and generating a motion track segment of the to-be-detected falling object based on the associated position coordinates;
determining the falling object to be detected as a high-altitude falling object in response to the motion track segment meeting a preset high-altitude parabolic condition, and determining the motion track segment as a parabolic track segment of a high-altitude parabolic event;
generating a complete parabolic trajectory of the high-altitude falling object based on the parabolic trajectory segment.
Accordingly, the embodiments of the present disclosure further provide a computer program product, where the computer program product includes computer-executable instructions for implementing the steps in the high altitude parabolic detection method proposed by the embodiments of the present disclosure.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of implementations of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable high altitude parabolic detection apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable high altitude parabolic detection apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable high altitude parabolic sensing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable high altitude parabolic sensing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks in the flowchart and/or block diagram block or blocks.
The above description is only for the preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure.