WO2023273011A9 - Method, apparatus and device for detecting object thrown from height, and computer storage medium - Google Patents

Method, apparatus and device for detecting object thrown from height, and computer storage medium Download PDF

Info

Publication number
WO2023273011A9
WO2023273011A9 PCT/CN2021/123512 CN2021123512W WO2023273011A9 WO 2023273011 A9 WO2023273011 A9 WO 2023273011A9 CN 2021123512 W CN2021123512 W CN 2021123512W WO 2023273011 A9 WO2023273011 A9 WO 2023273011A9
Authority
WO
WIPO (PCT)
Prior art keywords
image
optical flow
measured
parabolic
center point
Prior art date
Application number
PCT/CN2021/123512
Other languages
French (fr)
Chinese (zh)
Other versions
WO2023273011A1 (en
Inventor
蔡官熊
赵晨
方宝乐
曾星宇
赵瑞
Original Assignee
深圳市商汤科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市商汤科技有限公司 filed Critical 深圳市商汤科技有限公司
Publication of WO2023273011A1 publication Critical patent/WO2023273011A1/en
Publication of WO2023273011A9 publication Critical patent/WO2023273011A9/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/269Analysis of motion using gradient-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30241Trajectory

Definitions

  • the present disclosure relates to the field of computer vision, and in particular to a method, device and equipment for detecting a high-altitude parabola, and a computer storage medium.
  • high-altitude parabolic detection detects dropped objects by analyzing the monitoring video of the building floor, so as to arm the floors of urban high-rise buildings and prevent possible high-altitude Real-time alarm for parabolic events.
  • Embodiments of the present disclosure provide a method, device, equipment, and computer storage medium for detecting high-altitude parabolic objects.
  • An embodiment of the present disclosure provides a high-altitude parabolic detection method, the method comprising:
  • the optical flow model based on deep learning is used to generate a dense optical flow map to detect moving objects, which not only has good robustness and high precision, but also takes less time and has less noise; on the other hand, On the basis of using the preset optical flow model for moving object detection, based on the robust single-frame plus multi-frame post-processing method, filter the single frame with disturbing objects, and find out the single-frame image with throwing objects , after removing single-frame false detections, track recovery and detection of high-altitude parabolic events are performed by combining the position information of the projectile on multiple frames.
  • An embodiment of the present disclosure provides a high-altitude parabolic detection device, including:
  • the reading part is configured to sequentially read two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition;
  • the generating part is configured to generate the optical flow images corresponding to the two adjacent images to be tested through a preset optical flow model
  • the determining part is configured to determine from the optical flow images the optical flow images to be measured that there is a thrown object, and determine the position coordinates of the center point of the thrown object in each optical flow image to be measured;
  • the determining part is further configured to determine the trajectory of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured;
  • the processing part is configured to perform high-altitude parabolic detection processing based on the motion trajectory.
  • An embodiment of the present disclosure provides a high-altitude parabolic detection device.
  • the high-altitude parabolic detection device includes a processor and a memory storing instructions executable by the processor. When the instructions are executed by the processor, the above-mentioned High-altitude parabolic detection method.
  • An embodiment of the present disclosure provides a computer-readable storage medium on which a program is stored, which is applied to a high-altitude parabolic detection device.
  • the program is executed by a processor, the above-mentioned high-altitude parabolic detection method is realized.
  • the present disclosure provides a computer program, including computer readable codes.
  • the computer readable codes run in electronic equipment and are executed by a processor in the electronic equipment, the above-mentioned high-altitude parabolic detection method is realized. .
  • the present disclosure provides a computer program product, which, when run on a computer, causes the computer to execute the above-mentioned high-altitude parabolic detection method.
  • the high-altitude parabolic detection equipment can sequentially read two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition, and generate adjacent images through the preset optical flow model.
  • the position coordinates of the center point of the dropped object in the photometric flow image determine the motion track of the dropped object; and the high-altitude parabolic detection process is performed based on the motion track.
  • the present disclosure uses an optical flow model constructed based on deep learning to generate a dense optical flow map to detect moving objects, which not only has good robustness and high precision, but also takes less time and has less noise;
  • this disclosure also proposes a robust single-frame plus multi-frame post-processing method, which filters the single frame with disturbing objects to find out the For the single-frame image of the falling object, after removing the single-frame false detection, combined with the position information of the falling object on multiple frames for trajectory recovery and high-altitude parabolic event detection, which further improves the efficiency and accuracy of high-altitude parabolic detection.
  • FIG. 1 is a schematic diagram of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure
  • Fig. 2 is a schematic diagram of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of the trajectory of a dropped object proposed by an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of the third implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure
  • FIG. 5 is a schematic diagram 4 of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure
  • FIG. 7 is a schematic diagram six of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure VII;
  • FIG. 9 is a schematic diagram of the eighth implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram of the implementation flow diagram of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure.
  • FIG. 11 is a schematic diagram of a scene of a high-altitude parabolic detection method proposed by an embodiment of the present disclosure
  • Fig. 13 is a schematic diagram of the composition and structure of a high-altitude parabolic detection device proposed by an embodiment of the present disclosure.
  • first ⁇ second ⁇ third is only used to distinguish similar objects, and does not represent a specific ordering of objects. Understandably, “first ⁇ second ⁇ third” Where permitted, the specific order or sequencing may be interchanged such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein.
  • high-altitude parabolic detection detects dropped objects by analyzing the monitoring video of the building floor, so as to arm the floors of urban high-rise buildings and prevent possible high-altitude Real-time alarm for parabolic events.
  • the high-altitude parabolic detection depends on the detection of moving objects in the image.
  • the inter-frame difference method or the background difference method is often used to detect moving objects.
  • the principle of the inter-frame difference method is: when there is a moving object in the video, there will be a difference in grayscale between adjacent frames (or three adjacent frames), and the absolute value of the grayscale difference between two frames of images is calculated. value, the static object is all 0 on the difference image, and the moving object, especially the contour of the moving object, is non-zero due to the grayscale change. When the absolute value exceeds a certain threshold, it can be judged as a moving object. , so as to realize the detection function of the target, that is, the difference method between adjacent frames directly performs a difference operation on two adjacent frames of images, and takes the absolute value of the difference operation to form a moving object.
  • the frame-to-frame difference method can obtain the outer contour of the moving target, the method is simple and the computational complexity is small, but it has the defects of fixed camera, robust phase difference and low precision, and is generally only suitable for simple real-time motion detection.
  • the basic principle of the background subtraction method is to subtract the current frame in the image sequence from the background reference model (background image) that has been determined or obtained in real time, find the difference, and calculate the area where the pixel difference with the background image exceeds a certain threshold. It is the motion area, so as to determine the motion position, outline, size and other characteristics.
  • the background subtraction method can obtain the entire area of the moving target.
  • the advantage is fast and accurate, but the robustness is poor, the camera must be fixed, and it is difficult to use inter-frame information, and image post-processing is difficult, especially in weak light or rainy and snowy weather. more affected.
  • the moving object detection based on the optical flow method is further proposed in related technologies, such as the algorithm using the optical flow constraint equation, the traditional (Lucas Kanade, KL) algorithm, the
  • the optical flow method mainly uses the changes of pixels in the image sequence in the time domain and the correlation between adjacent frames, and calculates the motion information of objects between adjacent frames according to the correspondence between the previous frame and the current frame.
  • Embodiments of the present disclosure provide a high-altitude parabolic detection method, device, equipment, and computer storage medium.
  • an optical flow model based on deep learning is used to generate a dense optical flow graph to detect moving objects, which is not only robust Good, high precision, and less time-consuming, less noise;
  • this disclosure also proposes a robust single-frame plus multi-frame post-processing The method is to filter the single frame with disturbing objects, find out the single frame image with the thrown object, and remove the false detection of single frame, and combine the position information of the dropped object on multiple frames to recover the trajectory and detect the high-altitude parabolic event , which further improves the efficiency and accuracy of high-altitude parabolic detection.
  • the high-altitude parabolic detection method proposed in the embodiment of the present disclosure is applied to high-altitude parabolic detection equipment.
  • the following describes the exemplary application of the high-altitude parabolic detection equipment proposed by the embodiments of the present disclosure.
  • the high-altitude parabolic detection equipment proposed by the embodiments of the present disclosure can be implemented as mobile terminals, notebook computers, tablet computers, desktop computers, servers, and various industrial equipment, etc. .
  • FIG. 1 is a schematic diagram of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure.
  • the high-altitude parabolic The detection method may include the following steps:
  • the high-altitude parabolic detection process may be performed on historical events, or the high-altitude parabolic detection process may be performed on current events in real time.
  • the image to be tested refers to an image that requires moving object detection.
  • the image may be collected in real time or stored locally.
  • the image to be tested may be an RGB color image, a grayscale image, or other sensor image data (such as an infrared image).
  • the high-altitude parabolic detection equipment can be equipped with image acquisition and monitoring equipment, such as a camera, through which the image to be tested can be collected in real time; or, a video historically collected by the camera can be stored locally, and the video stream can be read and analyzed locally. Get the image to be tested.
  • image acquisition and monitoring equipment such as a camera, through which the image to be tested can be collected in real time; or, a video historically collected by the camera can be stored locally, and the video stream can be read and analyzed locally. Get the image to be tested.
  • FIG. 2 is a schematic diagram of the second implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure.
  • the method for obtaining the image to be tested may include the following steps:
  • S101 Acquire an initial image, and determine a target detection area from the initial image based on a preset polygonal outline.
  • the range of images it can acquire may include target monitoring objects (such as buildings) and greenery or fixed equipment downstairs, such as light poles and numbers.
  • target monitoring objects such as buildings
  • greenery or fixed equipment downstairs such as light poles and numbers.
  • green facilities such as trees will have a certain impact on the detection results of moving objects. The impact can be that fallen leaves are easily judged as high-altitude objects, and additional processing tasks are brought to image post-processing, slowing down the high-altitude Speed of parabola detection processing.
  • the monitoring screen of each image acquisition and monitoring device can be analyzed, and the area without obstructions can be marked as the monitoring area of the target monitoring object (such as a building), and then when performing subsequent image analysis, Only analyze the monitoring area, ignore the image content of other non-monitoring areas, and speed up the processing speed of high-altitude parabolic detection.
  • the initial image refers to an image within a monitoring range that is collected in real time by an image acquisition monitoring device, or a video within a monitoring range that is locally historically stored.
  • a polygonal contour C that is, a preset polygonal contour
  • the region of interest R is demarcated from the initial image by the preset polygonal contour as the target detection region, ignoring the Other interfering graphic content.
  • the high-altitude parabolic detection device can perform binarization processing on the initial image based on the preset polygonal outline, first set the image pixels of the target detection area corresponding to the preset polygonal outline to 1, and set the image pixels outside the target detection area to 0, Then perform pixel point multiplication between the binarized image and the original image, so that the image of the target detection area retains the original pixel value, and the image pixels outside this area are all 0, so as to determine the target detection area existing in the initial image .
  • the pixels in other areas are all 0, and the obtained target detection area can cover the target monitoring object (such as a building) to the greatest extent, that is, the maximum coverage of the potential trajectory of the dropped object, and also Avoids the effects of trees, sky, light poles, and some other distractions.
  • the target dropped object may be an irregular polygon in the actual situation, so before the model is input, the area of the target dropped object needs to be regularized. Among them, the minimum detection frame of the Bounding box corresponding to the target drop area can be generated.
  • the edge position coordinates of the target drop area can be taken to generate a minimum detection frame. It can take the leftmost edge coordinate x 1 , the rightmost edge coordinate x 2 , the uppermost edge coordinate y 1 and the lowermost edge coordinate y 2 of the target drop area, and then generate the minimum border (x 1 , y 1 , x 2 , y 2 ).
  • image segmentation processing may be performed on the initial image based on the minimum detection frame, that is, image frame cropping, and then the image to be tested may be obtained.
  • the preset optical flow model is a model with high precision and fast inference speed constructed and trained based on deep learning technology through convolutional neural network and recurrent neural network.
  • the input of the optical flow model is two adjacent frames of images to be tested, and the output is an optical flow map that can reflect the speed and direction of the moving object, so as to realize the detection of the moving object in the dropped image.
  • the optical flow image is an image that reflects the moving speed and moving direction of the moving object.
  • an optical flow map can be generated based on adjacent frames in the video stream, which can reflect the motion The movement of the object from the point of the previous frame image to the second frame image. It can be seen that all existing moving objects can be found based on the optical flow map.
  • each adjacent two frames of images to be tested among the multiple frames of images to be tested obtained through the processing of S101a-S101b may be sequentially formed into an image sample pair according to the time sequence of image acquisition, For example, the image sample pair (I k , I k+1 ), and then input the image sample pair into the preset optical flow model to obtain a dense optical flow map for reflecting moving objects, that is, to generate adjacent The optical flow images corresponding to the two images to be tested.
  • u k represents the moving speed of the moving object in the vertical direction
  • v k represents the moving speed in the horizontal direction
  • k represents the frame sorting value of the image, such as the kth optical flow image.
  • S101a-S101b can be performed on each frame of image in the locally stored historical video to obtain the image to be tested corresponding to each frame of image, Then, the images to be tested obtained after image segmentation are read in batches, and image sample pairs are sequentially constructed from two adjacent frames of images to be tested based on the image acquisition time, and input into the preset optical flow model for moving object detection to generate each adjacent The optical flow images corresponding to the two images to be tested.
  • S110 Determine, from the optical flow images, the optical flow images to be measured that contain the dropped objects, and determine the position coordinates of the center points of the dropped objects in each optical flow image to be measured.
  • the optical flow images corresponding to the two adjacent images to be tested are generated based on the preset optical flow model
  • the single-frame post-processing method can be used to filter the interference images or abnormal images of non-high-altitude throwing objects to obtain images with real throwing objects and less noise, and reduce the false detection rate of high-altitude parabolic detection.
  • the obtained optical flow images can be further analyzed and processed, and the current optical flow images determined to be excessively noisy, with too many types of moving objects or abnormal optical flow images can be filtered, and the current optical flow images can be filtered out.
  • a single-frame binarization method may be used to determine whether there is a real falling object in the current optical flow image.
  • the position coordinates of the center point of the dropped object in any optical flow image to be measured may be continuously determined.
  • the position clustering method can be introduced to determine the position coordinates of the center point of the dropped object.
  • the optical flow image generation of the real-time collected image to be tested can be sequentially performed, whether there is a thrown object in the corresponding optical flow image, and the position coordinates of the center point of the thrown object in the optical flow image to be tested can be determined, etc.
  • multiple frames of the optical flow images to be measured and the coordinates of the central point of the dropped object in each optical flow image to be measured can be obtained.
  • the trajectory restoration of the dropped object can be performed based on a multi-frame post-processing method, wherein the trajectory restoration of the dropped object can be performed based on the position coordinates of the center point of the dropped object in each optical flow image to be measured.
  • the coordinates of the center point of the dropped object in each optical flow image to be measured are independent and single, the coordinates of the center point of the dropped object in each optical flow image to be measured can be first calculated according to the coordinates of each optical flow image to be measured Interpolation processing is performed in order of generation time, and then the center point position coordinates of the dropped objects in each optical flow image to be measured are mapped on a plane image, and the center point position coordinates of the dropped objects are connected to facilitate The trajectory corresponding to the dropped object is formed.
  • FIG. 3 is a schematic diagram of a motion trajectory of a dropped object proposed by an embodiment of the present disclosure, and the motion trajectory is formed by position coordinates of multiple center points of the dropped object in multiple consecutive frames of optical flow images to be measured.
  • a trajectory straight line fitting method can be introduced to detect the high-altitude parabolic event of the dropped object, so as to further determine the corresponding motion of the dropped object Whether the event is a high-altitude parabolic event.
  • the angle between the trajectory after the straight line fitting and the vertical direction (the slope of the trajectory after the straight line fitting), the height of the object falling, and other information can be used to detect the high-altitude parabolic event of the dropped object.
  • the event that a person raises an apple with his hands above his head in front of the camera is also a motion event of throwing an object, but this event is not a high-altitude parabolic event in essence; while a person standing on the eighth floor of a building will The motion event of a dropped object such as an apple falling to the ground is considered a high-altitude parabolic event.
  • An embodiment of the present disclosure provides a high-altitude parabolic detection method.
  • the high-altitude parabolic detection device sequentially reads two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image collection, and uses the preset optical flow model Generate optical flow images corresponding to two adjacent images to be tested; determine from the optical flow images the optical flow images to be measured where there is a thrown object, and determine the position coordinates of the center point of the dropped object in each optical flow image to be measured; The trajectory of the dropped object is determined according to the position coordinates of the center point of the dropped object in each optical flow image to be measured; and the high-altitude parabolic detection process is performed based on the trajectory.
  • the present disclosure uses an optical flow model constructed based on deep learning to generate a dense optical flow map to detect moving objects, which not only has good robustness and high precision, but also takes less time and has less noise;
  • this disclosure also proposes a robust single-frame plus multi-frame post-processing method, which filters the single frame with disturbing objects to find out the For the single-frame image of the falling object, after removing the single-frame false detection, combined with the position information of the falling object on multiple frames for trajectory recovery and high-altitude parabolic event detection, which further improves the efficiency and accuracy of high-altitude parabolic detection.
  • FIG. 4 is a schematic diagram of the implementation process of the high-altitude parabolic detection method proposed in the embodiment of the present disclosure. As shown in FIG. The method for determining the optical flow image to be tested in which there is a thrown object in the flow image also includes the following steps:
  • any optical flow image For any optical flow image, generate a binary image corresponding to any optical flow image; wherein the binary image includes a foreground moving object with a first pixel value and a background non-moving object with a second pixel value.
  • a single-frame binarization method can be used to determine whether there is a real falling object in the current optical flow image Judgment is made to determine the optical flow image to be measured where there is a thrown object.
  • the optical flow image may first be converted into a binary image, that is, a grayscale image including only the first pixel value and the second pixel value in the image.
  • a binary image corresponding to an optical flow image includes a pixel value of 0 and a pixel value of 255.
  • the region where the pixel value in the image is greater than or equal to the critical pixel gray value as the region where the moving object exists, and the The pixel value of the area in the binary image is set as the first pixel value, otherwise, the area where the pixel value in the image is smaller than the critical pixel gray value is determined as the area where the non-moving object is located, and the pixel value of the area in the binary image If the value is set to the second pixel value, the binary image corresponding to any optical flow image can be obtained.
  • the first pixel value in the binary image may be 255, representing a foreground moving object, and the second pixel value may be 0, representing a background non-pixel object.
  • FIG. 5 is a schematic diagram of the fourth implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure.
  • the method for generating the binary image corresponding to any optical flow image may include the following steps:
  • S111a Perform single-channel grayscale conversion processing on any optical flow image to obtain a single-channel grayscale image corresponding to any optical flow image.
  • the current optical flow image when converting the current optical flow image to a binary image, can be converted to a grayscale image first, and then the optical flow image can be obtained by binarizing the grayscale image The corresponding binary image.
  • optical flow image is a multi-channel image
  • conversion of the multi-channel optical flow image to a single-channel grayscale image is performed first.
  • the grayscale image conversion can be performed based on the following formula:
  • the single-channel grayscale image corresponding to the current optical flow image Perform normalization processing so that the gray value of the pixels is evenly distributed between 0-255 values, and obtain a normalized gray image to reduce interference to subsequent processing. Further, the normalized grayscale image can be transformed into a binary image.
  • the critical pixel gray value for image binarization can be set in advance, and the pixel whose pixel value is greater than the critical pixel gray value is determined as a foreground moving object with a pixel value of 255 in the binary image.
  • the pixel value Pixels smaller than the critical pixel gray value are determined as background moving objects with a pixel value of 0 in the binary image.
  • the binarized image corresponding to the current optical flow image can be obtained by performing image binarization processing such as the Otsu method OSTU
  • the number of pixels occupied by the foreground moving object in the binary image can be used to characterize the probability of moving objects in the optical flow image, then the current optical flow can be further calculated based on the ratio of the number of pixels of the foreground moving object in the binary image. Whether there is a falling object in the image is judged.
  • the preset ratio threshold of the number of pixels of moving objects in binary images can be set, that is, moving objects in The ratio of the number of pixels in the binary image to the entire image cannot exceed the specified threshold. At this time, it is judged whether there is a thrown object in the current optical flow image based on the comparison result of the pixel data ratio of the foreground moving object in the binary image and the preset ratio threshold.
  • the proportion of the number of pixels of the foreground moving object in the binary image is less than or equal to the preset proportion threshold, it can be determined that there is a throwing object in the current optical flow image; otherwise, if the foreground moving object is in the binary image If the proportion of the number of pixels in is greater than the preset proportion threshold, it can be determined that there is no thrown object in the current optical flow image.
  • images with falling objects in the optical flow image can be screened out, and used as the optical flow image to be measured for subsequent high-altitude parabolic detection processing.
  • single-frame binarization processing can be performed on the current optical flow image, and based on the ratio of the number of pixels of the foreground moving object in the binarized image to the optical flow image with excessive noise or abnormal Filtering is performed to filter out the optical flow images to be tested that have dropped objects, thereby improving the accuracy and speed of high-altitude detection processing.
  • FIG. 6 is a schematic diagram of the implementation process of the high-altitude parabolic detection method proposed in the embodiment of the present disclosure. As shown in 6, determine each optical flow image to be measured.
  • the method for the center point position coordinates of the dropped object may comprise the following steps:
  • a clustering algorithm may be introduced to determine the position coordinates of the center point of the falling object in the optical flow image to be measured.
  • all pixel position coordinates of the foreground moving object in the binary image can be obtained to form a two-dimensional array of position coordinates , which is the set of initial position coordinates.
  • the position of the dropped object may be determined through a position clustering algorithm, such as not limited to the Kmeans clustering algorithm.
  • the position clustering algorithm can be applied to perform preliminary classification on the moving objects existing in the current optical flow image.
  • the foreground moving objects can be clustered into at least one category, such as throwing objects into one category, and leaves into one category. And determine the clusters corresponding to the real dropped objects.
  • a set of initial position coordinates of the foreground moving object in the binary image can be obtained, and the initial position coordinates can be classified based on a preset position clustering algorithm
  • the set is clustered to obtain at least one set of coordinate subsets, and each coordinate subset corresponds to a type of moving object, thereby implementing a position-based clustering algorithm to classify moving objects in the optical flow image to be measured.
  • the mean value calculation can be performed based on the coordinate subsets of each type of moving objects, and the determined coordinate mean value can be used as each The center point position coordinates of a class of moving objects, and from the normalized grayscale image corresponding to the optical flow image to be measured, determine the pixel gray value at the corresponding position based on the center point position coordinates.
  • the parabolic interval of high-altitude parabolic events can be quickly determined by reducing the amount of data without affecting the detection accuracy of high-altitude parabolic events.
  • the moving object with the largest optical flow amplitude in each optical flow image to be tested can be used as the dropped object, and its corresponding center point position
  • the coordinates are used as the coordinates of the center point of the dropped object, and based on the coordinates of the center point of the dropped object in each optical flow image to be measured, the interval of the parabolic event is quickly determined, and the alarm processing of the high-altitude parabolic event is performed in time.
  • the normalized grayscale image corresponding to each moving object in the optical flow image to be measured can be determined After the gray value of the pixel at the coordinates of the center point position in , determine the type of moving object with the largest pixel gray value as the dropped object, and determine the center point position coordinates of this type of moving object as the center point of the dropped object Position coordinates.
  • the response intensity in the current optical flow image may be the real falling object, and the weaker response intensity should be one of them.
  • Non-throwing objects such as leaves; in the case that there may be multiple throwing objects, the response intensity in the current optical flow image, that is, the class with the largest optical flow amplitude may be one of the multiple throwing objects .
  • the user can view the parabolic event interval, such as a surveillance video corresponding to the parabolic event, although the optical flow to be measured may be taken when there may be multiple thrown objects
  • the position coordinates of the center point of the moving object with the largest optical flow amplitude in the image are used as the position coordinates of the parabolic object, but after the parabolic event interval is determined, you can view the event interval corresponding to each falling object that may exist in the interval Parabolic events to view.
  • the position coordinates of the center point of the moving object with the largest optical flow amplitude in each optical flow image to be measured are used as the position coordinates of the center point of the dropped object, and based on the position coordinates of the center point of the dropped object in each optical flow image to be measured
  • Quickly determining the interval of parabolic events can not only effectively filter the interference objects in the image, but also improve the speed of high-altitude parabolic detection on the basis of reducing the amount of calculation and processing data.
  • FIG. 7 is a schematic diagram six of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure. As shown in FIG. Before describing the trajectory of the dropped object, that is, before step 130, the method for performing high-altitude parabolic detection processing also includes the following steps:
  • Step 140 from each optical flow image to be measured, determine the optical flow image to be measured from the start optical flow image to the end optical flow image to be measured of the parabolic event corresponding to the dropped object.
  • the image acquisition and monitoring equipment collects images continuously in real time, and there may be image acquisition and monitoring equipment that collects images of multiple parabolic events that occur at different times; that is, the optical flow to be measured belonging to the same parabolic event
  • the images are generally frame-continuous, or, when there are a few projectiles that are blocked by some objects during the throwing process, the frame interval between the optical flow images to be measured belonging to the same parabolic event is less than a certain threshold.
  • the frame interval between the optical flow images to be measured is too far apart, the two frames of images may correspond to parabolic events occurring at different times.
  • different parabolic events occurring at different times can be divided based on the frame interval value of the optical flow image to be measured, and the start frame and end frame corresponding to the parabolic events occurring at different times can be determined.
  • the frame interval threshold between different parabolic events can be set in advance, and the optical flow image to be measured with a thrown object obtained after single frame processing is sequentially compared with the frame interval value of the previous frame of the optical flow image to be measured to determine whether the two frames of optical flow images to be measured belong to the same parabolic event, so as to update the start frame and end frame of the parabolic event.
  • the first image and the second image of two frames of optical flow images to be measured are taken as an example for description.
  • the frame interval value between the current second image and the first image may be calculated.
  • the frame interval value is less than or equal to the preset frame interval threshold, it is determined that the second image and the first image belong to the same parabolic event, then the end frame of the first parabolic event is updated to the second image; correspondingly, in the If the frame interval value is greater than the preset frame interval threshold, it is determined that the second image and the first image do not belong to the same parabolic event, then it indicates that the end frame of the first parabolic event is the first image, and the second image belongs to a new parabolic event That is, the second parabolic event, at this time, the second image may be determined as the starting frame of the new second parabolic event.
  • the parabolic event to which the second image belongs it is possible to continue to determine the next frame of the optical flow image to be measured, that is, the parabolic event to which the third image belongs, if the frame interval between the third image and the second image is less than the preset If the frame interval threshold is set, then the third image and the second image belong to the same second parabolic event, and at this time, the end frame of the second parabolic event can be determined as the third image. Repeat this step to continue to determine the frame interval value between the next frame of the optical flow image to be measured and the third image.
  • the frame interval value is still smaller than the preset frame interval threshold, update the end frame of the second parabolic event to the next Frame the optical flow image to be measured, repeat this step until the frame interval between the optical flow image to be measured and the previous optical flow image to be measured is greater than the preset frame interval threshold, then the optical flow image of the previous frame to be measured is
  • the second parabolic event finally ends the frame, so that a complete parabolic event can be determined from the beginning to the end of the optical flow image to be measured, that is, the interval in which a parabolic event occurs can be determined.
  • the interval of each parabolic event can be returned, that is, the list starts and ends from the start frame to the end frame.
  • the determination process of the above-mentioned motion events to be measured can be cycled, and the start frame and the end frame corresponding to different parabolic events can be determined, that is, the starting frame of the optical flow image to be measured to the end of the parabolic event Optical flow image.
  • the parabolic object in each frame of the optical flow image to be measured from the start optical flow image to the end optical flow image of the parabolic event can be The position coordinates of the center point of the object are interpolated according to the time sequence, and the coordinates of the center point position in each optical flow image to be measured on the parabolic event interval of the dropped object are mapped on a plane image and connected, so that Form the trajectory of a parabolic object.
  • the start frame and end frame of different motion events to be detected can be determined based on the frame interval difference, so as to accurately divide different motion events to be measured and improve the accuracy of parabolic detection processing.
  • FIG. 8 is a schematic diagram of the implementation process of the high-altitude parabolic detection method proposed in the embodiment of the present disclosure.
  • the high-altitude parabolic detection equipment is based on the motion
  • the method for track execution high-altitude parabolic detection processing also includes the following steps:
  • the position coordinates of the center point of the thrown object in each optical flow image After performing interpolation processing to obtain the trajectory of the dropped object, the high-altitude parabolic detection of the parabolic event can be realized based on the trajectory.
  • a straight line fitting method can be introduced to perform a straight line fitting process on the trajectory of the dropped object , to get the fitted straight line corresponding to the motion trajectory.
  • the parabolic event is not a real high-altitude parabolic event, it may be similar to a person passing an object by hand, or lifting an object above his head, such as an event where a person stands at the window and eats an apple, and the hand picks up the apple Put it on your mouth, bite your hand and put it down. Therefore, the angle between the fitted line and the vertical direction can be calculated, which can be used as one of the factors for judging whether a parabolic event is a high-altitude parabolic event.
  • FIG. 9 is a schematic diagram of the angle between the trajectory fitting line and the vertical direction proposed by the embodiment of the present disclosure. As shown in FIG. 9 , the angle between the fitted line and the vertical direction is ⁇ .
  • the pixel value at the coordinates of the point position, and these pixel values are cumulatively summed to obtain the pixel cumulative value, and the pixel cumulative value is used as one of the factors for judging whether the parabolic event is a high-altitude parabolic event.
  • a real high-altitude parabolic event must have a certain height parabolic range.
  • a parabolic event with a height of more than three floors belongs to a high-altitude parabolic event. Therefore, the ordinate of the dropped object in the initial optical flow image of the parabolic event determined based on the above-mentioned embodiment is the maximum ordinate, that is, the parabolic The highest point of the event; and the ordinate of the end frame of the parabolic event, that is, the minimum ordinate, that is, the lowest point of the parabolic event, perform a difference operation, and then determine the parabola based on the coordinate difference between the maximum ordinate and the minimum ordinate.
  • the height difference between the lowest point and the highest point of the event, that is, the height of the parabola can also be used as one of the factors for judging whether the parabolic event is a high-altitude parabolic event.
  • FIG. 10 is a schematic diagram of the implementation process of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure.
  • the method for performing high-altitude parabolic detection processing on parabolic events may include the following steps:
  • the pixel accumulation value is less than a preset pixel threshold, and the coordinate difference is greater than a preset height threshold, determine that the dropped object is a high-altitude thrown object, And the corresponding parabolic event is a high-altitude parabolic event.
  • the included angle threshold, pixel threshold and height threshold of the high-altitude parabolic event are preset, and the angle between the straight line and the vertical direction after the parabolic event is fitted is compared with the preset included angle threshold, Compare the cumulative value of the pixel value at the center point of the dropped object with the preset pixel threshold, and compare the height difference between the lowest point and the highest point of the parabolic event with the preset height threshold, and combine the comparison of the three judgment factors As a result, it is judged whether the dropped object is a high-altitude thrown object, in other words, it is determined whether the parabolic event corresponding to the dropped object is a high-altitude parabolic event.
  • the angle between the straight line and the vertical direction is less than the preset angle threshold
  • the accumulated value of the pixel value at the center point of the dropped object is less than the preset pixel threshold
  • the height of the lowest point and the highest point of the parabolic event is greater than the preset height threshold, that is, when the three judging factors meet the corresponding preset threshold conditions at the same time, it is determined that the dropped object is a high-altitude thrown object, and the corresponding parabolic event is a high-altitude parabolic event.
  • the angle between the straight line and the vertical direction after fitting the motion event to be measured is greater than or equal to the preset angle threshold, it is determined that the thrown object does not belong to a high-altitude thrown object; or, at the center point of the thrown object
  • the preset angle threshold it is determined that the thrown object does not belong to a high-altitude thrown object; or when the height difference between the lowest point and the highest point of the parabolic event is less than or equal to the preset height threshold , to determine that the dropped object is not a high-altitude dropped object.
  • the angle between the straight line and the vertical direction after the fitting of the motion event to be measured is greater than or equal to the preset angle threshold and the accumulated value of the pixel value at the center point of the dropped object is greater than or equal to the preset pixel threshold, determine whether the throwing The falling object is not a high-altitude throwing object; or the angle between the straight line and the vertical direction after fitting the motion event to be measured is greater than or equal to the preset angle threshold and the height difference between the lowest point and the highest point of the parabolic event is less than or If it is equal to the preset height threshold, it is determined that the dropped object does not belong to a high-altitude dropped object; or the cumulative value of the pixel value at the center point of the dropped object is greater than or equal to the preset pixel threshold and the height of the lowest point and the highest point of the parabolic event When the difference is less than or equal to the preset height threshold, it is determined that the dropped object does not belong to a high-altitude thrown object; or the angle between the straight
  • the event-based detection method can realize accurate determination of high-altitude parabolic events based on the motion trajectory after the trajectory is completely restored by combining the detection information of the dropped object on multiple frames.
  • the method for performing high-altitude parabolic detection processing mainly includes four parts: data preprocessing, dense optical flow calculation, single-frame post-processing and multi-frame post-processing.
  • data preprocessing specifically includes the following steps:
  • the dense optical flow calculation specifically includes the following steps:
  • the single frame post-processing specifically includes the following steps:
  • S206 Perform binarization processing on the normalized grayscale image to obtain a binary image corresponding to the optical flow image; wherein, the binary image includes a foreground moving object with a first pixel value and a background non-moving object with a second pixel value .
  • the pixel ratio of the foreground moving object in the binary image is less than or equal to the preset ratio threshold, it is determined that the current optical flow image is the optical flow image to be measured with the dropped object; otherwise, it does not exist.
  • multi-frame post-processing includes the following steps:
  • the frame interval value between the current optical flow image to be measured and the previous optical flow image to be measured in history is less than or equal to the preset interval threshold, it indicates that the current optical flow image to be measured and the previous optical flow image in history belong to the same parabolic event , update the end frame of the parabolic event based on the current optical flow image to be measured; otherwise, if it does not belong to the same parabolic event, the current optical flow image to be measured is the start frame of the new parabolic event.
  • S216 according to the frame sequence from the first frame to the end frame of the parabolic event, perform interpolation processing on the coordinates of the center point of the dropped object in each optical flow image to be measured, to obtain the trajectory of the dropped object.
  • T 1 is the preset angle threshold
  • T 2 is the preset pixel threshold
  • T 3 is the preset height threshold.
  • the dropped object is a high-altitude thrown object
  • the parabolic event is a high-altitude parabolic event.
  • the angle between the straight line and the vertical direction is less than the preset angle threshold
  • the accumulated value of the pixel value at the center point of the dropped object is less than the preset pixel threshold
  • the height of the lowest point and the highest point of the parabolic event The difference is greater than the preset height threshold, that is, when the three judging factors meet the corresponding preset threshold conditions at the same time, it is determined that the dropped object is a high-altitude thrown object, and the parabolic event is a high-altitude parabolic event.
  • the dropped object is not a high-altitude thrown object, and the parabolic event is not a high-altitude parabolic event.
  • the angle between the straight line and the vertical direction is greater than or equal to the preset angle threshold, or, the accumulated value of the pixel value at the center point of the thrown object is greater than or equal to the preset pixel threshold, or, the parabolic event
  • the height difference between the lowest point and the highest point is less than or equal to the preset height threshold, that is, when at least one of the three judgment factors does not meet the corresponding preset threshold condition, it is determined that the thrown object is not a high-altitude thrown object, Parabolic events are not high-altitude parabolic events.
  • FIG. 11 is a schematic diagram of the scene of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure.
  • the image is first collected by the camera to obtain the initial image, and then through preprocessing, Including determining the region of interest based on the preset polygonal outline, and cropping the image based on the minimum frame to obtain the nth frame of the image to be tested and the (n+1)th frame of the image to be tested; then input the adjacent two frames of the image to be tested by the volume
  • the preset optical flow model constructed by the product neural network and the recurrent neural network is used to obtain a dense optical flow map; continue to perform single-frame post-processing on each frame of optical flow image, including checking whether there are falling objects in the image based on image binarization Judgment, and determine the position coordinates of the center point of the thrown object based on position clustering for the optical flow image to be measured with the presence of the dropped object;
  • the high-altitude parabolic detection method proposed in the embodiment of the present disclosure uses the optical flow model constructed based on deep learning to generate a dense optical flow map to detect moving objects, which is not only robust and accurate, but also time-consuming Shorter and less noise; on the other hand, on the basis of using the preset optical flow model for moving object detection, a robust single-frame plus multi-frame post-processing method is also proposed, based on image binarization and position
  • the clustering algorithm filters the single frame with disturbing objects and obtains the accurate position of the dropped object, and then combines the dropped object detection information on multiple frames to recover and detect the trajectory of the high-altitude parabolic event, which further improves the high-altitude parabolic detection. efficiency and precision.
  • FIG. 12 is a schematic diagram of the composition and structure of the high-altitude parabolic detection device proposed by the embodiment of the present disclosure.
  • the high-altitude parabolic detection device 10 includes an acquisition part 11 , a generation part 12 , a determination part 13 , and a processing part 14 .
  • the acquisition part 11 is configured to sequentially read two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition;
  • the generating part 12 is configured to generate optical flow images corresponding to the two adjacent images to be tested through a preset optical flow model
  • the determining part 13 is configured to determine from the optical flow images the optical flow images to be measured that there is a thrown object, and determine the position coordinates of the center point of the thrown object in each optical flow image to be measured;
  • the determining part 13 is further configured to determine the trajectory of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured;
  • the processing part 14 is configured to perform high-altitude parabolic detection processing based on the motion trajectory.
  • the determining part 13 is configured to, for any optical flow image, generate a binary image corresponding to any optical flow image; wherein, the binary image includes the first pixel value of the foreground moving object and the second The background non-moving object of the pixel value; and in response to the pixel ratio of the foreground moving object in the binary image being less than or equal to a preset ratio threshold, determining that any optical flow image is the existence of the throwing object The optical flow image to be measured.
  • the determining part 13 is configured to perform single-channel grayscale conversion processing on any optical flow image to obtain a single-channel grayscale image corresponding to any optical flow image; performing normalization processing on the image to obtain a normalized grayscale image corresponding to any optical flow image; and performing binarization processing on the normalized grayscale image to obtain the grayscale image corresponding to any optical flow image Binary image.
  • the determination part 13 is configured to obtain, for any optical flow image to be measured, a set of initial position coordinates of the foreground moving object in the binary image, and based on a preset clustering algorithm and The set of initial position coordinates classifies the foreground moving objects in any of the optical flow images to be measured, and obtains at least one moving object and respective coordinate subsets corresponding to each moving object; and for any moving object, Calculating the average value of coordinates corresponding to the coordinate subset of any moving object, and determining the average value of coordinates as the position coordinates of the center point of any moving object; and determining any optical flow to be measured
  • the target pixel value at the center point position coordinates of any moving object, and the moving object with the largest target pixel value is determined as the thrown object, and the The position coordinates of the center point corresponding to the moving object with the largest target pixel value are determined as the position coordinates of the center point of the dropped object.
  • the determining part 13 is configured to determine the trajectory of the thrown object according to the center point position coordinates of the thrown object in the optical flow images to be measured, In the optical flow image, determine the optical flow image to be measured from the start to the optical flow image to be measured of the parabolic event corresponding to the dropped object.
  • the determining part 13 is configured to interpolate the position coordinates of the center point of the thrown object in each optical flow image to be measured in the parabolic event in chronological order, to obtain the The trajectory of the falling object.
  • the optical flow image to be measured includes at least a first image and a second image
  • the first image is the optical flow image to be measured at the current end of the first parabolic event
  • the first image and the second The images are two consecutive frames of optical flow images to be measured
  • the determining part 13 is configured to calculate a frame interval value between the second image and the first image; and in response to the frame interval value being less than or equal to a preset Setting an interval threshold, updating the second image to the optical flow image to be measured at the end of the first parabolic event; in response to the frame interval value being greater than the preset interval threshold, determining the second image is the initial optical flow image to be measured for the second parabolic event.
  • the processing part 14 is configured to perform a straight line fitting process on the motion trajectory of the thrown object, obtain a fitted straight line corresponding to the motion trajectory, and determine the relationship between the fitted straight line and The included angle in the vertical direction; and based on the center point position coordinates of the thrown object in each optical flow image to be measured in the parabolic event, determine the center point position pixel value from the corresponding normalized grayscale image , and perform cumulative processing on the pixel values of each central point position to obtain the pixel cumulative value; In the optical flow image to be measured, the position coordinates of the central point of the dropped object are subjected to a difference operation of the ordinate to obtain a coordinate difference; and based on the angle between the fitted straight line and the vertical direction, the pixel cumulative value And the coordinate difference value executes the high-altitude parabola detection process.
  • the processing part 14 is configured to respond to the angle between the fitted straight line and the vertical direction being smaller than a preset angle threshold, the pixel accumulation value being smaller than the preset pixel threshold, and the If the coordinate difference is greater than a preset height threshold, it is determined that the dropped object is a high-altitude projectile, and the corresponding parabolic event is a high-altitude parabolic event.
  • the acquisition part 11 is further configured to acquire an initial image, and determine a target detection area from the initial image based on a preset polygonal outline; and generate a minimum detection frame based on the target detection area, and based on The minimum detection frame performs image segmentation processing on the initial image to obtain the image to be tested.
  • FIG. 13 is a schematic diagram of the composition and structure of the high-altitude parabolic detection device proposed in the embodiment of the present disclosure.
  • the high-altitude parabolic detection device 20 proposed in the embodiment of the present disclosure may also include processing processor 21, a memory 22 storing instructions executable by the processor 21, further, the living body detection device 20 may also include a communication interface 23, and a bus 24 for connecting the processor 21, the memory 22 and the communication interface 23.
  • the above-mentioned processor 21 may be an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD ), Programmable Logic Device (ProgRAMmable Logic Device, PLD), Field Programmable Gate Array (Field Prog RAMmable Gate Array, FPGA), Central Processing Unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor at least one of the It can be understood that, for different devices, the electronic device used to implement the above processor function may also be other, which is not specifically limited in this embodiment of the present disclosure.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • DSPD Digital Signal Processing Device
  • PLD Programmable Logic Device
  • Field Programmable Gate Array Field Programmable Gate Array
  • CPU Central Processing Unit
  • controller microcontroller, microprocessor at least one of the electronic device used to implement the above processor function may also be other, which is not specifically limited in this embodiment of the
  • the living body detection device 20 may also include a memory 22, which may be connected to the processor 21, wherein the memory 22 is used to store executable program codes, the program codes include computer operation instructions, and the memory 22 may include a high-speed RAM memory, or may Also included is non-volatile memory, eg, at least two disk memories.
  • the bus 24 is used to connect the communication interface 23 , the processor 21 and the memory 22 and communicate with each other among these devices.
  • the memory 22 is used to store instructions and data.
  • the above-mentioned processor 21 is configured to sequentially read two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition, and use the preset optical flow
  • the model generates the optical flow images corresponding to the two adjacent images to be tested; from the optical flow images, it is determined that there is an optical flow image to be measured with a thrown object, and it is determined that in each optical flow image to be measured, the The coordinates of the center point of the object; determining the motion track of the dropped object according to the coordinates of the center point of the dropped object in the optical flow images to be measured; and performing high-altitude parabolic detection processing based on the motion track.
  • the above-mentioned memory 22 can be a volatile memory (volatile memory), such as a random access memory (Random-Access Memory, RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (Read-Only Memory, ROM), flash memory (flash memory), hard disk (Hard Disk Drive, HDD) or solid-state hard drive (Solid-State Drive, SSD); Provide instructions and data.
  • volatile memory such as a random access memory (Random-Access Memory, RAM)
  • non-volatile memory such as a read-only memory (Read-Only Memory, ROM), flash memory (flash memory), hard disk (Hard Disk Drive, HDD) or solid-state hard drive (Solid-State Drive, SSD); Provide instructions and data.
  • each functional module in this embodiment may be integrated into one recommendation unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or Part of the prior art contribution or all or part of the technical solution can be embodied in the form of software products, the computer software products are stored in a storage medium, including a number of instructions to make a high-altitude parabolic detection equipment (can It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method of this embodiment.
  • the aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.
  • An embodiment of the present disclosure provides a high-altitude parabolic detection device.
  • the high-altitude parabolic detection device sequentially reads two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition, and uses preset light
  • the flow model generates the optical flow images corresponding to the two adjacent images to be tested; from the optical flow images, determine the optical flow images to be tested that have thrown objects, and determine the position of the center point of the dropped objects in each optical flow image to be tested Coordinates; determine the motion track of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured; perform high-altitude parabolic detection processing based on the motion track.
  • the present disclosure uses an optical flow model constructed based on deep learning to generate a dense optical flow map to detect moving objects, which not only has good robustness and high precision, but also takes less time and has less noise;
  • this disclosure also proposes a robust single-frame plus multi-frame post-processing method, which filters the single frame with disturbing objects to find out the For the single-frame image of the falling object, after removing the single-frame false detection, combined with the position information of the falling object on multiple frames for trajectory recovery and high-altitude parabolic event detection, which further improves the efficiency and accuracy of high-altitude parabolic detection.
  • An embodiment of the present disclosure provides a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, the above-mentioned high-altitude parabolic detection method is implemented.
  • the program instructions corresponding to a high-altitude parabolic detection method in this embodiment can be stored on a storage medium such as an optical disc, a hard disk, and a USB flash drive.
  • a storage medium such as an optical disc, a hard disk, and a USB flash drive.
  • a high-altitude parabolic detection process is performed based on the motion trajectory.
  • an embodiment of the present disclosure further provides a computer program product, where the computer program product includes computer-executable instructions, and the computer-executable instructions are used to implement the steps in the high-altitude parabolic detection method proposed by the embodiments of the present disclosure.
  • the embodiments of the present disclosure may be provided as methods, systems, or computer program products. 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, etc.) having computer-usable program code embodied therein.
  • a computer-usable storage media including but not limited to disk storage, optical storage, etc.
  • These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable parabolic detection device to operate in a specific manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising instruction means, the The instruction means implements the functions specified in implementing one or more procedures of the flowchart and/or one or more blocks of the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable parabolic detection equipment, so that a series of operation steps are performed on the computer or other programmable equipment to generate computer-implemented processing, thereby executing on the computer or other programmable equipment
  • the instructions provide steps for implementing the functions specified in one or more processes of the flowchart diagrams and/or one or more blocks of the block diagrams.
  • the optical flow image of the object by sequentially reading two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition, and using a preset optical flow model to generate the corresponding two adjacent images to be tested
  • the optical flow image of the object from the optical flow image, determine the optical flow image of the object to be measured, and determine the coordinates of the center point of the object in each optical flow image to be measured; according to the optical flow image of each object to be measured
  • the position coordinates of the center point of the object determine the motion track of the dropped object; the high-altitude parabolic detection process is performed based on the motion track.
  • the above scheme further improves the efficiency and accuracy of high-altitude parabolic detection.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Geometry (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

Disclosed in embodiments of the present disclosure are a method, apparatus and device for detecting an object thrown from height, and a computer storage medium, comprising: according to a time sequence of image acquisition, sequentially reading two adjacent images to be detected from multiple images to be detected, and generating an optical flow image corresponding to the two adjacent images by means of a preset optical flow model; determining optical flow images to be detected containing a thrown object from the multiple optical flow images, and determining position coordinates of the center point of the thrown object in each optical flow image to be detected; determining a motion trajectory of the thrown object according to the position coordinates of the center point of the thrown object in each optical flow image to be detected; and executing detection processing for an object thrown from height on the basis of the motion trajectory.

Description

高空抛物检测方法和装置、设备,及计算机存储介质High-altitude parabolic detection method, device, equipment, and computer storage medium
相关申请的交叉引用Cross References to Related Applications
本公开基于申请号为202110729203.4、申请日为2021年06月29日、申请名称为“高空抛物检测方法和装置、设备及计算机存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。This disclosure is based on the Chinese patent application with the application number 202110729203.4, the application date is June 29, 2021, and the application name is "High altitude parabolic detection method and device, equipment and computer storage medium", and claims the priority of the Chinese patent application , the entire content of this Chinese patent application is hereby incorporated by reference into this disclosure.
技术领域technical field
本公开涉及计算机视觉领域,尤其涉及一种高空抛物检测方法和装置、设备,计算机存储介质。The present disclosure relates to the field of computer vision, and in particular to a method, device and equipment for detecting a high-altitude parabola, and a computer storage medium.
背景技术Background technique
近年来,随着城镇化率的提升,高楼越来越多,高空抛物带来的危险也越来越被重视。高空抛物检测作为智能视频监控系统中的一项重要技术,通过对建筑物楼面监控视频进行分析,检测抛落物体,以实现在对城市高层建筑物的楼面进行布防,对可能出现的高空抛物事件进行实时报警。In recent years, with the increase of urbanization rate, there are more and more high-rise buildings, and the dangers brought by high-altitude parabolic objects have been paid more and more attention. As an important technology in the intelligent video surveillance system, high-altitude parabolic detection detects dropped objects by analyzing the monitoring video of the building floor, so as to arm the floors of urban high-rise buildings and prevent possible high-altitude Real-time alarm for parabolic events.
发明内容Contents of the invention
本公开实施例提供一种高空抛物检测方法和装置、设备,及计算机存储介质。Embodiments of the present disclosure provide a method, device, equipment, and computer storage medium for detecting high-altitude parabolic objects.
本公开的技术方案是这样实现的:The disclosed technical solution is achieved in this way:
本公开实施例提供一种高空抛物检测方法,所述方法包括:An embodiment of the present disclosure provides a high-altitude parabolic detection method, the method comprising:
根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的两张待测图像,并通过预设光流模型生成所述相邻的两张待测图像对应的光流图像;从所述光流图像中确定存在抛落物体的待测光流图像,并确定各待测光流图像中所述抛落物体的中心点位置坐标;根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹;基于所述运动轨迹执行高空抛物检测处理。sequentially reading two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition, and generating optical flow images corresponding to the two adjacent images to be tested through a preset optical flow model; Determining the optical flow images to be measured in which there are thrown objects from the optical flow images, and determining the position coordinates of the center points of the dropped objects in each optical flow image to be measured; according to the optical flow images in each optical flow image to be measured The coordinates of the center point of the dropped object determine the motion track of the dropped object; and the high-altitude parabolic detection process is performed based on the motion track.
这样,一方面采用基于深度学习构建的光流模型生成稠密光流图,以实现对运动物体进行检测,不仅鲁棒性好、精度高,而且耗时更短、噪声更少;另一方面,在使用预设光流模型进行运动物体检测的基础上,基于鲁棒的单帧加多帧的后处理方法,在对存在干扰物的单帧进行过滤,找出存在抛落物体的单帧图像,去除单帧误检之后,结合多帧上的抛落物位置信息进行轨迹复原和高空抛物事件的检测。In this way, on the one hand, the optical flow model based on deep learning is used to generate a dense optical flow map to detect moving objects, which not only has good robustness and high precision, but also takes less time and has less noise; on the other hand, On the basis of using the preset optical flow model for moving object detection, based on the robust single-frame plus multi-frame post-processing method, filter the single frame with disturbing objects, and find out the single-frame image with throwing objects , after removing single-frame false detections, track recovery and detection of high-altitude parabolic events are performed by combining the position information of the projectile on multiple frames.
本公开实施例提供一种高空抛物检测装置,包括:An embodiment of the present disclosure provides a high-altitude parabolic detection device, including:
读取部分,配置为根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的两张待测图像;The reading part is configured to sequentially read two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition;
生成部分,配置为通过预设光流模型生成所述相邻的两张待测图像对应的光流图像;The generating part is configured to generate the optical flow images corresponding to the two adjacent images to be tested through a preset optical flow model;
确定部分,配置为从所述光流图像中确定存在抛落物体的待测光流图像,并确定各待测光流图像中所述抛落物体的中心点位置坐标;The determining part is configured to determine from the optical flow images the optical flow images to be measured that there is a thrown object, and determine the position coordinates of the center point of the thrown object in each optical flow image to be measured;
确定部分,还配置为根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹;The determining part is further configured to determine the trajectory of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured;
处理部分,配置为基于所述运动轨迹执行高空抛物检测处理。The processing part is configured to perform high-altitude parabolic detection processing based on the motion trajectory.
本公开实施例提供一种高空抛物检测设备,所述高空抛物检测设备包括处理器、存储有所述处理器可执行指令的存储器,当所述指令被所述处理器执行时,实现如上所述的高空抛物检测方法。An embodiment of the present disclosure provides a high-altitude parabolic detection device. The high-altitude parabolic detection device includes a processor and a memory storing instructions executable by the processor. When the instructions are executed by the processor, the above-mentioned High-altitude parabolic detection method.
本公开实施例提供一种计算机可读存储介质,其上存储有程序,应用于高空抛物检测 设备中,所述程序被处理器执行时,实现如上所述的高空抛物检测方法。An embodiment of the present disclosure provides a computer-readable storage medium on which a program is stored, which is applied to a high-altitude parabolic detection device. When the program is executed by a processor, the above-mentioned high-altitude parabolic detection method is realized.
本公开提供一种计算机程序,包括计算机可读代码,在所述计算机可读代码在电子设备中运行,被所述电子设备中的处理器执行的情况下,实现如上所述的高空抛物检测方法。The present disclosure provides a computer program, including computer readable codes. When the computer readable codes run in electronic equipment and are executed by a processor in the electronic equipment, the above-mentioned high-altitude parabolic detection method is realized. .
本公开提供一种计算机程序产品,当其在计算机上运行时,使得计算机执行如上所述的高空抛物检测方法。The present disclosure provides a computer program product, which, when run on a computer, causes the computer to execute the above-mentioned high-altitude parabolic detection method.
本公开实施例提出的技术方案,高空抛物检测设备可以根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的两张待测图像,并通过预设光流模型生成相邻的两张待测图像对应的光流图像;从光流图像中确定存在抛落物体的待测光流图像,并确定各待测光流图像中抛落物体的中心点位置坐标;根据各待测光流图像中抛落物体的中心点位置坐标确定抛落物体的运动轨迹;基于运动轨迹执行高空抛物检测处理。如此,本公开一方面采用基于深度学习构建的光流模型生成稠密光流图,以实现对运动物体进行检测,不仅鲁棒性好、精度高,而且耗时更短、噪声更少;另一方面,在使用预设光流模型进行运动物体检测的基础上,本公开还提出了鲁棒的单帧加多帧的后处理方法,在对存在干扰物的单帧进行过滤,找出存在抛落物体的单帧图像,去除单帧误检之后,结合多帧上的抛落物位置信息进行轨迹复原和高空抛物事件检测,进一步提高了高空抛物检测的效率和精度。According to the technical solution proposed by the embodiments of the present disclosure, the high-altitude parabolic detection equipment can sequentially read two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition, and generate adjacent images through the preset optical flow model. The optical flow images corresponding to the two images to be tested; from the optical flow images, determine the optical flow images to be tested that have thrown objects, and determine the coordinates of the center point position of the dropped objects in each optical flow image to be tested; The position coordinates of the center point of the dropped object in the photometric flow image determine the motion track of the dropped object; and the high-altitude parabolic detection process is performed based on the motion track. In this way, on the one hand, the present disclosure uses an optical flow model constructed based on deep learning to generate a dense optical flow map to detect moving objects, which not only has good robustness and high precision, but also takes less time and has less noise; On the one hand, on the basis of using the preset optical flow model for moving object detection, this disclosure also proposes a robust single-frame plus multi-frame post-processing method, which filters the single frame with disturbing objects to find out the For the single-frame image of the falling object, after removing the single-frame false detection, combined with the position information of the falling object on multiple frames for trajectory recovery and high-altitude parabolic event detection, which further improves the efficiency and accuracy of high-altitude parabolic detection.
附图说明Description of drawings
图1为本公开实施例提出的高空抛物检测方法的实现流程示意图一;FIG. 1 is a schematic diagram of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure;
图2为本公开实施例提出的高空抛物检测方法的实现流程示意图二;Fig. 2 is a schematic diagram of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure;
图3为本公开实施例提出的抛落物体的运动轨迹示意图;FIG. 3 is a schematic diagram of the trajectory of a dropped object proposed by an embodiment of the present disclosure;
图4为本公开实施例提出的高空抛物检测方法的实现流程示意图三;FIG. 4 is a schematic diagram of the third implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure;
图5为本公开实施例提出的高空抛物检测方法的实现流程示意图四;FIG. 5 is a schematic diagram 4 of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure;
图6为本公开实施例提出的高空抛物检测方法的实现流程示意图五;FIG. 6 is a schematic diagram of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure;
图7为本公开实施例提出的高空抛物检测方法的实现流程示意图六;FIG. 7 is a schematic diagram six of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure;
图8为本公开实施例提出的高空抛物检测方法的实现流程示意图七;FIG. 8 is a schematic diagram of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure VII;
图9为本公开实施例提出的高空抛物检测方法的实现流程示意图八;FIG. 9 is a schematic diagram of the eighth implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure;
图10为本公开实施例提出的高空抛物检测方法的实现流程示意图九;FIG. 10 is a schematic diagram of the implementation flow diagram of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure;
图11为本公开实施例提出的高空抛物检测方法的场景示意图;FIG. 11 is a schematic diagram of a scene of a high-altitude parabolic detection method proposed by an embodiment of the present disclosure;
图12为本公开实施例提出的高空抛物检测装置的组成结构示意图;12 is a schematic diagram of the composition and structure of the high-altitude parabolic detection device proposed by the embodiment of the present disclosure;
图13为本公开实施例提出的高空抛物检测设备的组成结构示意图。Fig. 13 is a schematic diagram of the composition and structure of a high-altitude parabolic detection device proposed by an embodiment of the present disclosure.
具体实施方式Detailed ways
为了使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开作进一步地详细描述,所描述的实施例不应视为对本公开的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in conjunction with the accompanying drawings. All other embodiments obtained under the premise of creative labor belong to the protection scope of the present disclosure.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, references to "some embodiments" describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict.
在以下的描述中,所涉及的术语“第一\第二\第三”仅仅是是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本公开实施例能够以除了在这里图示或描述的以外的顺序实施。In the following description, the term "first\second\third" is only used to distinguish similar objects, and does not represent a specific ordering of objects. Understandably, "first\second\third" Where permitted, the specific order or sequencing may be interchanged such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein.
除非另有定义,本文所使用的所有的技术和科学术语与属于本公开的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本公开实施例的目的,不是旨在限制本公开。Unless otherwise defined, 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 terms used herein are only for the purpose of describing the embodiments of the present disclosure, and are not intended to limit the present disclosure.
近年来,随着城镇化率的提升,高楼越来越多,高空抛物带来的危险也越来越被重视。高空抛物检测作为智能视频监控系统中的一项重要技术,通过对建筑物楼面监控视频进行 分析,检测抛落物体,以实现在对城市高层建筑物的楼面进行布防,对可能出现的高空抛物事件进行实时报警。In recent years, with the increase of urbanization rate, there are more and more high-rise buildings, and the dangers brought by high-altitude parabolic objects have been paid more and more attention. As an important technology in the intelligent video surveillance system, high-altitude parabolic detection detects dropped objects by analyzing the monitoring video of the building floor, so as to arm the floors of urban high-rise buildings and prevent possible high-altitude Real-time alarm for parabolic events.
具体的,高空抛物检测依赖于对图像中运动物体的检测,相关技术中常利用帧间差分法或者背景差分法进行运动物体的检测。Specifically, the high-altitude parabolic detection depends on the detection of moving objects in the image. In related technologies, the inter-frame difference method or the background difference method is often used to detect moving objects.
其中,帧间差分法依据的原则是:当视频中存在移动物体的时候,相邻帧(或相邻三帧)之间在灰度上会有差别,求取两帧图像灰度差的绝对值,则静止的物体在差值图像上表现出来全是0,而移动物体特别是移动物体的轮廓处由于存在灰度变化为非0,当绝对值超过一定阈值时,即可判断为运动目标,从而实现目标的检测功能,即相邻帧间差分法直接对相邻的两帧图像做差分运算,并取差分运算的绝对值构成移动物体。Among them, the principle of the inter-frame difference method is: when there is a moving object in the video, there will be a difference in grayscale between adjacent frames (or three adjacent frames), and the absolute value of the grayscale difference between two frames of images is calculated. value, the static object is all 0 on the difference image, and the moving object, especially the contour of the moving object, is non-zero due to the grayscale change. When the absolute value exceeds a certain threshold, it can be judged as a moving object. , so as to realize the detection function of the target, that is, the difference method between adjacent frames directly performs a difference operation on two adjacent frames of images, and takes the absolute value of the difference operation to form a moving object.
虽然该帧间差分法可以得到运动目标的外轮廓、方法简单且运算复杂度小,但是存在摄像头必须固定、鲁棒相差以及精度较低的缺陷,一般仅适用于简单的实时运动检测。Although the frame-to-frame difference method can obtain the outer contour of the moving target, the method is simple and the computational complexity is small, but it has the defects of fixed camera, robust phase difference and low precision, and is generally only suitable for simple real-time motion detection.
其中,背景差分法其基本原理是将图像序列中的当前帧和已经确定好或实时获取的背景参考模型(背景图像)做减法,找不同,计算出与背景图像像素差异超过一定阈值的区域确定为运动区域,从而来确定运动位置、轮廓、大小等特征。Among them, the basic principle of the background subtraction method is to subtract the current frame in the image sequence from the background reference model (background image) that has been determined or obtained in real time, find the difference, and calculate the area where the pixel difference with the background image exceeds a certain threshold. It is the motion area, so as to determine the motion position, outline, size and other characteristics.
该背景差分法可以得到运动目标的整个区域,优势是速度快、准确,但鲁棒性较差、摄像头必须固定,并且难以利用帧间信息、图像后处理比较困难,尤其光照弱或雨雪天气受影响较大。The background subtraction method can obtain the entire area of the moving target. The advantage is fast and accurate, but the robustness is poor, the camera must be fixed, and it is difficult to use inter-frame information, and image post-processing is difficult, especially in weak light or rainy and snowy weather. more affected.
为了克服上述帧间差分法和背景差分法存在的缺陷,相关技术中进一步提出了基于光流法的运动物体检测,如应用光流约束方程的算法、传统的(Lucas Kanade,KL)算法,该光流法主要利用图像序列中像素在时间域上的变化以及相邻帧之间的相关性,根据上一帧与当前帧之间的对应关系,计算得到相邻帧之间物体的运动信息。In order to overcome the defects of the above-mentioned inter-frame difference method and background difference method, the moving object detection based on the optical flow method is further proposed in related technologies, such as the algorithm using the optical flow constraint equation, the traditional (Lucas Kanade, KL) algorithm, the The optical flow method mainly uses the changes of pixels in the image sequence in the time domain and the correlation between adjacent frames, and calculates the motion information of objects between adjacent frames according to the correspondence between the previous frame and the current frame.
虽然在它能检测运动目标的整个区域,适用于摄像机静止和运动情况、鲁棒性好、精度高,但大多数的光流计算方法计算量巨大,结构复杂,导致计算耗时较高,并且难以同时保障速度和精度。Although it can detect moving objects in the entire area, it is suitable for camera still and moving situations, with good robustness and high precision, but most of the optical flow calculation methods have a huge amount of calculation and complex structure, resulting in high calculation time and high cost. It is difficult to guarantee speed and accuracy at the same time.
可见,目前在海量视频数据下,传统的高空抛物检测方法已难以满足高空抛物检测在速度和精度上的高要求。鉴于此,如何保障高空抛物检测在速度和精度上的高要求是亟待解决的问题,是本公开实施例所要讨论的内容,下面将结合以下具体实施例进行阐述。It can be seen that under the current mass video data, the traditional high-altitude parabolic detection method has been difficult to meet the high requirements of high-altitude parabolic detection in terms of speed and accuracy. In view of this, how to ensure the high requirements of high-altitude parabolic detection in terms of speed and accuracy is an urgent problem to be solved, which is the content to be discussed in the embodiments of the present disclosure, and will be described in conjunction with the following specific embodiments.
本公开实施例提供一种高空抛物检测方法和装置、设备,及计算机存储介质,一方面采用基于深度学习构建的光流模型生成稠密光流图,以实现对运动物体进行检测,不仅鲁棒性好、精度高,而且耗时更短、噪声更少;另一方面,在使用预设光流模型进行运动物体检测的基础上,本公开还提出了鲁棒的单帧加多帧的后处理方法,在对存在干扰物的单帧进行过滤,找出存在抛落物体的单帧图像,去除单帧误检之后,结合多帧上的抛落物位置信息进行轨迹复原和高空抛物事件的检测,进一步提高了高空抛物检测的效率和精度。Embodiments of the present disclosure provide a high-altitude parabolic detection method, device, equipment, and computer storage medium. On the one hand, an optical flow model based on deep learning is used to generate a dense optical flow graph to detect moving objects, which is not only robust Good, high precision, and less time-consuming, less noise; on the other hand, on the basis of using the preset optical flow model for moving object detection, this disclosure also proposes a robust single-frame plus multi-frame post-processing The method is to filter the single frame with disturbing objects, find out the single frame image with the thrown object, and remove the false detection of single frame, and combine the position information of the dropped object on multiple frames to recover the trajectory and detect the high-altitude parabolic event , which further improves the efficiency and accuracy of high-altitude parabolic detection.
本公开实施例提出的高空抛物检测方法应用于高空抛物检测设备中。下面说明本公开实施例提出的高空抛物检测设备的示例性应用,本公开实施例提出的高空抛物检测设备可以实施为手机终端、笔记本电脑,平板电脑,台式计算机,服务器、以及各种工业设备等。The high-altitude parabolic detection method proposed in the embodiment of the present disclosure is applied to high-altitude parabolic detection equipment. The following describes the exemplary application of the high-altitude parabolic detection equipment proposed by the embodiments of the present disclosure. The high-altitude parabolic detection equipment proposed by the embodiments of the present disclosure can be implemented as mobile terminals, notebook computers, tablet computers, desktop computers, servers, and various industrial equipment, etc. .
下面,将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述。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.
本公开一实施例提供了一种高空抛物检测方法,图1为本公开实施例提出的高空抛物检测方法的实现流程示意图一,如图1所示,在本公开的实施例中,执行高空抛物检测的方法可以包括以下步骤:An embodiment of the present disclosure provides a high-altitude parabolic detection method. FIG. 1 is a schematic diagram of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure. As shown in FIG. 1, in the embodiment of the present disclosure, the high-altitude parabolic The detection method may include the following steps:
S100、根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的两张待测图像,并通过预设光流模型生成相邻的两张待测图像对应的光流图像。S100. According to the time sequence of image acquisition, sequentially read two adjacent images to be tested from the multiple frames of images to be tested, and generate optical flow images corresponding to the two adjacent images to be tested by using a preset optical flow model.
应理解,在本公开实施例中,可以是对历史发生的事件进行高空抛物检测处理,也可以是对当前发生的事件实时进行高空抛物检测处理。It should be understood that, in the embodiments of the present disclosure, the high-altitude parabolic detection process may be performed on historical events, or the high-altitude parabolic detection process may be performed on current events in real time.
在一些实施例中,待测图像指需要进行运动物体检测的图像。其中,该图像可以是实时采集的,也可以是本地存储的。In some embodiments, the image to be tested refers to an image that requires moving object detection. Wherein, the image may be collected in real time or stored locally.
在一些实施例中,基于不同配置的图像采集监控设备,上述待测图像可以是RGB彩色图像,也可以是灰度图像,或者还可以是其他传感器影像数据(如红外影像)。In some embodiments, based on different configurations of image acquisition and monitoring equipment, the image to be tested may be an RGB color image, a grayscale image, or other sensor image data (such as an infrared image).
其中,高空抛物检测设备可以配置图像采集监控设备,如摄像头,可以通过该摄像头实时采集获得待测图像;或者,将摄像头历史采集的一段视频存储在本地,可以从本地读取并分析视频流,拿到待测图像。Among them, the high-altitude parabolic detection equipment can be equipped with image acquisition and monitoring equipment, such as a camera, through which the image to be tested can be collected in real time; or, a video historically collected by the camera can be stored locally, and the video stream can be read and analyzed locally. Get the image to be tested.
其中,图2为本公开实施例提出的高空抛物检测方法的实现流程示意图二,如图2所示,获取待测图像的方法可以包括以下步骤:Among them, FIG. 2 is a schematic diagram of the second implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure. As shown in FIG. 2, the method for obtaining the image to be tested may include the following steps:
S101、获取初始图像,并基于预设多边形轮廓从初始图像中确定目标检测区域。S101. Acquire an initial image, and determine a target detection area from the initial image based on a preset polygonal outline.
应理解,对于任何图像采集监控设备,其能够采集的图像范围内可能包括目标监控对象(如楼宇)以及楼下的绿化或者固定设备,例如灯杆和数目。其中,尤其树木等绿化设施会对运动物体的检测结果带来一定的影响,其影响可表现为落叶容易被判断为高空抛落物,且对图像后处理带来额外的处理任务,减慢高空抛物检测处理的速度。It should be understood that, for any image acquisition monitoring device, the range of images it can acquire may include target monitoring objects (such as buildings) and greenery or fixed equipment downstairs, such as light poles and numbers. Among them, green facilities such as trees will have a certain impact on the detection results of moving objects. The impact can be that fallen leaves are easily judged as high-altitude objects, and additional processing tasks are brought to image post-processing, slowing down the high-altitude Speed of parabola detection processing.
因此,在本公开实施例中,可以对每个图像采集监控设备的监控画面进行分析,标定出没有遮挡物的区域作为目标监控对象(如楼宇)的监控区域,进而在进行图像后续分析时,仅针对该监控区域进行分析,忽略其他非监控区域的图像内容,加快高空抛物检测处理的速度。Therefore, in the embodiment of the present disclosure, the monitoring screen of each image acquisition and monitoring device can be analyzed, and the area without obstructions can be marked as the monitoring area of the target monitoring object (such as a building), and then when performing subsequent image analysis, Only analyze the monitoring area, ignore the image content of other non-monitoring areas, and speed up the processing speed of high-altitude parabolic detection.
在一些实施例中,初始图像指通过图像采集监控设备实时采集的监控范围内的图像,或者本地历史存储的监控范围内的视频。In some embodiments, the initial image refers to an image within a monitoring range that is collected in real time by an image acquisition monitoring device, or a video within a monitoring range that is locally historically stored.
在本公开实施例中,可以先人工确定出一多边形轮廓C即预设多边形轮廓,然后通过该预设多边形轮廓从初始图像中标定出感兴趣的区域R作为目标检测区域,忽略掉初始图像中其他存在干扰的图像内容。In the embodiment of the present disclosure, a polygonal contour C, that is, a preset polygonal contour, can be manually determined first, and then the region of interest R is demarcated from the initial image by the preset polygonal contour as the target detection region, ignoring the Other interfering graphic content.
这里,高空抛物检测设备可以基于预设多边形轮廓对初始图像进行二值化处理,将预设多边形轮廓对应的目标检测区域的图像像素先设置为1,目标检测区域以外的图像像素设置为0,然后将该二值化图像与初始图像进行像素点乘,使得目标检测区域的图像保留原始像素值,而该区域以外的图像像素全为0,以此便确定出初始图像中存在的目标检测区域。Here, the high-altitude parabolic detection device can perform binarization processing on the initial image based on the preset polygonal outline, first set the image pixels of the target detection area corresponding to the preset polygonal outline to 1, and set the image pixels outside the target detection area to 0, Then perform pixel point multiplication between the binarized image and the original image, so that the image of the target detection area retains the original pixel value, and the image pixels outside this area are all 0, so as to determine the target detection area existing in the initial image .
可见,除了选中的目标抛落物区域以外,其他区域像素均为0,得到的目标检测区域能够最大的覆盖目标监控对象(如楼宇),即最大的覆盖抛落物体的潜在运动轨迹,同时也避开了树木、天空、灯杆以及一些其他干扰物的影响。It can be seen that, except for the selected target drop area, the pixels in other areas are all 0, and the obtained target detection area can cover the target monitoring object (such as a building) to the greatest extent, that is, the maximum coverage of the potential trajectory of the dropped object, and also Avoids the effects of trees, sky, light poles, and some other distractions.
S102、基于目标检测区域生成最小检测边框,并基于最小检测边框对初始图像进行图像分割处理,得到待测图像。S102. Generate a minimum detection frame based on the target detection area, and perform image segmentation processing on the initial image based on the minimum detection frame to obtain an image to be tested.
应理解,为了最大的覆盖抛落物体的潜在运动轨迹,实际情况下的目标抛落物可能为不规则的多边形,那么在模型输入之前,需要先对目标抛落物区域进行规则化。其中,可以生成该目标抛落物区域对应的Bounding box最小检测框。It should be understood that in order to cover the potential trajectory of the dropped object to the greatest extent, the target dropped object may be an irregular polygon in the actual situation, so before the model is input, the area of the target dropped object needs to be regularized. Among them, the minimum detection frame of the Bounding box corresponding to the target drop area can be generated.
其中,可以取目标抛落物区域的边缘位置坐标生成一最小检测框。可以是取目标抛落物区域的最左边边缘坐标x 1、最右边边缘坐标x 2、最上边边缘坐标y 1以及最下边边缘坐标y 2,进而生成最小边框(x 1,y 1,x 2,y 2)。 Among them, the edge position coordinates of the target drop area can be taken to generate a minimum detection frame. It can take the leftmost edge coordinate x 1 , the rightmost edge coordinate x 2 , the uppermost edge coordinate y 1 and the lowermost edge coordinate y 2 of the target drop area, and then generate the minimum border (x 1 , y 1 , x 2 , y 2 ).
在本公开实施例的一实施方式中,可以基于该最小检测框对初始图像进行图像分割处理,即图像画面裁剪,进而获得待测图像。In an implementation manner of the embodiment of the present disclosure, image segmentation processing may be performed on the initial image based on the minimum detection frame, that is, image frame cropping, and then the image to be tested may be obtained.
可见,在本公开实施例中,基于S101a-S101b可以降低对抛落物体误检的负面影响,且减轻图像后处理任务量,进一步加快高空抛物检测处理的速度。It can be seen that, in the embodiment of the present disclosure, based on S101a-S101b, the negative impact on false detection of dropped objects can be reduced, the workload of image post-processing can be reduced, and the speed of high-altitude parabolic detection processing can be further accelerated.
在本公开实施例中,预设光流模型为基于深度学习技术,通过卷积神经网络和循环神经网络,构建并训练成的一个高精度、且具有快推理速度的模型。该光流模型的输入为相 邻两帧待测图像,输出为能够反应运动物体运动速度和方向的光流图,以实现对抛落图像中运动物体的检测。In the embodiment of the present disclosure, the preset optical flow model is a model with high precision and fast inference speed constructed and trained based on deep learning technology through convolutional neural network and recurrent neural network. The input of the optical flow model is two adjacent frames of images to be tested, and the output is an optical flow map that can reflect the speed and direction of the moving object, so as to realize the detection of the moving object in the dropped image.
在一些实施例中,光流图像为反应运动物体的运动速度和运动方向的图像,为了确定出视频流中可能存在的运动物体,可以基于视频流中相邻帧生成光流图,能够反应运动物体在前一帧图像到第二帧图像的点的移动。可见,基于光流图可以找出所有存在的运动物体。In some embodiments, the optical flow image is an image that reflects the moving speed and moving direction of the moving object. In order to determine the moving object that may exist in the video stream, an optical flow map can be generated based on adjacent frames in the video stream, which can reflect the motion The movement of the object from the point of the previous frame image to the second frame image. It can be seen that all existing moving objects can be found based on the optical flow map.
在本公开实施例的一实施方式中,可以按照图像采集的时间顺序,依次将经上述S101a-S101b处理得到的多帧待测图像中的每相邻两帧待测图像构成一图像样本对,如图像样本对(I k,I k+1),然后将其图像样本对输入预设光流模型,获得用于反映运动物体的稠密光流图,即通过该预设光流模型生成相邻两张待测图像对应的光流图像。 In an implementation manner of an embodiment of the present disclosure, each adjacent two frames of images to be tested among the multiple frames of images to be tested obtained through the processing of S101a-S101b may be sequentially formed into an image sample pair according to the time sequence of image acquisition, For example, the image sample pair (I k , I k+1 ), and then input the image sample pair into the preset optical flow model to obtain a dense optical flow map for reflecting moving objects, that is, to generate adjacent The optical flow images corresponding to the two images to be tested.
这里,可以使用以下公式表示当前光流图像:Here, the following formula can be used to represent the current optical flow image:
f k=(u k,v k)              (1) f k =(u k , v k ) (1)
其中,公式(1)中,u k表征运动物体竖直方向上的运动速度,v k表征水平方向上的运动速度,k表示图像的帧排序值,如第k帧光流图像。 Among them, in the formula (1), u k represents the moving speed of the moving object in the vertical direction, v k represents the moving speed in the horizontal direction, and k represents the frame sorting value of the image, such as the kth optical flow image.
在一些实施例中,如果是对历史发生的事件进行高空抛物检测处理,那么可以先对本地存储的历史视频中的每一帧图像执行S101a-S101b,获得与每帧图像对应的待测图像,然后分批读取图像分割后获得的待测图像,基于图像采集时间依次将前后相邻两帧待测图像构建图像样本对,并输入预设光流模型进行运动物体检测,以生成每相邻的两张待测图像对应的光流图像。相应的,如果是对当前正在发生的事件进行高空抛物检测处理,那么按照采集时间实时执行S101a-S101b,获得待测图像,并实时将相邻两帧待测图像输入预设光流模型进行运动物体检测,以生成每相邻的两张待测图像对应的光流图像。In some embodiments, if the high-altitude parabolic detection process is performed on historical events, S101a-S101b can be performed on each frame of image in the locally stored historical video to obtain the image to be tested corresponding to each frame of image, Then, the images to be tested obtained after image segmentation are read in batches, and image sample pairs are sequentially constructed from two adjacent frames of images to be tested based on the image acquisition time, and input into the preset optical flow model for moving object detection to generate each adjacent The optical flow images corresponding to the two images to be tested. Correspondingly, if the high-altitude parabolic detection processing is performed on the currently occurring event, then execute S101a-S101b in real time according to the acquisition time to obtain the image to be tested, and input the two adjacent frames of the image to be tested into the preset optical flow model for motion in real time Object detection to generate optical flow images corresponding to every two adjacent images to be tested.
S110、从光流图像中确定存在抛落物体的待测光流图像,并确定各待测光流图像中抛落物体的中心点位置坐标。S110. Determine, from the optical flow images, the optical flow images to be measured that contain the dropped objects, and determine the position coordinates of the center points of the dropped objects in each optical flow image to be measured.
可以理解的是,高空抛物的场景其实是有很多的,诸如白天、黑夜、下雨等不同的自然条件影响抛落物体的检测精度,同时还有一些自然的物体,如摇摆的树叶、飞行的鸟,活动的人等都会对抛落物体的准确检测造成影响。因此为了克服检测过程中其他非高空抛落的运动物体对高空抛物检测造成的检测误差,在本公开实施例中,在基于预设光流模型生成相邻两张待测图像对应的光流图像之后,可以利用单帧后处理方法对非高空抛落物体的干扰图像或者异常图像进行过滤,获得存在真正的抛落物体、且噪声较小的图像,降低高空抛物检测的误检率。It is understandable that there are actually many scenes of high-altitude parabolic objects. Different natural conditions such as day, night, and rain affect the detection accuracy of dropped objects. At the same time, there are some natural objects, such as swinging leaves and flying objects. Birds, moving people, etc. will affect the accurate detection of dropped objects. Therefore, in order to overcome the detection error caused by other non-high-altitude throwing moving objects to the high-altitude parabola detection during the detection process, in the embodiment of the present disclosure, the optical flow images corresponding to the two adjacent images to be tested are generated based on the preset optical flow model After that, the single-frame post-processing method can be used to filter the interference images or abnormal images of non-high-altitude throwing objects to obtain images with real throwing objects and less noise, and reduce the false detection rate of high-altitude parabolic detection.
应理解,如果当前光流图像中的运动物体种类过多,那么表明图像中的噪声过多,或者当前光流图像中运动物体的运动响应强度过大,那么表明该帧图像出现异常,如鸟从镜头前飞过,这类图像对抛落物体检测造成的误检负面影响加大,那么该类光流图像在进行高空抛落检测处理中的作用不大,且会拖慢高空检测处理的速度。It should be understood that if there are too many types of moving objects in the current optical flow image, it indicates that there is too much noise in the image, or if the motion response intensity of the moving object in the current optical flow image is too large, it indicates that there is an abnormality in the frame image, such as a bird Flying in front of the camera, this type of image has a greater negative impact on the false detection caused by the detection of dropped objects, so this type of optical flow image has little effect in the high-altitude drop detection process, and will slow down the high-altitude detection process. speed.
因此,在本公开实施例中,可以对获得的光流图像进一步分析处理,将确定为噪声过大、运动物体种类过多的当前光流图像或者存在异常的光流图像进行过滤,筛选出当存在抛落物体的待测光流图像。Therefore, in the embodiment of the present disclosure, the obtained optical flow images can be further analyzed and processed, and the current optical flow images determined to be excessively noisy, with too many types of moving objects or abnormal optical flow images can be filtered, and the current optical flow images can be filtered out. There is an optical flow image to be measured of a thrown object.
在本公开实施例的一实施方式中,可以采用单帧二值化的方法对当前光流图像是否存在真正的抛落物体进行确定。In an implementation manner of the embodiments of the present disclosure, a single-frame binarization method may be used to determine whether there is a real falling object in the current optical flow image.
在一些实施例中,对于确定出的存在抛落物体的任一测光流图像,可以继续确定出任一待测光流图像中抛落物体的中心点位置坐标。其中,可以引入位置聚类方法对抛落物体的中心点位置坐标进行确定。In some embodiments, for any optometry flow image determined to contain a dropped object, the position coordinates of the center point of the dropped object in any optical flow image to be measured may be continuously determined. Among them, the position clustering method can be introduced to determine the position coordinates of the center point of the dropped object.
按照S100-S110的方法可以对实时采集的待测图像依次进行光流图像生成以及对应的光流图像中是否存在抛落物体以及确定抛落物体在待测光流图像中的中心点位置坐标等过程的重复处理,可以获得多帧待测光流图像以及抛落物体在各待测光流图像中的中心点 位置坐标。According to the method of S100-S110, the optical flow image generation of the real-time collected image to be tested can be sequentially performed, whether there is a thrown object in the corresponding optical flow image, and the position coordinates of the center point of the thrown object in the optical flow image to be tested can be determined, etc. By repeating the process, multiple frames of the optical flow images to be measured and the coordinates of the central point of the dropped object in each optical flow image to be measured can be obtained.
S120、根据各待测光流图像中抛落物体的中心点位置坐标确定抛落物体的运动轨迹。S120. Determine the trajectory of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured.
S130、基于运动轨迹执行高空抛物检测处理。S130. Perform high-altitude parabolic detection processing based on the motion trajectory.
在本公开实施例中,可以基于多帧后处理方法进行抛落物体的轨迹还原,其中,可以基于各待测光流图像中抛落物体的中心点位置坐标进行抛落物体运动轨迹的还原。In the embodiment of the present disclosure, the trajectory restoration of the dropped object can be performed based on a multi-frame post-processing method, wherein the trajectory restoration of the dropped object can be performed based on the position coordinates of the center point of the dropped object in each optical flow image to be measured.
其中,由于各待测光流图像中抛落物体的中心点位置坐标都是独立单一的,可以先将各待测光流图像中抛落物体的中心点位置坐标,按照各待测光流图像的生成时间顺序进行插值处理,进而将抛落物体在各待测光流图像中的中心点位置坐标映射在一张平面图像上,并对该抛落物体的各中心点位置坐标进行连接,便形成抛落物体对应的运动轨迹。Among them, since the coordinates of the center point of the dropped object in each optical flow image to be measured are independent and single, the coordinates of the center point of the dropped object in each optical flow image to be measured can be first calculated according to the coordinates of each optical flow image to be measured Interpolation processing is performed in order of generation time, and then the center point position coordinates of the dropped objects in each optical flow image to be measured are mapped on a plane image, and the center point position coordinates of the dropped objects are connected to facilitate The trajectory corresponding to the dropped object is formed.
示例性的,图3为本公开实施例提出的抛落物体的运动轨迹示意图,运动轨迹由抛落物体在连续多帧待测光流图像中的多个中心点位置坐标形成。Exemplarily, FIG. 3 is a schematic diagram of a motion trajectory of a dropped object proposed by an embodiment of the present disclosure, and the motion trajectory is formed by position coordinates of multiple center points of the dropped object in multiple consecutive frames of optical flow images to be measured.
可以理解的是,由于物体抛落过程中,可能会因某些建筑物、或者树木等被遮挡,那么便存在确定出的存在抛落物体的多帧待测图像并不是帧连续的,但是基于帧密集程度,同样可以基于抛落物体在大部分待测光流图像中的中心点位置坐标还原出抛落物体的运动轨迹。It can be understood that, since some buildings or trees may be blocked during the object throwing process, there are determined multiple frames of images to be tested in which there are dropped objects and the frames are not continuous, but based on The degree of frame density can also restore the trajectory of the dropped object based on the coordinates of the center point of the dropped object in most of the optical flow images to be tested.
在本公开实施例的一实施方式中,还原出抛落物体对应的运动轨迹之后,可引入轨迹直线拟合方法对抛落物体进行高空抛物事件检测,以进一步确定出抛落物体所对应的运动事件是否属于高空抛物事件。其中,可以结合直线拟合后的轨迹与竖直方向的夹角(直线拟合后的轨迹的斜率)、物体落下的高度等信息对抛落物体进行高空抛物事件检测。In an implementation of the embodiment of the present disclosure, after restoring the trajectory corresponding to the dropped object, a trajectory straight line fitting method can be introduced to detect the high-altitude parabolic event of the dropped object, so as to further determine the corresponding motion of the dropped object Whether the event is a high-altitude parabolic event. Among them, the angle between the trajectory after the straight line fitting and the vertical direction (the slope of the trajectory after the straight line fitting), the height of the object falling, and other information can be used to detect the high-altitude parabolic event of the dropped object.
示例性的,人在摄像头前将苹果用手举过头顶的事件虽然也是一种抛落物体的运动事件,但是该事件本质上并不属于高空抛物事件;而人站在楼宇中的八楼将苹果扔下至地面这种抛落物体的运动事件才认为是高空抛物事件。Exemplarily, the event that a person raises an apple with his hands above his head in front of the camera is also a motion event of throwing an object, but this event is not a high-altitude parabolic event in essence; while a person standing on the eighth floor of a building will The motion event of a dropped object such as an apple falling to the ground is considered a high-altitude parabolic event.
本公开实施例提供一种高空抛物检测方法,高空抛物检测设备通过根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的两张待测图像,并通过预设光流模型生成相邻的两张待测图像对应的光流图像;从光流图像中确定存在抛落物体的待测光流图像,并确定各待测光流图像中抛落物体的中心点位置坐标;根据各待测光流图像中抛落物体的中心点位置坐标确定抛落物体的运动轨迹;基于运动轨迹执行高空抛物检测处理。如此,本公开一方面采用基于深度学习构建的光流模型生成稠密光流图,以实现对运动物体进行检测,不仅鲁棒性好、精度高,而且耗时更短、噪声更少;另一方面,在使用预设光流模型进行运动物体检测的基础上,本公开还提出了鲁棒的单帧加多帧的后处理方法,在对存在干扰物的单帧进行过滤,找出存在抛落物体的单帧图像,去除单帧误检之后,结合多帧上的抛落物位置信息进行轨迹复原和高空抛物事件检测,进一步提高了高空抛物检测的效率和精度。An embodiment of the present disclosure provides a high-altitude parabolic detection method. The high-altitude parabolic detection device sequentially reads two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image collection, and uses the preset optical flow model Generate optical flow images corresponding to two adjacent images to be tested; determine from the optical flow images the optical flow images to be measured where there is a thrown object, and determine the position coordinates of the center point of the dropped object in each optical flow image to be measured; The trajectory of the dropped object is determined according to the position coordinates of the center point of the dropped object in each optical flow image to be measured; and the high-altitude parabolic detection process is performed based on the trajectory. In this way, on the one hand, the present disclosure uses an optical flow model constructed based on deep learning to generate a dense optical flow map to detect moving objects, which not only has good robustness and high precision, but also takes less time and has less noise; On the one hand, on the basis of using the preset optical flow model for moving object detection, this disclosure also proposes a robust single-frame plus multi-frame post-processing method, which filters the single frame with disturbing objects to find out the For the single-frame image of the falling object, after removing the single-frame false detection, combined with the position information of the falling object on multiple frames for trajectory recovery and high-altitude parabolic event detection, which further improves the efficiency and accuracy of high-altitude parabolic detection.
基于上述实施例,在本公开实施例的再一实施方式中,图4为本公开实施例提出的高空抛物检测方法的实现流程示意图三,如图4所示,高空抛物检测设备从所述光流图像中确定存在抛落物体的待测光流图像的方法还包括以下步骤:Based on the above-mentioned embodiments, in yet another implementation of the embodiment of the present disclosure, FIG. 4 is a schematic diagram of the implementation process of the high-altitude parabolic detection method proposed in the embodiment of the present disclosure. As shown in FIG. The method for determining the optical flow image to be tested in which there is a thrown object in the flow image also includes the following steps:
S111、对于任一光流图像,生成任一光流图像对应的二值图像;其中,二值图像包括第一像素值的前景运动物体和第二像素值的背景非运动物体。S111. For any optical flow image, generate a binary image corresponding to any optical flow image; wherein the binary image includes 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 present disclosure, after the optical flow images corresponding to two adjacent images to be tested are generated based on the preset optical flow model, a single-frame binarization method can be used to determine whether there is a real falling object in the current optical flow image Judgment is made to determine the optical flow image to be measured where there is a thrown object.
其中,对于任一光流图像,可以先将该光流图像转换为二值图像,即图像中仅包含第一像素值和第二像素值的灰度图像。例如光流图像对应的二值图像包括像素值0和像素值255。Wherein, for any optical flow image, the optical flow image may first be converted into a binary image, that is, a grayscale image including only the first pixel value and the second pixel value in the image. For example, a binary image corresponding to an optical flow image includes a pixel value of 0 and a pixel value of 255.
在本公开实施例的一实施方式中,为了区分图像中的运动物体和非运动物体,可以选 择将图像中像素值大于或者等于临界像素灰度值区域确定为运动物体存在的区域,并将该区域在二值图像中的像素值设置为第一像素值,反之选择将图像中像素值小于临界像素灰度值区域确定为非运动物体所在的区域,并将该区域在二值图像中的像素值设置为第二像素值,便获得任一光流图像对应的二值图像。In an implementation of the embodiment of the present disclosure, in order to distinguish between moving objects and non-moving objects in the image, it is possible to choose to determine the region where the pixel value in the image is greater than or equal to the critical pixel gray value as the region where the moving object exists, and the The pixel value of the area in the binary image is set as the first pixel value, otherwise, the area where the pixel value in the image is smaller than the critical pixel gray value is determined as the area where the non-moving object is located, and the pixel value of the area in the binary image If the value is set to the second pixel value, the binary image corresponding to any optical flow image can be obtained.
这里,二值图像中的第一像素值可以为255,表征前景运动物体,第二像素值可以为0,表征背景非像素物体。Here, the first pixel value in the binary image may be 255, representing a foreground moving object, and the second pixel value may be 0, representing a background non-pixel object.
其中,图5为本公开实施例提出的高空抛物检测方法的实现流程示意图四,如图5所示,生成所述任一光流图像对应的二值图像的方法可以包括以下步骤:Among them, FIG. 5 is a schematic diagram of the fourth implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure. As shown in FIG. 5, the method for generating the binary image corresponding to any optical flow image may include the following steps:
S111a、对任一光流图像进行单通道灰度转换处理,得到任一光流图像对应的单通道灰度图像。S111a. Perform single-channel grayscale conversion processing on any optical flow image to obtain a single-channel grayscale image corresponding to any optical flow image.
S111b、对单通道灰度图像进行归一化处理,得到任一光流图像对应的归一化后灰度图。S111b. Perform normalization processing on the single-channel grayscale image to obtain a normalized grayscale image corresponding to any optical flow image.
S111c、对归一化后灰度图进行二值化处理,得到任一光流图像对应的二值图像。S111c. Perform binarization processing on the normalized grayscale image to obtain a binary image corresponding to any optical flow image.
在本公开实施例中,在进行当前光流图像至二值图像的转换时,可以先进行当前光流图像至灰度图像的转换,再通过对灰度图像的二值化处理得到光流图像对应的二值图像。In the embodiment of the present disclosure, when converting the current optical flow image to a binary image, the current optical flow image can be converted to a grayscale image first, and then the optical flow image can be obtained by binarizing the grayscale image The corresponding binary image.
应理解,由于光流图像为多通道图像,因此先进行多通道光流图像至单通道灰度图像的转换。It should be understood that since the optical flow image is a multi-channel image, conversion of the multi-channel optical flow image to a single-channel grayscale image is performed first.
具体可以基于如下公式进行灰度图像的转换:Specifically, the grayscale image conversion can be performed based on the following formula:
Figure PCTCN2021123512-appb-000001
Figure PCTCN2021123512-appb-000001
其中,公式(2)中,
Figure PCTCN2021123512-appb-000002
表征当前光流图像(或第k帧光流图像)对应的单通道灰度图像。
Among them, in formula (2),
Figure PCTCN2021123512-appb-000002
Characterize the single-channel grayscale image corresponding to the current optical flow image (or the k-th frame optical flow image).
然后对当前光流图像对应的单通道灰度图像
Figure PCTCN2021123512-appb-000003
进行归一化处理,使其像素的灰度值均匀分布在0-255数值之间,得到归一化后的灰度图像,以降低对后续处理带来的干扰。进一步的,可以进行归一化后后灰度图像至二值图像的转换处理。
Then for the single-channel grayscale image corresponding to the current optical flow image
Figure PCTCN2021123512-appb-000003
Perform normalization processing so that the gray value of the pixels is evenly distributed between 0-255 values, and obtain a normalized gray image to reduce interference to subsequent processing. Further, the normalized grayscale image can be transformed into a binary image.
这里,可以预先设置进行图像二值化的临界像素灰度值,将像素值大于临界像素灰度值的像素点确定为二值图像中像素值为255的前景运动物体,对应的,将像素值小于临界像素灰度值的像素点确定为二值图像中像素值为0的背景运动物体。Here, the critical pixel gray value for image binarization can be set in advance, and the pixel whose pixel value is greater than the critical pixel gray value is determined as a foreground moving object with a pixel value of 255 in the binary image. Correspondingly, the pixel value Pixels smaller than the critical pixel gray value are determined as background moving objects with a pixel value of 0 in the binary image.
例如,可以通过如大津法OSTU进行图像二值化处理,获得当前光流图像对应的二值化图像
Figure PCTCN2021123512-appb-000004
For example, the binarized image corresponding to the current optical flow image can be obtained by performing image binarization processing such as the Otsu method OSTU
Figure PCTCN2021123512-appb-000004
S112、响应于前景运动物体在二值图像中的像素占比小于或等于预设占比阈值,确定任一光流图像为存在抛落物体的待测光流图像。S112. In response to the pixel ratio of the foreground moving object in the binary image being less than or equal to a preset ratio threshold, determine any optical flow image as an optical flow image to be measured with a falling object.
在本公开实施例中,对于任一光流图像,在获得该光流图像f k对应的二值化图像
Figure PCTCN2021123512-appb-000005
之后,该二值图像中前景运动物体所占的像素数目便可以用于表征光流图像中存在运动物体的概率,那么可以进一步基于前景运动物体在二值图像中像素数目占比对当前光流图像中是否存在抛落物体进行判断。
In the embodiment of the present disclosure, for any optical flow image, after obtaining the binarized image corresponding to the optical flow image f k
Figure PCTCN2021123512-appb-000005
Afterwards, the number of pixels occupied by the foreground moving object in the binary image can be used to characterize the probability of moving objects in the optical flow image, then the current optical flow can be further calculated based on the ratio of the number of pixels of the foreground moving object in the binary image. Whether there is a falling object in the image is judged.
考虑到运动物体过多带来的噪声以及运动物体运动响应强度过大对高空抛物检测带来的负面影响,可以设置运动物体在二值图像中像素数目的预设占比阈值,即运动物体在二值图像中的像素数目占整幅图像的比值不能超过的指定阈值。此时,基于前景运动物体在二值图像中的像素数据占比与预设占比阈值的比较结果对当前光流图像中是否存在抛落物体进行判断。Considering the noise caused by too many moving objects and the negative impact of high-altitude parabolic detection caused by excessive motion response strength of moving objects, the preset ratio threshold of the number of pixels of moving objects in binary images can be set, that is, moving objects in The ratio of the number of pixels in the binary image to the entire image cannot exceed the specified threshold. At this time, it is judged whether there is a thrown object in the current optical flow image based on the comparison result of the pixel data ratio of the foreground moving object in the binary image and the preset ratio threshold.
其中,在前景运动物体在二值图像中的像素数目占比小于或等于预设占比阈值的情况下,便可以确定当前光流图像中存在抛落物体;反之在前景运动物体在二值图像中的像素数目占比大于预设占比阈值的情况下,便可以确定当前光流图像中不存在抛落物体。Among them, when the proportion of the number of pixels of the foreground moving object in the binary image is less than or equal to the preset proportion threshold, it can be determined that there is a throwing object in the current optical flow image; otherwise, if the foreground moving object is in the binary image If the proportion of the number of pixels in is greater than the preset proportion threshold, it can be determined that there is no thrown object in the current optical flow image.
基于上述操作,便可以将光流图像中存在抛落物体的图像筛选出来,并作为进行后续高空抛物检测处理的待测光流图像。Based on the above operations, images with falling objects in the optical flow image can be screened out, and used as the optical flow image to be measured for subsequent high-altitude parabolic detection processing.
可见,在本公开实施例中,可以通过对当前光流图像进行单帧二值化处理,并基于前景运动物体在二值化图像中的像素数目占比对噪声过大或者异常的光流图像进行过滤,筛选出存在抛落物体的待测光流图像,从而提高高空检测处理的精度和速度。It can be seen that in the embodiment of the present disclosure, single-frame binarization processing can be performed on the current optical flow image, and based on the ratio of the number of pixels of the foreground moving object in the binarized image to the optical flow image with excessive noise or abnormal Filtering is performed to filter out the optical flow images to be tested that have dropped objects, thereby improving the accuracy and speed of high-altitude detection processing.
基于上述实施例,在在本公开的再一实施例中,图6为本公开实施例提出的高空抛物检测方法的实现流程示意图五,如6所示,确定各待测光流图像中所述抛落物体的中心点位置坐标的方法可以包括以下步骤:Based on the above-mentioned embodiment, in another embodiment of the present disclosure, FIG. 6 is a schematic diagram of the implementation process of the high-altitude parabolic detection method proposed in the embodiment of the present disclosure. As shown in 6, determine each optical flow image to be measured. The method for the center point position coordinates of the dropped object may comprise the following steps:
S113、对于任一待测光流图像,获取前景运动物体在二值图像中的初始位置坐标集合,并基于预设聚类算法和初始位置坐标集合对任一待测光流图像中的前景运动物体进行分类处理,得到至少一个运动物体和各运动物体分别对应的坐标子集。S113. For any optical flow image to be measured, obtain the initial position coordinate set of the foreground moving object in the binary image, and analyze the foreground motion in any optical flow image to be measured based on the preset clustering algorithm and the initial position coordinate set Objects are classified to obtain at least one moving object and coordinate subsets corresponding to each moving object.
S114、对于任一运动物体,计算任一运动物体的坐标子集对应的坐标平均值,并将坐标平均值确定为任一运动物体的中心点位置坐标。S114. For any moving object, calculate the coordinate average value corresponding to the coordinate subset of any moving object, and determine the coordinate average value as the center point position coordinate of any moving object.
S115、确定任一待测光流图像对应的归一化后灰度图中,任一运动物体的中心点位置坐标处的目标像素值,并将目标像素值最大的运动物体确定为抛落物体,以及目标像素值最大的运动物体对应的中心点位置坐标确定为抛落物体的中心点位置坐标。S115. Determine the target pixel value at the coordinates of the center point of any moving object in the normalized grayscale image corresponding to any optical flow image to be measured, and determine the moving object with the largest target pixel value as the thrown object , and the center point position coordinates corresponding to the moving object with the largest target pixel value are determined as the center point position coordinates of the dropped object.
在本公开实施例中,对于任一存在抛落物体的待测光流图像,可以引入聚类算法确定该待测光流图像中抛落物体的中心点位置坐标。In the embodiment of the present disclosure, for any optical flow image to be measured with a falling object, a clustering algorithm may be introduced to determine the position coordinates of the center point of the falling object in the optical flow image to be measured.
在本公开实施例的一实施方式中,在判定当前光流图像存在抛落物体的情况下,可以获取其二值图像中的前景运动物体的全部像素位置坐标,构成一位置坐标的二维数组,即初始位置坐标集合。In an implementation of the embodiment of the present disclosure, when it is determined that there is a falling object in the current optical flow image, all pixel position coordinates of the foreground moving object in the binary image can be obtained to form a two-dimensional array of position coordinates , which is the set of initial position coordinates.
应理解,当前光流图像中的运动物体可能不止一个,包括真正的抛落物体、飘落的树叶等,并且真正的抛落物体也并不是只有一个。为了确定出抛落物体的位置,在本公开的实施例中,可以通过位置聚类算法确定出抛落物体的位置,如不限制于Kmeans聚类算法。It should be understood that there may be more than one moving object in the current optical flow image, including real falling objects, falling leaves, etc., and there is not only one real falling object. In order to determine the position of the dropped object, in the embodiment of the present disclosure, the position of the dropped object may be determined through a position clustering algorithm, such as not limited to the Kmeans clustering algorithm.
其中,可以应用位置聚类算法先对当前光流图像中存在的运动物体进行初步分类。其中,可以基于前景运动物体的像素位置坐标为聚类参数,将前景运动物体聚成至少一类,如抛落物聚成一类,树叶聚成一类。并从中确定出真正抛落物体对应的类簇。Among them, the position clustering algorithm can be applied to perform preliminary classification on the moving objects existing in the current optical flow image. Wherein, based on the pixel position coordinates of the foreground moving objects as clustering parameters, the foreground moving objects can be clustered into at least one category, such as throwing objects into one category, and leaves into one category. And determine the clusters corresponding to the real dropped objects.
在本公开实施例的一实施方式中,对于任一待测光流图像,可以获取二值图像中的前景运动物体的初始位置坐标集合,并基于预设位置聚类算法对所述初始位置坐标集合进行聚类处理,从而获得至少一组坐标子集,该每一坐标子集对应一类运动物体,从而实现了基于位置聚类算法对待测光流图像中的运动物体进行分类。In an implementation manner of an embodiment of the present disclosure, for any optical flow image to be measured, a set of initial position coordinates of the foreground moving object in the binary image can be obtained, and the initial position coordinates can be classified based on a preset position clustering algorithm The set is clustered to obtain at least one set of coordinate subsets, and each coordinate subset corresponds to a type of moving object, thereby implementing a position-based clustering algorithm to classify moving objects in the optical flow image to be measured.
这里,在完成待测光流图像中运动物体的分类并得到每一类运动物体的坐标子集之后,可以基于每一类运动物体的坐标子集作均值运算,将确定出的坐标均值作为每一类运动物体的中心点位置坐标,并从待测光流图像对应的归一化后灰度图像中,基于中心点位置坐标确定对应位置处的像素灰度值。Here, after completing the classification of the moving objects in the optical flow image to be tested and obtaining the coordinate subsets of each type of moving objects, the mean value calculation can be performed based on the coordinate subsets of each type of moving objects, and the determined coordinate mean value can be used as each The center point position coordinates of a class of moving objects, and from the normalized grayscale image corresponding to the optical flow image to be measured, determine the pixel gray value at the corresponding position based on the center point position coordinates.
在本公开的实施例中,为了实现对高空抛物事件的及时报警处理,可以在不影响高空抛物检测精确度的前提上减少数据量快速的确定出高空抛物事件的抛物区间。其中,可以在不考虑当前抛落物体个数以及抛落物体类型的前提上,采用各待测光流图像中光流幅值最大的运动物体作为抛落物体,并将其对应的中心点位置坐标作为抛落物体的中心点位置坐标,并基于各待测光流图像中抛落物体的中心点位置坐标快速确定抛物事件的区间,以及时进行高空抛物事件的报警处理。In the embodiments of the present disclosure, in order to realize timely alarm processing for high-altitude parabolic events, the parabolic interval of high-altitude parabolic events can be quickly determined by reducing the amount of data without affecting the detection accuracy of high-altitude parabolic events. Among them, on the premise of not considering the current number of dropped objects and the types of dropped objects, the moving object with the largest optical flow amplitude in each optical flow image to be tested can be used as the dropped object, and its corresponding center point position The coordinates are used as the coordinates of the center point of the dropped object, and based on the coordinates of the center point of the dropped object in each optical flow image to be measured, the interval of the parabolic event is quickly determined, and the alarm processing of the high-altitude parabolic event is performed in time.
其中,基于响应强度/光流幅值越大,反映在灰度图像上的像素值越大的特性,可以在确定出每一运动物体在待测光流图像对应的归一化后灰度图像中的中心点位置坐标处的像素灰度值之后,将像素灰度值最大的一类运动物体确定抛落物体,并将该类运动物体的中心点位置坐标便确定为抛落物体的中心点位置坐标。Among them, based on the characteristic that the larger the response intensity/optical flow amplitude, the larger the pixel value reflected on the grayscale image, the normalized grayscale image corresponding to each moving object in the optical flow image to be measured can be determined After the gray value of the pixel at the coordinates of the center point position in , determine the type of moving object with the largest pixel gray value as the dropped object, and determine the center point position coordinates of this type of moving object as the center point of the dropped object Position coordinates.
可以理解的是,在当前只存在一个抛落物体的情况下,当前光流图像中响应强度,即光流幅值最大的类便可能是真正的抛落物体,而响应强度较弱应该是之外如树叶这类非抛 落物体;在当前可能存在多个抛落物体的情况下,当前光流图像中响应强度,即光流幅值最大的类便可能是多个抛落物体中的一个。It can be understood that, in the case where there is only one falling object, the response intensity in the current optical flow image, that is, the class with the largest optical flow amplitude may be the real falling object, and the weaker response intensity should be one of them. Non-throwing objects such as leaves; in the case that there may be multiple throwing objects, the response intensity in the current optical flow image, that is, the class with the largest optical flow amplitude may be one of the multiple throwing objects .
应理解,在高空抛物检测过程中,在进行高空抛物报警之后,用户可以查看抛物事件区间,如抛物事件对应的一段监控视频,虽然在可能存在多个抛落物体的情况下取待测光流图像中光流幅值最大的运动物体的中心点位置坐标作为抛物物体的位置坐标,但是在确定出抛物事件区间之后,可以通过查看该事件区间对该区间可能存在的每个抛落物体对应的抛物事件进行查看。It should be understood that during the high-altitude parabolic detection process, after the high-altitude parabolic alarm is issued, the user can view the parabolic event interval, such as a surveillance video corresponding to the parabolic event, although the optical flow to be measured may be taken when there may be multiple thrown objects The position coordinates of the center point of the moving object with the largest optical flow amplitude in the image are used as the position coordinates of the parabolic object, but after the parabolic event interval is determined, you can view the event interval corresponding to each falling object that may exist in the interval Parabolic events to view.
如此,采用各待测光流图像中光流幅值最大的运动物体的中心点位置坐标作为抛落物体的中心点位置坐标,并基于各待测光流图像中抛落物体的中心点位置坐标快速确定抛物事件的区间,不仅能够对图像中的干扰物进行有效过滤,而且可以在减少运算处理数据量的基础上,提高高空抛物检测的速度。In this way, the position coordinates of the center point of the moving object with the largest optical flow amplitude in each optical flow image to be measured are used as the position coordinates of the center point of the dropped object, and based on the position coordinates of the center point of the dropped object in each optical flow image to be measured Quickly determining the interval of parabolic events can not only effectively filter the interference objects in the image, but also improve the speed of high-altitude parabolic detection on the basis of reducing the amount of calculation and processing data.
其中,图7为本公开实施例提出的高空抛物检测方法的实现流程示意图六,如图7所示,在根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹之前,即步骤130之前,执行高空抛物检测处理的方法还包括以下步骤:Among them, FIG. 7 is a schematic diagram six of the implementation flow of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure. As shown in FIG. Before describing the trajectory of the dropped object, that is, before step 130, the method for performing high-altitude parabolic detection processing also includes the following steps:
步骤140、从各待测光流图像中,确定抛落物体对应的抛物事件的起始待测光流图像至结束待测光流图像。Step 140, from each optical flow image to be measured, determine the optical flow image to be measured from the start optical flow image to the end optical flow image to be measured of the parabolic event corresponding to the dropped object.
可以理解的是,图像采集监控设备是实时连续进行图像采集的,可能存在图像采集监控设备对不同时刻发生的多件抛物事件都进行图像采集;也就是说,属于同一抛物事件的待测光流图像一般都是帧连续的,或者,在存在少数抛落物抛落过程中被某些物体遮挡的情况下,属于同一抛物事件的待测光流图像之间的帧间隔小于一定阈值。相应的,如果待测光流图像之间的帧间隔相差过远,那么这两帧图像可能对应不同时刻发生的抛物事件。It can be understood that the image acquisition and monitoring equipment collects images continuously in real time, and there may be image acquisition and monitoring equipment that collects images of multiple parabolic events that occur at different times; that is, the optical flow to be measured belonging to the same parabolic event The images are generally frame-continuous, or, when there are a few projectiles that are blocked by some objects during the throwing process, the frame interval between the optical flow images to be measured belonging to the same parabolic event is less than a certain threshold. Correspondingly, if the frame interval between the optical flow images to be measured is too far apart, the two frames of images may correspond to parabolic events occurring at different times.
在本公开实施例中,可以基于待测光流图像的帧间隔值实现对不同时刻发生的不同抛物事件进行划分,确定出不同时刻发生的抛物事件对应的起始帧和结束帧。In the embodiment of the present disclosure, different parabolic events occurring at different times can be divided based on the frame interval value of the optical flow image to be measured, and the start frame and end frame corresponding to the parabolic events occurring at different times can be determined.
在一实施方式中,可以预先设置不同抛物事件之间的帧间隔阈值,依次对单帧处理后获得的存在抛落物体的待测光流图像进行与前一帧待测光流图像帧间隔值的确定,以确定前后两帧待测光流图像是否属于同一抛物事件,从而更新抛物事件的起始帧与结束帧。In one embodiment, the frame interval threshold between different parabolic events can be set in advance, and the optical flow image to be measured with a thrown object obtained after single frame processing is sequentially compared with the frame interval value of the previous frame of the optical flow image to be measured to determine whether the two frames of optical flow images to be measured belong to the same parabolic event, so as to update the start frame and end frame of the parabolic event.
示例性的,以前后两帧待测光流图像第一图像与第二图像为例进行说明。Exemplarily, the first image and the second image of two frames of optical flow images to be measured are taken as an example for description.
其中,可以在确定第一图像属于第一抛物事件,且将第一图像确定为该第一抛物事件对应的结束帧之后,计算当前第二图像与第一图像的帧间隔值。在该帧间隔值小于或者等于预设帧间隔阈值的情况下,确定第二图像与第一图像属于同一抛物事件,那么将第一抛物事件的结束帧更新为第二图像;对应的,在该帧间隔值大于预设帧间隔阈值的情况下,确定第二图像与第一图像不属于同一抛物事件,那么表明第一抛物事件的结束帧为第一图像,而第二图像属于新的抛物事件即第二抛物事件,此时可以将第二图像确定为新的第二抛物事件的起始帧。Wherein, after it is determined that the first image belongs to the first parabolic event and the first image is determined as the end frame corresponding to the first parabolic event, the frame interval value between the current second image and the first image may be calculated. When the frame interval value is less than or equal to the preset frame interval threshold, it is determined that the second image and the first image belong to the same parabolic event, then the end frame of the first parabolic event is updated to the second image; correspondingly, in the If the frame interval value is greater than the preset frame interval threshold, it is determined that the second image and the first image do not belong to the same parabolic event, then it indicates that the end frame of the first parabolic event is the first image, and the second image belongs to a new parabolic event That is, the second parabolic event, at this time, the second image may be determined as the starting frame of the new second parabolic event.
相应的,在确定出第二图像所属的抛物事件之后,可以继续确定下一帧待测光流图像即第三图像所属的抛物事件,如果第三图像与第二图像之间的帧间隔小于预设帧间隔阈值,那么第三图像与第二图像属于同一第二抛物事件,此时可以将第二抛物事件的结束帧确定为第三图像。重复该步骤,继续下下一帧待测光流图像与第三图像帧间隔值的确定,如果帧间隔值还是小于预设帧间隔阈值,那么将第二抛物事件的结束帧更新为下下一帧待测光流图像,重复执行该步骤,直至存在待测光流图像与前一帧待测光流图像的帧间隔值大于预设帧间隔阈值,那么前一帧待测光流图像便为第二抛物事件最终结束帧,从而便可以确定出一个完整的抛物事件的起始待测光流图像至结束待测光流图像,即确定出一个抛物事件发生的区间。Correspondingly, after determining the parabolic event to which the second image belongs, it is possible to continue to determine the next frame of the optical flow image to be measured, that is, the parabolic event to which the third image belongs, if the frame interval between the third image and the second image is less than the preset If the frame interval threshold is set, then the third image and the second image belong to the same second parabolic event, and at this time, the end frame of the second parabolic event can be determined as the third image. Repeat this step to continue to determine the frame interval value between the next frame of the optical flow image to be measured and the third image. If the frame interval value is still smaller than the preset frame interval threshold, update the end frame of the second parabolic event to the next Frame the optical flow image to be measured, repeat this step until the frame interval between the optical flow image to be measured and the previous optical flow image to be measured is greater than the preset frame interval threshold, then the optical flow image of the previous frame to be measured is The second parabolic event finally ends the frame, so that a complete parabolic event can be determined from the beginning to the end of the optical flow image to be measured, that is, the interval in which a parabolic event occurs can be determined.
例如,确定待测光流图像所属的抛物事件的逻辑代码如下所示,初始化抛物事件开始帧下标d s=0、结束帧下标d e=0,记δ e为抛物事件间的帧间隔阈值,同时初始化 starts=[],ends=[],用来记录每个抛物事件的开始和结束帧。 For example, the logic code for determining the parabolic event to which the optical flow image to be measured belongs is as follows, initialize the parabolic event start frame subscript d s =0, end frame subscript d e =0, denote δ e as the frame interval between parabolic events Threshold, and initialize starts=[], ends=[] at the same time, used to record the start and end frames of each parabolic event.
Figure PCTCN2021123512-appb-000006
Figure PCTCN2021123512-appb-000006
基于上述逻辑代码,便可以返回每个抛物事件的区间,即开始帧至结束帧列表starts,ends。Based on the above logic code, the interval of each parabolic event can be returned, that is, the list starts and ends from the start frame to the end frame.
这里,基于待测光流图像的时间先后顺序循环上述待测运动事件的确定过程,便可以确定出不同抛物事件对应的开始帧和结束帧,即抛物事件的起始待测光流图像至结束光流图像。Here, based on the chronological order of the optical flow images to be measured, the determination process of the above-mentioned motion events to be measured can be cycled, and the start frame and the end frame corresponding to different parabolic events can be determined, that is, the starting frame of the optical flow image to be measured to the end of the parabolic event Optical flow image.
在一些实施例中,确定出抛落物体对应的抛物事件发生的区间之后,可以对抛物事件的起始待测光流图像至结束光流图像中的每一帧待测光流图像中抛物物体的中心点位置坐标,按照时间顺序进行坐标点的插值处理,将抛落物体在抛物事件区间上各待测光流图像中的中心点位置坐标映射在一张平面图像上,并进行连接,从而形成抛物物体的运动轨迹。In some embodiments, after determining the interval in which the parabolic event corresponding to the thrown object occurs, the parabolic object in each frame of the optical flow image to be measured from the start optical flow image to the end optical flow image of the parabolic event can be The position coordinates of the center point of the object are interpolated according to the time sequence, and the coordinates of the center point position in each optical flow image to be measured on the parabolic event interval of the dropped object are mapped on a plane image and connected, so that Form the trajectory of a parabolic object.
可见,在本公开实施例中,可以基于帧间隔差值可以确定出不同待测运动事件的开始帧和结束帧,以对不同待测运动事件进行准确划分,提高高空抛物检测处理的精度。It can be seen that in the embodiments of the present disclosure, the start frame and end frame of different motion events to be detected can be determined based on the frame interval difference, so as to accurately divide different motion events to be measured and improve the accuracy of parabolic detection processing.
基于上述实施例,在本公开实施例的再一实施方式中,图8为本公开实施例提出的高空抛物检测方法的实现流程示意图七,如图8所示,高空抛物检测设备基于所述运动轨迹执行高空抛物检测处理的方法还包括以下步骤:Based on the above-mentioned embodiments, in yet another implementation of the embodiment of the present disclosure, FIG. 8 is a schematic diagram of the implementation process of the high-altitude parabolic detection method proposed in the embodiment of the present disclosure. As shown in FIG. 8, the high-altitude parabolic detection equipment is based on the motion The method for track execution high-altitude parabolic detection processing also includes the following steps:
S121、对抛落物体的运动轨迹执行直线拟合处理,得到运动轨迹对应的拟合后直线,并确定拟合后直线与竖直方向的夹角。S121. Perform a straight line fitting process on the motion trajectory of the dropped object, obtain a fitted straight line corresponding to the motion trajectory, and determine an included angle between the fitted straight line and the vertical direction.
S122、基于抛物事件中各待测光流图像中的抛落物体的中心点位置坐标,从对应的归一化后灰度图像中确定中心点位置像素值,并对各中心点位置像素值进行累加处理,得到像素累加值。S122. Based on the position coordinates of the center point of the dropped object in each optical flow image to be measured in the parabolic event, determine the pixel value of the center point position from the corresponding normalized grayscale image, and perform a calculation on the pixel value of each center point position Accumulation processing to obtain the pixel accumulation value.
S123、对抛物事件中,起始待测光流图像中抛落物体的中心点位置坐标与结束待测光流图像中抛落物体的中心点位置坐标进行纵坐标的差值运算,获得坐标差值。S123. In the parabolic event, the coordinates of the center point of the dropped object in the initial optical flow image to be measured and the coordinates of the center point of the dropped object in the optical flow image to be measured are calculated to obtain the coordinate difference value.
S124、基于拟合后直线与竖直方向的夹角、像素累加值以及坐标差值执行高空抛物检测处理。S124. Execute a high-altitude parabola detection process based on the angle between the fitted straight line and the vertical direction, the pixel accumulation value, and the coordinate difference.
在本公开实施例中,按照抛物事件起始待测光流图像至结束待测光流图像中各待测光流图像的时间顺序,对各光流图像中的抛落物体的中心点位置坐标进行插值处理,得到抛落物体的运动轨迹之后,可以基于该运动轨迹实现对抛物事件的高空抛物检测。In the embodiment of the present disclosure, according to the time sequence of each optical flow image to be measured in the optical flow image to be measured from the beginning of the parabolic event to the end of the optical flow image to be measured, the position coordinates of the center point of the thrown object in each optical flow image After performing interpolation processing to obtain the trajectory of the dropped object, the high-altitude parabolic detection of the parabolic event can be realized based on the trajectory.
应理解,抛落物体的运动轨迹并不满足一定的函数规则,但又存在一定的规律性,在本公开实施例中,可以引入直线拟合方法对抛落物体的运动轨迹进行直线拟合处理,得到 运动轨迹对应的拟合后直线。It should be understood that the trajectory of the dropped object does not satisfy a certain function rule, but there is a certain regularity. In the embodiment of the present disclosure, a straight line fitting method can be introduced to perform a straight line fitting process on the trajectory of the dropped object , to get the fitted straight line corresponding to the motion trajectory.
在一实施方式中,由于抛物事件并不是真正意义上的高空抛物事件,可能是类似于人通过手递出物体,或者将物体举过头顶,例如事件人站在窗口吃苹果,手拿起苹果放在嘴边咬一口手又放下,因此,可以计算拟合后直线与竖直方向的夹角,该夹角可以作为对抛物事件是否为高空抛物事件的判断因素之一。In one embodiment, since the parabolic event is not a real high-altitude parabolic event, it may be similar to a person passing an object by hand, or lifting an object above his head, such as an event where a person stands at the window and eats an apple, and the hand picks up the apple Put it on your mouth, bite your hand and put it down. Therefore, the angle between the fitted line and the vertical direction can be calculated, which can be used as one of the factors for judging whether a parabolic event is a high-altitude parabolic event.
例如,图9为本公开实施例提出的轨迹拟合直线与竖直方向的夹角示意图,如图9所示,拟合后直线与竖直方向的夹角为θ。For example, FIG. 9 is a schematic diagram of the angle between the trajectory fitting line and the vertical direction proposed by the embodiment of the present disclosure. As shown in FIG. 9 , the angle between the fitted line and the vertical direction is θ.
在另一实施例中,还可以从抛物事件的起始待测光流图像至结束待测光流图像中的各待测光流图像对应的归一化灰度图像中,确定抛落物体中心点位置坐标处的像素值,并对这些像素值进行累计求和处理,获得像素累加值,并将该像素累加值作为对抛物事件是否为高空抛物事件的判断因素之一。In another embodiment, it is also possible to determine the center of the thrown object from the normalized grayscale images corresponding to each optical flow image to be measured in the optical flow image to be measured from the beginning of the parabolic event to the end of the optical flow image to be measured The pixel value at the coordinates of the point position, and these pixel values are cumulatively summed to obtain the pixel cumulative value, and the pixel cumulative value is used as one of the factors for judging whether the parabolic event is a high-altitude parabolic event.
在另一实施例中,应理解真正的高空抛物事件是要有一定的高度抛物范围的。例如三层楼以上高度的抛物事件才属于高空抛物事件,因此,可以基于上述实施例确定出的抛物事件的起始待测光流图像中抛落物体的纵坐标即最大纵坐标,也就是抛物事件的最高点;和抛物事件的结束帧的纵坐标即最小纵坐标,也就是抛物事件的最低点,进行差值运算,然后基于最大纵坐标与最小纵坐标之间的坐标差值,确定抛物事件的最低点和最高点的高度差值,也就是抛物高度,该高度差值也可以作为对抛物事件是否为高空抛物事件的判断因素之一。In another embodiment, it should be understood that a real high-altitude parabolic event must have a certain height parabolic range. For example, a parabolic event with a height of more than three floors belongs to a high-altitude parabolic event. Therefore, the ordinate of the dropped object in the initial optical flow image of the parabolic event determined based on the above-mentioned embodiment is the maximum ordinate, that is, the parabolic The highest point of the event; and the ordinate of the end frame of the parabolic event, that is, the minimum ordinate, that is, the lowest point of the parabolic event, perform a difference operation, and then determine the parabola based on the coordinate difference between the maximum ordinate and the minimum ordinate The height difference between the lowest point and the highest point of the event, that is, the height of the parabola, can also be used as one of the factors for judging whether the parabolic event is a high-altitude parabolic event.
在本公开实施例中,可以结合拟合后直线与竖直方向的夹角、抛落物体中心点位置像素值累加值以及抛物事件的最低点和最高点的高度差值进一步对抛物事件是否属于高空抛物事件进行判断。In the embodiment of the present disclosure, it is possible to further determine whether the parabolic event belongs to High-altitude parabolic events are judged.
其中,图10为本公开实施例提出的高空抛物检测方法的实现流程示意图九,如图10所示,高空抛物检测设备基于拟合后直线与竖直方向的夹角、像素累加值以及坐标差值对抛物事件执行高空抛物检测处理的方法可以包括以下步骤:Among them, FIG. 10 is a schematic diagram of the implementation process of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure. As shown in FIG. The method for performing high-altitude parabolic detection processing on parabolic events may include the following steps:
S124a、响应于拟合后直线与竖直方向的夹角小于预设角度阈值、像素累加值小于预设像素阈值、以及坐标差值大于预设高度阈值,确定抛落物体为高空抛落物体,且对应的抛物事件为高空抛物事件。S124a. In response to the fact that the angle between the fitted straight line and the vertical direction is less than a preset angle threshold, the pixel accumulation value is less than a preset pixel threshold, and the coordinate difference is greater than a preset height threshold, determine that the dropped object is a high-altitude thrown object, And the corresponding parabolic event is a high-altitude parabolic event.
S124b、响应于拟合后直线与竖直方向的夹角大于或者等于预设角度阈值,或者,像素累加值大于或者等于预设像素阈值、以及坐标差值小于或者等于预设高度阈值,确定抛落物体不为高空抛落物体,且对应的抛物事件不为高空抛物事件。S124b. In response to the angle between the fitted straight line and the vertical direction being greater than or equal to the preset angle threshold, or the pixel accumulation value is greater than or equal to the preset pixel threshold, and the coordinate difference is less than or equal to the preset height threshold, determine the thrown The falling object is not a high-altitude throwing object, and the corresponding parabolic event is not a high-altitude parabolic event.
在本公开实施例的一实施方式中,预先设置高空抛物事件的夹角阈值、像素阈值以及高度阈值,将抛物事件拟合后直线与竖直方向的夹角和预设夹角阈值进行比较、将抛落物体中心点位置像素值累加值与预设像素阈值进行比较、以及将抛物事件事件的最低点和最高点的高度差值与预设高度阈值进行比较,同时结合三个判断因素的比较结果判断抛落物体是否为高空抛落物体,换言之,确定抛落物体对应的抛物事件事件是否为高空抛物事件。In one implementation of the embodiment of the present disclosure, the included angle threshold, pixel threshold and height threshold of the high-altitude parabolic event are preset, and the angle between the straight line and the vertical direction after the parabolic event is fitted is compared with the preset included angle threshold, Compare the cumulative value of the pixel value at the center point of the dropped object with the preset pixel threshold, and compare the height difference between the lowest point and the highest point of the parabolic event with the preset height threshold, and combine the comparison of the three judgment factors As a result, it is judged whether the dropped object is a high-altitude thrown object, in other words, it is determined whether the parabolic event corresponding to the dropped object is a high-altitude parabolic event.
其中,在抛物事件拟合后直线与竖直方向的夹角小于预设夹角阈值、抛落物体中心点位置像素值累加值小于预设像素阈值、以及抛物事件的最低点和最高点的高度差值大于预设高度阈值,即三个判断因素同时满足对应的预设阈值条件的情况下,确定抛落物体为高空抛落物体,对应的抛物事件为高空抛物事件。Among them, after the parabolic event is fitted, the angle between the straight line and the vertical direction is less than the preset angle threshold, the accumulated value of the pixel value at the center point of the dropped object is less than the preset pixel threshold, and the height of the lowest point and the highest point of the parabolic event The difference is greater than the preset height threshold, that is, when the three judging factors meet the corresponding preset threshold conditions at the same time, it is determined that the dropped object is a high-altitude thrown object, and the corresponding parabolic event is a high-altitude parabolic event.
在本公开的另一实施例中,三个判断因素中的至少一个判断因素不满足对应的预设阈值条件的情况下,确定抛落物体并不是真正意义上的高空抛物物体,对应的抛物事件不为高空抛物事件。In another embodiment of the present disclosure, when at least one of the three judging factors does not meet the corresponding preset threshold condition, it is determined that the thrown object is not a true high-altitude parabolic object, and the corresponding parabolic event Not for parabolic events.
其中,在待测运动事件拟合后直线与竖直方向的夹角大于或者等于预设夹角阈值的情况下,确定抛落物体不属于高空抛落物体;或者,在抛落物体中心点位置像素值累加值大于或者等于预设像素阈值的情况下,确定抛落物体不属于高空抛落物体;或者在抛物事件 的最低点和最高点的高度差值小于或者等于预设高度阈值的情况下,确定抛落物体不属于高空抛落物体。或者,在待测运动事件拟合后直线与竖直方向的夹角大于或者等于预设夹角阈值且抛落物体中心点位置像素值累加值大于或者等于预设像素阈值的情况下,确定抛落物体不属于高空抛落物体;或者在待测运动事件拟合后直线与竖直方向的夹角大于或者等于预设夹角阈值且在抛物事件的最低点和最高点的高度差值小于或者等于预设高度阈值的情况下,确定抛落物体不属于高空抛落物体;或者在抛落物体中心点位置像素值累加值大于或者等于预设像素阈值且抛物事件的最低点和最高点的高度差值小于或者等于预设高度阈值的情况下,确定抛落物体不属于高空抛落物体;或者在待测运动事件拟合后直线与竖直方向的夹角大于或者等于预设夹角阈值且抛落物体中心点位置像素值累加值大于或者等于预设像素阈值且抛物事件的最低点和最高点的高度差值小于或者等于预设高度阈值的情况下,确定抛落物体不属于高空抛落物体,对应的抛物事件不为高空抛物事件。Among them, when the angle between the straight line and the vertical direction after fitting the motion event to be measured is greater than or equal to the preset angle threshold, it is determined that the thrown object does not belong to a high-altitude thrown object; or, at the center point of the thrown object When the accumulated pixel value is greater than or equal to the preset pixel threshold, it is determined that the thrown object does not belong to a high-altitude thrown object; or when the height difference between the lowest point and the highest point of the parabolic event is less than or equal to the preset height threshold , to determine that the dropped object is not a high-altitude dropped object. Alternatively, when the angle between the straight line and the vertical direction after the fitting of the motion event to be measured is greater than or equal to the preset angle threshold and the accumulated value of the pixel value at the center point of the dropped object is greater than or equal to the preset pixel threshold, determine whether the throwing The falling object is not a high-altitude throwing object; or the angle between the straight line and the vertical direction after fitting the motion event to be measured is greater than or equal to the preset angle threshold and the height difference between the lowest point and the highest point of the parabolic event is less than or If it is equal to the preset height threshold, it is determined that the dropped object does not belong to a high-altitude dropped object; or the cumulative value of the pixel value at the center point of the dropped object is greater than or equal to the preset pixel threshold and the height of the lowest point and the highest point of the parabolic event When the difference is less than or equal to the preset height threshold, it is determined that the dropped object does not belong to a high-altitude thrown object; or the angle between the straight line and the vertical direction is greater than or equal to the preset angle threshold after the motion event to be measured is fitted and If the cumulative value of the pixel value at the center point of the dropped object is greater than or equal to the preset pixel threshold and the height difference between the lowest point and the highest point of the parabolic event is less than or equal to the preset height threshold, it is determined that the dropped object does not belong to high-altitude throwing Object, the corresponding parabolic event is not a high-altitude parabolic event.
可见,在本公开实施例中,基于事件检测方法能够在结合多帧上的抛落物体的检测信息进行轨迹完整还原之后,基于该运动轨迹实现对高空抛物事件的精准判定。It can be seen that in the embodiments of the present disclosure, the event-based detection method can realize accurate determination of high-altitude parabolic events based on the motion trajectory after the trajectory is completely restored by combining the detection information of the dropped object on multiple frames.
基于上述实施例,在本公开实施例的再一实施方式中,执行高空抛物检测处理的方法主要包括数据预处理、稠密光流计算、单帧后处理以及多帧后处理四大部分。Based on the above-mentioned embodiments, in yet another implementation of the embodiments of the present disclosure, the method for performing high-altitude parabolic detection processing mainly includes four parts: data preprocessing, dense optical flow calculation, single-frame post-processing and multi-frame post-processing.
其中,数据预处理具体包括以下步骤:Among them, data preprocessing specifically includes the following steps:
S201、获取初始图像,并基于预设多边形轮廓从初始图像中确定目标检测区域.S201. Acquire an initial image, and determine a target detection area from the initial image based on a preset polygonal outline.
S202、基于目标检测区域生成最小检测边框,并基于最小检测边框对初始图像进行图像分割处理,得到待测图像。S202. Generate a minimum detection frame based on the target detection area, and perform image segmentation processing on the initial image based on the minimum detection frame to obtain an image to be tested.
其中,稠密光流计算具体包括以下步骤:Among them, the dense optical flow calculation specifically includes the following steps:
S203、在执行循环过程的每个周期依次读取相邻两张待测图像,并通过预设光流模型生成相邻两张待测图像对应的光流图像。S203. Read two adjacent images to be tested sequentially in each cycle of the execution cycle, and generate optical flow images corresponding to the two adjacent images to be tested by using a preset optical flow model.
其中,单帧后处理具体包括以下步骤:Wherein, the single frame post-processing specifically includes the following steps:
S204、对光流图像进行单通道灰度转换处理,得到光流图像对应的单通道灰度图像。S204. Perform single-channel grayscale conversion processing on the optical flow image to obtain a single-channel grayscale image corresponding to the optical flow image.
S205、对单通道灰度图像进行归一化处理,得到光流图像对应的归一化后灰度图。S205. Perform normalization processing on the single-channel grayscale image to obtain a normalized grayscale image corresponding to the optical flow image.
S206、对归一化后灰度图进行二值化处理,得到光流图像对应的二值图像;其中,二值图像包括第一像素值的前景运动物体和第二像素值的背景非运动物体。S206. Perform binarization processing on the normalized grayscale image to obtain a binary image corresponding to the optical flow image; wherein, the binary image includes a foreground moving object with a first pixel value and a background non-moving object with a second pixel value .
S207、判断前景运动物体在二值图像中的像素占比是否小于或等于预设占比阈值?如果是,执行S208;如果不是,跳转执行S204,继续对下一帧光流图像进行处理。S207. Determine whether the pixel proportion of the foreground moving object in the binary image is less than or equal to a preset proportion threshold? If yes, execute S208; if not, skip to execute S204, and continue to process the next frame of optical flow image.
其中,在前景运动物体在二值图像中的像素占比小于或等于预设占比阈值的情况下,确定当前光流图像为存在抛落物体的待测光流图像;反之,则不存在。Wherein, in the case that the pixel ratio of the foreground moving object in the binary image is less than or equal to the preset ratio threshold, it is determined that the current optical flow image is the optical flow image to be measured with the dropped object; otherwise, it does not exist.
S208、获取前景运动物体在二值图像中的初始位置坐标集合。S208. Obtain a set of initial position coordinates of the foreground moving object in the binary image.
S209、基于预设聚类算法和初始位置坐标集合对前景运动物体进行分类处理,得到各运动物体对应的坐标子集。S209. Classify the foreground moving objects based on the preset clustering algorithm and the initial position coordinate set, and obtain the coordinate subsets corresponding to each moving object.
S210、对于任一运动物体,计算任一运动物体的坐标子集对应的坐标平均值,并将坐标平均值确定为任一运动物体的中心点位置坐标。S210. For any moving object, calculate the coordinate average value corresponding to the coordinate subset of any moving object, and determine the coordinate average value as the center point position coordinate of any moving object.
S211、确定任一待测光流图像对应的归一化后灰度图中,任一运动物体的中心点位置坐标处的目标像素值,并将目标像素值最大的运动物体确定为抛落物体,以及目标像素值最大的运动物体对应的中心点位置坐标确定为抛落物体的中心点位置坐标。S211. Determine the target pixel value at the coordinates of the center point of any moving object in the normalized grayscale image corresponding to any optical flow image to be measured, and determine the moving object with the largest target pixel value as the thrown object , and the center point position coordinates corresponding to the moving object with the largest target pixel value are determined as the center point position coordinates of the dropped object.
其中,多帧后处理包括以下步骤:Wherein, multi-frame post-processing includes the following steps:
S213、计算当前待测光流图像与历史前一个待测光流图像的帧间隔值。S213. Calculate the frame interval value between the current optical flow image to be measured and the previous optical flow image to be measured in history.
S214、判断帧间隔值是否小于或者等于预设间隔阈值阈值?如果是,执行S215;如果不是,跳转执行S213。S214. Determine whether the frame interval value is less than or equal to a preset interval threshold? If yes, execute S215; if not, skip to execute S213.
其中,如果当前待测光流图像值与历史前一个待测光流图像的帧间隔值小于或者等于预设间隔阈值,那么表明当前待测光流图像与历史前一个光流图像属于同一抛物事件,基 于当前待测光流图像更新抛物事件的结束帧;反之,不属于同一抛物事件,当前待测光流图像为新的抛物事件的起始帧。Among them, if the frame interval value between the current optical flow image to be measured and the previous optical flow image to be measured in history is less than or equal to the preset interval threshold, it indicates that the current optical flow image to be measured and the previous optical flow image in history belong to the same parabolic event , update the end frame of the parabolic event based on the current optical flow image to be measured; otherwise, if it does not belong to the same parabolic event, the current optical flow image to be measured is the start frame of the new parabolic event.
S215、判断是否确定出抛物事件的开始帧至结束帧?如果是,执行S216;如果不是,跳转执行S213,继续S213至S214的循环过程,直至拿到抛物事件的开始帧至结束帧。S215. Determine whether the start frame to the end frame of the parabolic event is determined? If yes, execute S216; if not, skip to execute S213, and continue the loop process from S213 to S214 until the start frame to end frame of the parabolic event is obtained.
S216、按照抛物事件起始帧至结束帧由先到后的帧顺序,对每一待测光流图像中的抛落物体的中心点位置坐标进行插值处理,得到抛落物体的运动轨迹。S216 , according to the frame sequence from the first frame to the end frame of the parabolic event, perform interpolation processing on the coordinates of the center point of the dropped object in each optical flow image to be measured, to obtain the trajectory of the dropped object.
S217、对抛落物体的运动轨迹进行直线拟合,计算拟合后直线与竖直方向的夹角θ;对抛物事件各帧上抛落物体中心点位置的像素灰度值求和,得到像素累加值V;计算抛物事件的最低点和最高点的高度差值,也就是抛物高度H;S217. Fitting a straight line to the trajectory of the dropped object, calculating the angle θ between the fitted straight line and the vertical direction; summing the gray values of the pixels at the central point of the dropped object on each frame of the parabolic event to obtain the pixel Accumulated value V; Calculate the height difference between the lowest point and the highest point of the parabolic event, that is, the parabolic height H;
S218、判断θ是否小于阈值T 1、V是否小于阈值T 2以及H是否大于阈值T 3;若是,则执行S219,若不是,跳转执行S220。 S218. Determine whether θ is smaller than threshold T 1 , whether V is smaller than threshold T 2 , and whether H is greater than threshold T 3 ; if yes, execute S219 ; if not, skip to execute S220 .
其中,T 1为预设夹角阈值,T 2为预设像素阈值,T 3预设高度阈值。 Among them, T 1 is the preset angle threshold, T 2 is the preset pixel threshold, and T 3 is the preset height threshold.
S219、抛落物体为高空抛落物体,抛物事件是高空抛物事件。S219, the dropped object is a high-altitude thrown object, and the parabolic event is a high-altitude parabolic event.
其中,在抛物事件拟合后直线与竖直方向的夹角小于预设夹角阈值、抛落物体中心点位置像素值累加值小于预设像素阈值、以及抛物事件的最低点和最高点的高度差值大于预设高度阈值,即三个判断因素同时满足对应的预设阈值条件的情况下,确定抛落物体为高空抛落物体,抛物事件为高空抛物事件。Among them, after the parabolic event is fitted, the angle between the straight line and the vertical direction is less than the preset angle threshold, the accumulated value of the pixel value at the center point of the dropped object is less than the preset pixel threshold, and the height of the lowest point and the highest point of the parabolic event The difference is greater than the preset height threshold, that is, when the three judging factors meet the corresponding preset threshold conditions at the same time, it is determined that the dropped object is a high-altitude thrown object, and the parabolic event is a high-altitude parabolic event.
S220、抛落物体不是高空抛落物体,抛物事件不是高空抛物事件。S220. The dropped object is not a high-altitude thrown object, and the parabolic event is not a high-altitude parabolic event.
其中,在抛物事件拟合后直线与竖直方向的夹角大于或者等于预设夹角阈值,或者,抛落物体中心点位置像素值累加值大于或者等于预设像素阈值,或者,抛物事件的最低点和最高点的高度差值小于或者等于预设高度阈值,即三个判断因素中的至少一个判断因素不满足对应的预设阈值条件的情况下,确定抛落物体不是高空抛落物体,抛物事件不是高空抛物事件。Wherein, after the parabolic event is fitted, the angle between the straight line and the vertical direction is greater than or equal to the preset angle threshold, or, the accumulated value of the pixel value at the center point of the thrown object is greater than or equal to the preset pixel threshold, or, the parabolic event The height difference between the lowest point and the highest point is less than or equal to the preset height threshold, that is, when at least one of the three judgment factors does not meet the corresponding preset threshold condition, it is determined that the thrown object is not a high-altitude thrown object, Parabolic events are not high-altitude parabolic events.
图11为本公开实施例提出的高空抛物检测方法的场景示意图,如图11所示,在对楼宇进行高空抛物检测的过程中,先通过摄像头进行图像采集,获得初始图像,然后通过预处理,包括基于预设多边形轮廓确定感兴趣区域,并基于最小边框进行图像裁剪,得到第n帧待测图像和第(n+1)帧待测图像;然后将相邻两帧待测图像输入由卷积神经网络和循环神经网络构建的预设光流模型,得到稠密光流图;继续对每一帧光流图像进行单帧后处理,包括基于图像二值化对图像中是否存在抛落物体进行判断,以及对存在抛落物体的待测光流图像基于位置聚类确定出抛落物体的中心点位置坐标;循环上述过程,获得多帧待测光流图像,并对多帧待测光流图像进行多帧后处理,直至获得抛落物体对应的抛物事件的开始帧至结束帧,并进行抛落物体的运动轨迹还原,以及基于运动轨迹对抛落物体是否为高空抛落物体进行检测,在为抛落物体为高空抛落物体,也就是对应的抛物时间为高空抛物事件的情况下对高空抛物事件进行时间报警。FIG. 11 is a schematic diagram of the scene of the high-altitude parabolic detection method proposed by the embodiment of the present disclosure. As shown in FIG. 11 , in the process of high-altitude parabolic detection for buildings, the image is first collected by the camera to obtain the initial image, and then through preprocessing, Including determining the region of interest based on the preset polygonal outline, and cropping the image based on the minimum frame to obtain the nth frame of the image to be tested and the (n+1)th frame of the image to be tested; then input the adjacent two frames of the image to be tested by the volume The preset optical flow model constructed by the product neural network and the recurrent neural network is used to obtain a dense optical flow map; continue to perform single-frame post-processing on each frame of optical flow image, including checking whether there are falling objects in the image based on image binarization Judgment, and determine the position coordinates of the center point of the thrown object based on position clustering for the optical flow image to be measured with the presence of the dropped object; loop the above process to obtain multiple frames of the optical flow image to be measured, and perform multiple frames of the optical flow to be measured The image is post-processed in multiple frames until the start frame to the end frame of the parabolic event corresponding to the dropped object is obtained, and the motion track of the dropped object is restored, and based on the motion track, whether the dropped object is a high-altitude dropped object is detected. When the dropped object is a high-altitude throwing object, that is, the corresponding throwing time is a high-altitude parabolic event, and a time alarm is performed for the high-altitude parabolic event.
可见,本公开实施例提出的高空抛物检测方法,一方面采用基于深度学习构建的光流模型生成稠密光流图,以实现对运动物体进行检测,不仅鲁棒性好、精度高,而且耗时更短、噪声更少;另一方面,在使用预设光流模型进行运动物体检测的基础上,还提出了鲁棒的单帧加多帧的后处理方法,基于图像二值化处理以及位置聚类算法在对存在干扰物的单帧进行过滤,并获得抛落物体的准确位置,之后结合多帧上的抛落物检测信息进行高空抛物事件的轨迹复原和检测,进一步提高了高空抛物检测的效率和精度。It can be seen that the high-altitude parabolic detection method proposed in the embodiment of the present disclosure, on the one hand, uses the optical flow model constructed based on deep learning to generate a dense optical flow map to detect moving objects, which is not only robust and accurate, but also time-consuming Shorter and less noise; on the other hand, on the basis of using the preset optical flow model for moving object detection, a robust single-frame plus multi-frame post-processing method is also proposed, based on image binarization and position The clustering algorithm filters the single frame with disturbing objects and obtains the accurate position of the dropped object, and then combines the dropped object detection information on multiple frames to recover and detect the trajectory of the high-altitude parabolic event, which further improves the high-altitude parabolic detection. efficiency and precision.
基于上述实施例,在本公开的在一实施例中,图12为本公开实施例提出的高空抛物检测装置的组成结构示意图,如图12所示,所述高空抛物检测装置10包括获取部分11、生成部分12、确定部分13、处理部分14。Based on the above-mentioned embodiments, in an embodiment of the present disclosure, FIG. 12 is a schematic diagram of the composition and structure of the high-altitude parabolic detection device proposed by the embodiment of the present disclosure. As shown in FIG. 12 , the high-altitude parabolic detection device 10 includes an acquisition part 11 , a generation part 12 , a determination part 13 , and a processing part 14 .
获取部分11,配置为根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的两张待测图像;The acquisition part 11 is configured to sequentially read two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition;
生成部分12,配置为通过预设光流模型生成所述相邻的两张待测图像对应的光流图像;The generating part 12 is configured to generate optical flow images corresponding to the two adjacent images to be tested through a preset optical flow model;
确定部分13,配置为从所述光流图像中确定存在抛落物体的待测光流图像,并确定各待测光流图像中所述抛落物体的中心点位置坐标;The determining part 13 is configured to determine from the optical flow images the optical flow images to be measured that there is a thrown object, and determine the position coordinates of the center point of the thrown object in each optical flow image to be measured;
确定部分13,还配置为根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹;The determining part 13 is further configured to determine the trajectory of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured;
处理部分14,配置为基于所述运动轨迹执行高空抛物检测处理。The processing part 14 is configured to perform high-altitude parabolic detection processing based on the motion trajectory.
在一些实施例中,所述确定部分13,配置为对于任一光流图像,生成所述任一光流图像对应的二值图像;其中,所述二值图像包括第一像素值的前景运动物体和第二像素值的背景非运动物体;以及响应于所述前景运动物体在所述二值图像中的像素占比小于或等于预设占比阈值,确定所述任一光流图像为所述存在抛落物体的待测光流图像。In some embodiments, the determining part 13 is configured to, for any optical flow image, generate a binary image corresponding to any optical flow image; wherein, the binary image includes the first pixel value of the foreground moving object and the second The background non-moving object of the pixel value; and in response to the pixel ratio of the foreground moving object in the binary image being less than or equal to a preset ratio threshold, determining that any optical flow image is the existence of the throwing object The optical flow image to be measured.
在一些实施例中,所述确定部分13,配置为对所述任一光流图像进行单通道灰度转换处理,得到所述任一光流图像对应的单通道灰度图像;以及对所述单通道灰度图像进行归一化处理,得到所述任一光流图像对应的归一化后灰度图;以及对所述归一化后灰度图进行二值化处理,得到所述任一光流图像对应的所述二值图像。In some embodiments, the determining part 13 is configured to perform single-channel grayscale conversion processing on any optical flow image to obtain a single-channel grayscale image corresponding to any optical flow image; performing normalization processing on the image to obtain a normalized grayscale image corresponding to any optical flow image; and performing binarization processing on the normalized grayscale image to obtain the grayscale image corresponding to any optical flow image Binary image.
在一些实施例中,所述确定部分13,配置为对于任一待测光流图像,获取所述前景运动物体在所述二值图像中的初始位置坐标集合,并基于预设聚类算法和所述初始位置坐标集合对所述任一待测光流图像中的所述前景运动物体进行分类处理,得到至少一个运动物体和各运动物体分别对应的坐标子集;以及对于任一运动物体,计算所述任一运动物体的坐标子集对应的坐标平均值,并将所述坐标平均值确定为所述任一运动物体的所述中心点位置坐标;以及确定所述任一待测光流图像对应的归一化后灰度图中,所述任一运动物体的中心点位置坐标处的目标像素值,并将所述目标像素值最大的运动物体确定为所述抛落物体,以及所述目标像素值最大的运动物体对应的中心点位置坐标确定为所述抛落物体的所述中心点位置坐标。In some embodiments, the determination part 13 is configured to obtain, for any optical flow image to be measured, a set of initial position coordinates of the foreground moving object in the binary image, and based on a preset clustering algorithm and The set of initial position coordinates classifies the foreground moving objects in any of the optical flow images to be measured, and obtains at least one moving object and respective coordinate subsets corresponding to each moving object; and for any moving object, Calculating the average value of coordinates corresponding to the coordinate subset of any moving object, and determining the average value of coordinates as the position coordinates of the center point of any moving object; and determining any optical flow to be measured In the normalized grayscale image corresponding to the image, the target pixel value at the center point position coordinates of any moving object, and the moving object with the largest target pixel value is determined as the thrown object, and the The position coordinates of the center point corresponding to the moving object with the largest target pixel value are determined as the position coordinates of the center point of the dropped object.
在一些实施例中,所述确定部分13,配置为根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹之前,从所述各待测光流图像中,确定所述抛落物体对应的抛物事件的起始待测光流图像至结束待测光流图像。In some embodiments, the determining part 13 is configured to determine the trajectory of the thrown object according to the center point position coordinates of the thrown object in the optical flow images to be measured, In the optical flow image, determine the optical flow image to be measured from the start to the optical flow image to be measured of the parabolic event corresponding to the dropped object.
在一些实施例中,所述确定部分13,配置为按照时间先后顺序对所述抛物事件中各待测光流图像中的所述抛落物体的中心点位置坐标进行插值处理,获得所述抛落物体的运动轨迹。In some embodiments, the determining part 13 is configured to interpolate the position coordinates of the center point of the thrown object in each optical flow image to be measured in the parabolic event in chronological order, to obtain the The trajectory of the falling object.
在一些实施例中,所述待测光流图像至少包括第一图像和第二图像,第一图像为第一抛物事件的当前结束待测光流图像;所述第一图像和所述第二图像为连续两帧待测光流图像,所述确定部分13,配置为计算所述第二图像与所述第一图像之间的帧间隔值;以及响应于所述帧间隔值小于或者等于预设间隔阈值,将所述第二图像更新为所述第一抛物事件的所述结束待测光流图像;响应于所述帧间隔值大于所述预设间隔阈值,将所述第二图像确定为第二抛物事件的起始待测光流图像。In some embodiments, the optical flow image to be measured includes at least a first image and a second image, the first image is the optical flow image to be measured at the current end of the first parabolic event; the first image and the second The images are two consecutive frames of optical flow images to be measured, and the determining part 13 is configured to calculate a frame interval value between the second image and the first image; and in response to the frame interval value being less than or equal to a preset Setting an interval threshold, updating the second image to the optical flow image to be measured at the end of the first parabolic event; in response to the frame interval value being greater than the preset interval threshold, determining the second image is the initial optical flow image to be measured for the second parabolic event.
在一些实施例中,所述处理部分14,配置为对所述抛落物体的运动轨迹执行直线拟合处理,得到所述运动轨迹对应的拟合后直线,并确定所述拟合后直线与竖直方向的夹角;以及基于所述抛物事件中各待测光流图像中的所述抛落物体的中心点位置坐标,从对应的归一化后灰度图像中确定中心点位置像素值,并对各中心点位置像素值进行累加处理,得到像素累加值;以及对所述抛物事件中,所述起始待测光流图像中所述抛落物体的中心点位置坐标与所述结束待测光流图像中所述抛落物体的中心点位置坐标进行纵坐标的差值运算,获得坐标差值;以及基于所述拟合后直线与竖直方向的夹角、所述像素累加值以及所述坐标差值执行所述高空抛物检测处理。In some embodiments, the processing part 14 is configured to perform a straight line fitting process on the motion trajectory of the thrown object, obtain a fitted straight line corresponding to the motion trajectory, and determine the relationship between the fitted straight line and The included angle in the vertical direction; and based on the center point position coordinates of the thrown object in each optical flow image to be measured in the parabolic event, determine the center point position pixel value from the corresponding normalized grayscale image , and perform cumulative processing on the pixel values of each central point position to obtain the pixel cumulative value; In the optical flow image to be measured, the position coordinates of the central point of the dropped object are subjected to a difference operation of the ordinate to obtain a coordinate difference; and based on the angle between the fitted straight line and the vertical direction, the pixel cumulative value And the coordinate difference value executes the high-altitude parabola detection process.
在一些实施例中,所述处理部分14,配置为响应于所述拟合后直线与竖直方向的夹角小于预设角度阈值、所述像素累加值小于所述预设像素阈值、以及所述坐标差值大于预设 高度阈值,确定所述抛落物体为高空抛落物体,且对应的所述抛物事件为高空抛物事件。In some embodiments, the processing part 14 is configured to respond to the angle between the fitted straight line and the vertical direction being smaller than a preset angle threshold, the pixel accumulation value being smaller than the preset pixel threshold, and the If the coordinate difference is greater than a preset height threshold, it is determined that the dropped object is a high-altitude projectile, and the corresponding parabolic event is a high-altitude parabolic event.
在一些实施例中,所述获取部分11,还配置为获取初始图像,并基于预设多边形轮廓从所述初始图像中确定目标检测区域;以及基于所述目标检测区域生成最小检测边框,并基于所述最小检测边框对所述初始图像进行图像分割处理,得到所述待测图像。In some embodiments, the acquisition part 11 is further configured to acquire an initial image, and determine a target detection area from the initial image based on a preset polygonal outline; and generate a minimum detection frame based on the target detection area, and based on The minimum detection frame performs image segmentation processing on the initial image to obtain the image to be tested.
在本公开的实施例中,进一步地,图13为本公开实施例提出的高空抛物检测设备的组成结构示意图,如图13所示,本公开实施例提出的高空抛物检测设备20还可以包括处理器21、存储有处理器21可执行指令的存储器22,进一步地,活体检测设备20还可以包括通信接口23,和用于连接处理器21、存储器22以及通信接口23的总线24。In the embodiment of the present disclosure, further, FIG. 13 is a schematic diagram of the composition and structure of the high-altitude parabolic detection device proposed in the embodiment of the present disclosure. As shown in FIG. 13 , the high-altitude parabolic detection device 20 proposed in the embodiment of the present disclosure may also include processing processor 21, a memory 22 storing instructions executable by the processor 21, further, the living body detection device 20 may also include a communication interface 23, and a bus 24 for connecting the processor 21, the memory 22 and the communication interface 23.
在本公开的实施例中,上述处理器21可以为特定用途集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processor,DSP)、数字信号处理装置(Digital Signal Processing Device,DSPD)、可编程逻辑装置(ProgRAMmable Logic Device,PLD)、现场可编程门阵列(Field Prog RAMmable Gate Array,FPGA)、中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器中的至少一种。可以理解地,对于不同的设备,用于实现上述处理器功能的电子器件还可以为其它,本公开实施例不作具体限定。活体检测设备20还可以包括存储器22,该存储器22可以与处理器21连接,其中,存储器22用于存储可执行程序代码,该程序代码包括计算机操作指令,存储器22可能包含高速RAM存储器,也可能还包括非易失性存储器,例如,至少两个磁盘存储器。In an embodiment of the present disclosure, the above-mentioned processor 21 may be an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD ), Programmable Logic Device (ProgRAMmable Logic Device, PLD), Field Programmable Gate Array (Field Prog RAMmable Gate Array, FPGA), Central Processing Unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor at least one of the It can be understood that, for different devices, the electronic device used to implement the above processor function may also be other, which is not specifically limited in this embodiment of the present disclosure. The living body detection device 20 may also include a memory 22, which may be connected to the processor 21, wherein the memory 22 is used to store executable program codes, the program codes include computer operation instructions, and the memory 22 may include a high-speed RAM memory, or may Also included is non-volatile memory, eg, at least two disk memories.
在本公开的实施例中,总线24用于连接通信接口23、处理器21以及存储器22以及这些器件之间的相互通信。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 communicate with each other among these devices.
在本公开的实施例中,存储器22,用于存储指令和数据。In an embodiment of the present disclosure, the memory 22 is used to store instructions and data.
进一步地,在本公开的实施例中,上述处理器21,用于根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的两张待测图像,并通过预设光流模型生成所述相邻的两张待测图像对应的光流图像;从所述光流图像中确定存在抛落物体的待测光流图像,并确定各待测光流图像中所述抛落物体的中心点位置坐标;根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹;基于所述运动轨迹执行高空抛物检测处理。Further, in the embodiment of the present disclosure, the above-mentioned processor 21 is configured to sequentially read two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition, and use the preset optical flow The model generates the optical flow images corresponding to the two adjacent images to be tested; from the optical flow images, it is determined that there is an optical flow image to be measured with a thrown object, and it is determined that in each optical flow image to be measured, the The coordinates of the center point of the object; determining the motion track of the dropped object according to the coordinates of the center point of the dropped object in the optical flow images to be measured; and performing high-altitude parabolic detection processing based on the motion track.
在实际应用中,上述存储器22可以是易失性存储器(volatile memory),例如随机存取存储器(Random-Access Memory,RAM);或者非易失性存储器(non-volatile memory),例如只读存储器(Read-Only Memory,ROM),快闪存储器(flash memory),硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);或者上述种类的存储器的组合,并向处理器21提供指令和数据。In practical applications, the above-mentioned memory 22 can be a volatile memory (volatile memory), such as a random access memory (Random-Access Memory, RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (Read-Only Memory, ROM), flash memory (flash memory), hard disk (Hard Disk Drive, HDD) or solid-state hard drive (Solid-State Drive, SSD); Provide instructions and data.
另外,在本实施例中的各功能模块可以集成在一个推荐单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in this embodiment may be integrated into one recommendation unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules.
集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台高空抛物检测设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or Part of the prior art contribution or all or part of the technical solution can be embodied in the form of software products, the computer software products are stored in a storage medium, including a number of instructions to make a high-altitude parabolic detection equipment (can It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.
本公开实施例提供了一种高空抛物检测设备,该高空抛物检测设备通过根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的两张待测图像,并通过预设光流模型生成相邻的两张待测图像对应的光流图像;从光流图像中确定存在抛落物体的待测光流图像, 并确定各待测光流图像中抛落物体的中心点位置坐标;根据各待测光流图像中抛落物体的中心点位置坐标确定抛落物体的运动轨迹;基于运动轨迹执行高空抛物检测处理。如此,本公开一方面采用基于深度学习构建的光流模型生成稠密光流图,以实现对运动物体进行检测,不仅鲁棒性好、精度高,而且耗时更短、噪声更少;另一方面,在使用预设光流模型进行运动物体检测的基础上,本公开还提出了鲁棒的单帧加多帧的后处理方法,在对存在干扰物的单帧进行过滤,找出存在抛落物体的单帧图像,去除单帧误检之后,结合多帧上的抛落物位置信息进行轨迹复原和高空抛物事件检测,进一步提高了高空抛物检测的效率和精度。An embodiment of the present disclosure provides a high-altitude parabolic detection device. The high-altitude parabolic detection device sequentially reads two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition, and uses preset light The flow model generates the optical flow images corresponding to the two adjacent images to be tested; from the optical flow images, determine the optical flow images to be tested that have thrown objects, and determine the position of the center point of the dropped objects in each optical flow image to be tested Coordinates; determine the motion track of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured; perform high-altitude parabolic detection processing based on the motion track. In this way, on the one hand, the present disclosure uses an optical flow model constructed based on deep learning to generate a dense optical flow map to detect moving objects, which not only has good robustness and high precision, but also takes less time and has less noise; On the one hand, on the basis of using the preset optical flow model for moving object detection, this disclosure also proposes a robust single-frame plus multi-frame post-processing method, which filters the single frame with disturbing objects to find out the For the single-frame image of the falling object, after removing the single-frame false detection, combined with the position information of the falling object on multiple frames for trajectory recovery and high-altitude parabolic event detection, which further improves the efficiency and accuracy of high-altitude parabolic detection.
本公开实施例提供一种计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现如上所述的高空抛物检测方法。An embodiment of the present disclosure provides a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, the above-mentioned high-altitude parabolic detection method is implemented.
具体来讲,本实施例中的一种高空抛物检测方法对应的程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种高空抛物检测方法对应的程序指令被一电子设备读取或被执行时,包括如下步骤:Specifically, the program instructions corresponding to a high-altitude parabolic detection method in this embodiment can be stored on a storage medium such as an optical disc, a hard disk, and a USB flash drive. When the program instructions corresponding to a high-altitude parabolic detection method in the storage medium When read or executed by an electronic device, the following steps are included:
根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的两张待测图像,并通过预设光流模型生成所述相邻的两张待测图像对应的光流图像;sequentially reading two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition, and generating optical flow images corresponding to the two adjacent images to be tested through a preset optical flow model;
从所述光流图像中确定存在抛落物体的待测光流图像,并确定各待测光流图像中所述抛落物体的中心点位置坐标;Determining the optical flow images to be measured in which there are dropped objects from the optical flow images, and determining the position coordinates of the center points of the dropped objects in each optical flow image to be measured;
根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹;determining the trajectory of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured;
基于所述运动轨迹执行高空抛物检测处理。A high-altitude parabolic detection process is performed based on the motion trajectory.
相应地,本公开实施例再提供一种计算机程序产品,所述计算机程序产品包括计算机可执行指令,该计算机可执行指令用于实现本公开实施例提出的高空抛物检测方法中的步骤。Correspondingly, an embodiment of the present disclosure further provides a computer program product, where the computer program product includes computer-executable instructions, and the computer-executable instructions are used to implement the steps in the high-altitude parabolic detection method proposed by the embodiments of the present disclosure.
本领域内的技术人员应明白,本公开的实施例可提供为方法、系统、或计算机程序产品。因此,本公开可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. 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, etc.) having computer-usable program code embodied therein.
本公开是参照根据本公开实施例的方法、设备(系统)、和计算机程序产品的实现流程示意图和/或方框图来描述的。应理解可由计算机程序指令实现流程示意图和/或方框图中的每一流程和/或方框、以及实现流程示意图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程高空抛物检测设备的处理器以产生一个机器,使得通过计算机或其他可编程高空抛物检测设备的处理器执行的指令产生用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present disclosure is described with reference to the implementation flow diagrams and/or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and/or block in the schematic flowchart and/or block diagram, and a combination of processes and/or blocks in the schematic flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a general purpose computer, a special purpose computer, an embedded processor or a processor of other programmable parabolic detection equipment to produce a machine, so that the instructions executed by the computer or other programmable parabolic detection equipment processor Means for realizing the functions specified in one or more steps of the flowchart and/or one or more blocks of the block diagram are produced.
这些计算机程序指令也可存储在能引导计算机或其他可编程高空抛物检测设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable parabolic detection device to operate in a specific manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising instruction means, the The instruction means implements the functions specified in implementing one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程高空抛物检测设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable parabolic detection equipment, so that a series of operation steps are performed on the computer or other programmable equipment to generate computer-implemented processing, thereby executing on the computer or other programmable equipment The instructions provide steps for implementing the functions specified in one or more processes of the flowchart diagrams and/or one or more blocks of the block diagrams.
以上所述,仅为本公开的较佳实施例而已,并非用于限定本公开的保护范围。The above descriptions are only preferred embodiments of the present disclosure, and are not intended to limit the protection scope of the present disclosure.
工业实用性Industrial Applicability
本公开实施例中,通过根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的 两张待测图像,并通过预设光流模型生成相邻的两张待测图像对应的光流图像;从光流图像中确定存在抛落物体的待测光流图像,并确定各待测光流图像中抛落物体的中心点位置坐标;根据各待测光流图像中抛落物体的中心点位置坐标确定抛落物体的运动轨迹;基于运动轨迹执行高空抛物检测处理。上述方案进一步提高了高空抛物检测的效率和精度。In the embodiment of the present disclosure, by sequentially reading two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition, and using a preset optical flow model to generate the corresponding two adjacent images to be tested The optical flow image of the object; from the optical flow image, determine the optical flow image of the object to be measured, and determine the coordinates of the center point of the object in each optical flow image to be measured; according to the optical flow image of each object to be measured The position coordinates of the center point of the object determine the motion track of the dropped object; the high-altitude parabolic detection process is performed based on the motion track. The above scheme further improves the efficiency and accuracy of high-altitude parabolic detection.

Claims (22)

  1. 一种高空抛物检测方法,所述方法包括:A high-altitude parabolic detection method, said method comprising:
    根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的两张待测图像,并通过预设光流模型生成所述相邻的两张待测图像对应的光流图像;sequentially reading two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition, and generating optical flow images corresponding to the two adjacent images to be tested through a preset optical flow model;
    从所述光流图像中确定存在抛落物体的待测光流图像,并确定各待测光流图像中所述抛落物体的中心点位置坐标;Determining the optical flow images to be measured in which there are dropped objects from the optical flow images, and determining the position coordinates of the center points of the dropped objects in each optical flow image to be measured;
    根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹;determining the trajectory of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured;
    基于所述运动轨迹执行高空抛物检测处理。A high-altitude parabolic detection process is performed based on the motion trajectory.
  2. 根据权利要求1所述的方法,其中,所述从所述光流图像中确定存在抛落物体的待测光流图像,包括:The method according to claim 1, wherein said determining from said optical flow image that there is an optical flow image to be measured of a thrown object comprises:
    对于任一光流图像,生成所述任一光流图像对应的二值图像;其中,所述二值图像包括第一像素值的前景运动物体和第二像素值的背景非运动物体;For any optical flow image, generate a binary image corresponding to any optical flow image; wherein, the binary image includes a foreground moving object with a first pixel value and a background non-moving object with a second pixel value;
    响应于所述前景运动物体在所述二值图像中的像素占比小于或等于预设占比阈值,确定所述任一光流图像为所述存在抛落物体的待测光流图像。In response to the pixel proportion of the foreground moving object in the binary image being less than or equal to a preset proportion threshold, it is determined that any optical flow image is the optical flow image to be tested in which the falling object exists.
  3. 根据权利要求2所述的方法,其中,所述生成所述任一光流图像对应的二值图像,包括:The method according to claim 2, wherein said generating a binary image corresponding to any optical flow image comprises:
    对所述任一光流图像进行单通道灰度转换处理,得到所述任一光流图像对应的单通道灰度图像;performing single-channel grayscale conversion processing on any optical flow image to obtain a single-channel grayscale image corresponding to any optical flow image;
    对所述单通道灰度图像进行归一化处理,得到所述任一光流图像对应的归一化后灰度图;Performing normalization processing on the single-channel grayscale image to obtain a normalized grayscale image corresponding to any optical flow image;
    对所述归一化后灰度图进行二值化处理,得到所述任一光流图像对应的所述二值图像。Binarizing the normalized grayscale image to obtain the binary image corresponding to any optical flow image.
  4. 根据权利要求3所述的方法,其中,所述确定各待测光流图像中所述抛落物体的中心点位置坐标,包括:The method according to claim 3, wherein said determining the position coordinates of the center point of said dropped object in each optical flow image to be measured comprises:
    对于任一待测光流图像,获取所述前景运动物体在所述二值图像中的初始位置坐标集合,并基于预设聚类算法和所述初始位置坐标集合对所述任一待测光流图像中的所述前景运动物体进行分类处理,得到至少一个运动物体和各运动物体分别对应的坐标子集;For any optical flow image to be measured, the initial position coordinate set of the foreground moving object in the binary image is obtained, and based on the preset clustering algorithm and the initial position coordinate set, the Classifying the foreground moving objects in the stream image to obtain at least one moving object and coordinate subsets corresponding to each moving object;
    对于任一运动物体,计算所述任一运动物体的坐标子集对应的坐标平均值,并将所述坐标平均值确定为所述任一运动物体的所述中心点位置坐标;For any moving object, calculate an average value of coordinates corresponding to the coordinate subset of any moving object, and determine the average value of coordinates as the position coordinates of the center point of any moving object;
    确定所述任一待测光流图像对应的归一化后灰度图中,所述任一运动物体的中心点位置坐标处的目标像素值,并将所述目标像素值最大的运动物体确定为所述抛落物体,以及所述目标像素值最大的运动物体对应的中心点位置坐标确定为所述抛落物体的所述中心点位置坐标。Determine the target pixel value at the coordinates of the center point of any moving object in the normalized grayscale image corresponding to any of the optical flow images to be measured, and determine the moving object with the largest target pixel value The center point position coordinates corresponding to the dropped object and the moving object with the largest target pixel value are determined as the center point position coordinates of the dropped object.
  5. 根据权利要求3所述的方法,其中,所述根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹之前,所述方法还包括:The method according to claim 3, wherein, before determining the trajectory of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured, the method further comprises:
    从所述各待测光流图像中,确定所述抛落物体对应的抛物事件的起始待测光流图像至结束待测光流图像;From the optical flow images to be measured, determine the optical flow image to be measured from the start to the optical flow image to be measured of the parabolic event corresponding to the dropped object;
    所述根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹,包括:The determining the trajectory of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured includes:
    按照时间先后顺序对所述抛物事件中各待测光流图像中的所述抛落物体的中心点位置坐标进行插值处理,获得所述抛落物体的运动轨迹。Interpolation processing is performed on the position coordinates of the center point of the dropped object in each optical flow image to be measured in the parabolic event in chronological order to obtain the trajectory of the dropped object.
  6. 根据权利要求5所述的方法,其中,所述待测光流图像至少包括第一图像和第二图像,第一图像为第一抛物事件的当前结束待测光流图像;所述第一图像和所述第二图像 为连续两帧待测光流图像;The method according to claim 5, wherein the optical flow image to be measured comprises at least a first image and a second image, and the first image is the current end optical flow image to be measured of the first parabolic event; the first image and the second image is two consecutive frames of optical flow images to be measured;
    所述从所述各待测光流图像中,确定所述抛落物体对应的抛物事件的起始待测光流图像至结束待测光流图像,包括:The determining from the optical flow images to be measured from the start optical flow image to the optical flow image to be measured of the parabolic event corresponding to the thrown object to the end optical flow image to be measured includes:
    计算所述第二图像与所述第一图像之间的帧间隔值;calculating a frame interval value between the second image and the first image;
    响应于所述帧间隔值小于或者等于预设间隔阈值,将所述第二图像更新为所述第一抛物事件的所述结束待测光流图像;In response to the frame interval value being less than or equal to a preset interval threshold, updating the second image to the end-to-be-measured optical flow image of the first parabolic event;
    响应于所述帧间隔值大于所述预设间隔阈值,将所述第二图像确定为第二抛物事件的起始待测光流图像。In response to the frame interval value being greater than the preset interval threshold, the second image is determined as the initial optical flow image to be measured of the second parabolic event.
  7. 根据权利要求5或6所述的方法,其中,所述基于所述运动轨迹执行高空抛物检测处理,包括:The method according to claim 5 or 6, wherein said performing high-altitude parabolic detection processing based on said motion trajectory comprises:
    对所述抛落物体的运动轨迹执行直线拟合处理,得到所述运动轨迹对应的拟合后直线,并确定所述拟合后直线与竖直方向的夹角;performing a straight line fitting process on the trajectory of the dropped object, obtaining a fitted straight line corresponding to the motion trajectory, and determining an angle between the fitted straight line and the vertical direction;
    基于所述抛物事件中各待测光流图像中的所述抛落物体的中心点位置坐标,从对应的归一化后灰度图像中确定中心点位置像素值,并对各中心点位置像素值进行累加处理,得到像素累加值;Based on the position coordinates of the center point of the dropped object in each optical flow image to be measured in the parabolic event, the pixel value of the center point position is determined from the corresponding normalized grayscale image, and the pixel value of the center point position is determined for each center point position pixel The values are accumulated and processed to obtain the pixel accumulated value;
    对所述抛物事件中,所述起始待测光流图像中所述抛落物体的中心点位置坐标与所述结束待测光流图像中所述抛落物体的中心点位置坐标进行纵坐标的差值运算,获得坐标差值;In the parabolic event, the coordinates of the center point position of the dropped object in the initial optical flow image to be measured and the coordinates of the center point position of the dropped object in the end optical flow image to be measured are ordinated The difference operation to obtain the coordinate difference;
    基于所述拟合后直线与竖直方向的夹角、所述像素累加值以及所述坐标差值执行所述高空抛物检测处理。The high-altitude parabola detection process is performed based on the angle between the fitted straight line and the vertical direction, the pixel accumulation value and the coordinate difference value.
  8. 根据权利要求7所述的方法,其中,所述基于所述拟合后直线与竖直方向的夹角、所述像素累加值以及所述坐标差值执行所述高空抛物检测处理,包括:The method according to claim 7, wherein, performing the high-altitude parabola detection process based on the angle between the fitted straight line and the vertical direction, the pixel accumulation value and the coordinate difference value includes:
    响应于所述拟合后直线与竖直方向的夹角小于预设角度阈值、所述像素累加值小于所述预设像素阈值、以及所述坐标差值大于预设高度阈值,确定所述抛落物体为高空抛落物体,且对应的所述抛物事件为高空抛物事件。In response to the angle between the fitted straight line and the vertical direction being less than a preset angle threshold, the pixel accumulation value being less than the preset pixel threshold, and the coordinate difference being greater than a preset height threshold, determining that the thrown The falling object is a high-altitude throwing object, and the corresponding parabolic event is a high-altitude parabolic event.
  9. 根据权利要求1至8任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 8, wherein the method further comprises:
    获取初始图像,并基于预设多边形轮廓从所述初始图像中确定目标检测区域;Acquiring an initial image, and determining a target detection area from the initial image based on a preset polygonal outline;
    基于所述目标检测区域生成最小检测边框,并基于所述最小检测边框对所述初始图像进行图像分割处理,得到所述待测图像。A minimum detection frame is generated based on the target detection area, and image segmentation processing is performed on the initial image based on the minimum detection frame to obtain the image to be tested.
  10. 一种高空抛物检测装置,所述高空抛物检测装置包括:A high-altitude parabolic detection device, the high-altitude parabolic detection device includes:
    读取部分,配置为根据图像采集的时间顺序、从多帧待测图像中依次读取相邻的两张待测图像;The reading part is configured to sequentially read two adjacent images to be tested from multiple frames of images to be tested according to the time sequence of image acquisition;
    生成部分,配置为通过预设光流模型生成所述相邻的两张待测图像对应的光流图像;The generating part is configured to generate the optical flow images corresponding to the two adjacent images to be tested through a preset optical flow model;
    确定部分,配置为从所述光流图像中确定存在抛落物体的待测光流图像,并确定各待测光流图像中所述抛落物体的中心点位置坐标;The determining part is configured to determine from the optical flow images the optical flow images to be measured that there is a thrown object, and determine the position coordinates of the center point of the thrown object in each optical flow image to be measured;
    确定部分,还配置为根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹;The determining part is further configured to determine the trajectory of the dropped object according to the position coordinates of the center point of the dropped object in each optical flow image to be measured;
    处理部分,配置为基于所述运动轨迹执行高空抛物检测处理。The processing part is configured to perform high-altitude parabolic detection processing based on the motion trajectory.
  11. 根据权利要求10所述的高空抛物检测装置,其中,The high-altitude parabolic detection device according to claim 10, wherein,
    所述确定部分,还配置为对于任一光流图像,生成所述任一光流图像对应的二值图像;其中,所述二值图像包括第一像素值的前景运动物体和第二像素值的背景非运动物体;以及响应于所述前景运动物体在所述二值图像中的像素占比小于或等于预设占比阈值,确定所述任一光流图像为所述存在抛落物体的待测光流图像。The determining part is further configured to generate a binary image corresponding to any optical flow image for any optical flow image; wherein, the binary image includes a foreground moving object with a first pixel value and a non-moving background with a second pixel value an object; and in response to a pixel ratio of the foreground moving object in the binary image being less than or equal to a preset ratio threshold, determining that any optical flow image is the optical flow image to be measured where there is the falling object.
  12. 根据权利要求11所述的高空抛物检测装置,其中,The high-altitude parabolic detection device according to claim 11, wherein,
    所述确定部分,还配置为对所述任一光流图像进行单通道灰度转换处理,得到所述任 一光流图像对应的单通道灰度图像;以及对所述单通道灰度图像进行归一化处理,得到所述任一光流图像对应的归一化后灰度图;以及对所述归一化后灰度图进行二值化处理,得到所述任一光流图像对应的所述二值图像。The determining part is further configured to perform single-channel grayscale conversion processing on any optical flow image to obtain a single-channel grayscale image corresponding to any optical flow image; and perform normalization processing on the single-channel grayscale image , obtaining a normalized grayscale image corresponding to any optical flow image; and performing binarization processing on the normalized grayscale image to obtain the binary image corresponding to any optical flow image.
  13. 根据权利要求12所述的高空抛物检测装置,其中,The high-altitude parabolic detection device according to claim 12, wherein,
    所述确定部分,还配置为对于任一待测光流图像,获取所述前景运动物体在所述二值图像中的初始位置坐标集合,并基于预设聚类算法和所述初始位置坐标集合对所述任一待测光流图像中的所述前景运动物体进行分类处理,得到至少一个运动物体和各运动物体分别对应的坐标子集;以及对于任一运动物体,计算所述任一运动物体的坐标子集对应的坐标平均值,并将所述坐标平均值确定为所述任一运动物体的所述中心点位置坐标;以及确定所述任一待测光流图像对应的归一化后灰度图中,所述任一运动物体的中心点位置坐标处的目标像素值,并将所述目标像素值最大的运动物体确定为所述抛落物体,以及所述目标像素值最大的运动物体对应的中心点位置坐标确定为所述抛落物体的所述中心点位置坐标。The determining part is further configured to obtain, for any optical flow image to be measured, a set of initial position coordinates of the foreground moving object in the binary image, and based on a preset clustering algorithm and the set of initial position coordinates Classifying the foreground moving objects in any of the optical flow images to be measured to obtain at least one moving object and respective coordinate subsets corresponding to each moving object; and for any moving object, calculating any of the moving objects The coordinate average value corresponding to the coordinate subset of the object, and determining the coordinate average value as the position coordinate of the center point of any moving object; and determining the normalization corresponding to any optical flow image to be measured In the post-grayscale image, the target pixel value at the coordinates of the center point of any moving object, and determine the moving object with the largest target pixel value as the dropped object, and the moving object with the largest target pixel value The position coordinates of the center point corresponding to the moving object are determined as the position coordinates of the center point of the dropped object.
  14. 根据权利要求12所述的高空抛物检测装置,其中,The high-altitude parabolic detection device according to claim 12, wherein,
    所述确定部分,还配置为根据所述各待测光流图像中所述抛落物体的中心点位置坐标确定所述抛落物体的运动轨迹之前,从所述各待测光流图像中,确定所述抛落物体对应的抛物事件的起始待测光流图像至结束待测光流图像;The determining part is further configured to, from the optical flow images to be measured, before determining the trajectory of the dropped object according to the position coordinates of the center point of the dropped object in the optical flow images to be measured, determining the optical flow image to be measured from the start to the end of the optical flow image to be measured of the parabolic event corresponding to the dropped object;
    所述确定部分,还配置为按照时间先后顺序对所述抛物事件中各待测光流图像中的所述抛落物体的中心点位置坐标进行插值处理,获得所述抛落物体的运动轨迹。The determining part is further configured to interpolate the position coordinates of the center point of the dropped object in each optical flow image to be measured in the parabolic event in chronological order, so as to obtain the trajectory of the dropped object.
  15. 根据权利要求14所述的高空抛物检测装置,其中,所述待测光流图像至少包括第一图像和第二图像,第一图像为第一抛物事件的当前结束待测光流图像;所述第一图像和所述第二图像为连续两帧待测光流图像;The high-altitude parabolic detection device according to claim 14, wherein the optical flow image to be measured includes at least a first image and a second image, and the first image is the optical flow image to be measured at the current end of the first parabolic event; The first image and the second image are two consecutive frames of optical flow images to be measured;
    所述确定部分,配置为计算所述第二图像与所述第一图像之间的帧间隔值;以及响应于所述帧间隔值小于或者等于预设间隔阈值,将所述第二图像更新为所述第一抛物事件的所述结束待测光流图像;以及响应于所述帧间隔值大于所述预设间隔阈值,将所述第二图像确定为第二抛物事件的起始待测光流图像。The determining part is configured to calculate a frame interval value between the second image and the first image; and in response to the frame interval value being less than or equal to a preset interval threshold, update the second image as The end optical flow image to be measured of the first parabolic event; and in response to the frame interval value being greater than the preset interval threshold, determining the second image as the initial optical flow to be measured for a second parabolic event stream images.
  16. 根据权利要求14或15所述的高空抛物检测装置,其中,The high-altitude parabolic detection device according to claim 14 or 15, wherein,
    所述处理部分,还配置为对所述抛落物体的运动轨迹执行直线拟合处理,得到所述运动轨迹对应的拟合后直线,并确定所述拟合后直线与竖直方向的夹角;以及基于所述抛物事件中各待测光流图像中的所述抛落物体的中心点位置坐标,从对应的归一化后灰度图像中确定中心点位置像素值,并对各中心点位置像素值进行累加处理,得到像素累加值;以及对所述抛物事件中,所述起始待测光流图像中所述抛落物体的中心点位置坐标与所述结束待测光流图像中所述抛落物体的中心点位置坐标进行纵坐标的差值运算,获得坐标差值;以及基于所述拟合后直线与竖直方向的夹角、所述像素累加值以及所述坐标差值执行所述高空抛物检测处理。The processing part is further configured to perform a straight line fitting process on the motion trajectory of the dropped object, obtain a fitted straight line corresponding to the motion trajectory, and determine the angle between the fitted straight line and the vertical direction ; and based on the center point position coordinates of the thrown object in each optical flow image to be measured in the parabolic event, determine the center point position pixel value from the corresponding normalized grayscale image, and calculate each center point The position pixel value is accumulated and processed to obtain the pixel accumulation value; and in the parabolic event, the position coordinates of the center point of the thrown object in the initial optical flow image to be measured and the position coordinates of the center point of the object in the optical flow image to be measured at the end The center point position coordinates of the dropped object are subjected to a difference operation of the ordinate to obtain a coordinate difference; and based on the angle between the fitted straight line and the vertical direction, the pixel accumulation value and the coordinate difference The high-altitude parabolic detection process is performed.
  17. 根据权利要求16所述的高空抛物检测装置,其中,The high-altitude parabolic detection device according to claim 16, wherein,
    所述处理部分,还配置为响应于所述拟合后直线与竖直方向的夹角小于预设角度阈值、所述像素累加值小于所述预设像素阈值、以及所述坐标差值大于预设高度阈值,确定所述抛落物体为高空抛落物体,且对应的所述抛物事件为高空抛物事件。The processing part is further configured to respond to the fact that the angle between the fitted straight line and the vertical direction is smaller than a preset angle threshold, the pixel accumulation value is smaller than the preset pixel threshold, and the coordinate difference is larger than a preset A height threshold is set to determine that the dropped object is a high-altitude projectile, and the corresponding parabolic event is a high-altitude projectile event.
  18. 根据权利要求10至17任一项所述的高空抛物检测装置,其中,The high-altitude parabolic detection device according to any one of claims 10 to 17, wherein,
    所述获取部分11,还配置为获取初始图像,并基于预设多边形轮廓从所述初始图像中确定目标检测区域;以及基于所述目标检测区域生成最小检测边框,并基于所述最小检测边框对所述初始图像进行图像分割处理,得到所述待测图像。The acquisition part 11 is further configured to acquire an initial image, and determine a target detection area from the initial image based on a preset polygonal outline; and generate a minimum detection frame based on the target detection area, and generate a minimum detection frame based on the minimum detection frame The initial image is subjected to image segmentation processing to obtain the image to be tested.
  19. 一种高空抛物检测设备,所述高空抛物检测设备包括处理器、存储有所述处理器可执行指令的存储器,当所述指令被所述处理器执行时,实现如权利要求1至9任一项所 述的方法。A high-altitude parabolic detection device, the high-altitude parabolic detection device includes a processor, a memory storing instructions executable by the processor, and when the instructions are executed by the processor, any one of claims 1 to 9 can be realized. method described in the item.
  20. 一种计算机可读存储介质,其上存储有程序,应用于高空抛物检测设备中,所述程序被处理器执行时,实现如权利要求1至9任一项所述的方法。A computer-readable storage medium, on which a program is stored, which is applied to a high-altitude parabolic detection device, and when the program is executed by a processor, the method according to any one of claims 1 to 9 is realized.
  21. 一种计算机程序,包括计算机可读代码,在所述计算机可读代码在电子设备中运行,被所述电子设备中的处理器执行的情况下,实现权利要求1至9任一项所述的高空抛物检测方法。A computer program, comprising computer readable code, when the computer readable code runs in an electronic device and is executed by a processor in the electronic device, it realizes any one of claims 1 to 9 High-altitude parabolic detection method.
  22. 一种计算机程序产品,当其在计算机上运行时,使得计算机执行如权利要求1至9任一项所述的高空抛物检测方法。A computer program product which, when run on a computer, causes the computer to execute the method for detecting high-altitude parabolic objects according to any one of claims 1 to 9.
PCT/CN2021/123512 2021-06-29 2021-10-13 Method, apparatus and device for detecting object thrown from height, and computer storage medium WO2023273011A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110729203.4 2021-06-29
CN202110729203.4A CN113409362B (en) 2021-06-29 2021-06-29 High altitude parabolic detection method and device, equipment and computer storage medium

Publications (2)

Publication Number Publication Date
WO2023273011A1 WO2023273011A1 (en) 2023-01-05
WO2023273011A9 true WO2023273011A9 (en) 2023-02-09

Family

ID=77680275

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/123512 WO2023273011A1 (en) 2021-06-29 2021-10-13 Method, apparatus and device for detecting object thrown from height, and computer storage medium

Country Status (2)

Country Link
CN (1) CN113409362B (en)
WO (1) WO2023273011A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113409362B (en) * 2021-06-29 2023-02-21 深圳市商汤科技有限公司 High altitude parabolic detection method and device, equipment and computer storage medium
CN114332154B (en) * 2022-03-04 2022-06-14 英特灵达信息技术(深圳)有限公司 High-altitude parabolic detection method and system
CN114332777B (en) * 2022-03-08 2022-05-17 南京甄视智能科技有限公司 High-altitude parabolic detection method and device
CN116994201B (en) * 2023-07-20 2024-03-29 山东产研鲲云人工智能研究院有限公司 Method for tracing and monitoring high-altitude parabolic objects and computing equipment

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9058670B2 (en) * 2010-05-03 2015-06-16 Stats Llc Trajectory detection and analysis in sporting events
US8553943B2 (en) * 2011-06-14 2013-10-08 Qualcomm Incorporated Content-adaptive systems, methods and apparatus for determining optical flow
CN110415269B (en) * 2019-07-19 2023-03-31 浙江大学 Target tracking algorithm under dynamic and static background
CN111260693B (en) * 2020-01-20 2023-07-28 北京中科晶上科技股份有限公司 High-altitude parabolic detection method
CN111401311A (en) * 2020-04-09 2020-07-10 苏州海赛人工智能有限公司 High-altitude parabolic recognition method based on image detection
CN111553274A (en) * 2020-04-28 2020-08-18 青岛聚好联科技有限公司 High-altitude parabolic detection method and device based on trajectory analysis
CN111814686A (en) * 2020-07-09 2020-10-23 国网山西省电力公司吕梁供电公司 Vision-based power transmission line identification and foreign matter invasion online detection method
CN112037266B (en) * 2020-11-05 2021-02-05 北京软通智慧城市科技有限公司 Falling object identification method and device, terminal equipment and storage medium
CN112308000B (en) * 2020-11-06 2023-03-07 安徽清新互联信息科技有限公司 High-altitude parabolic detection method based on space-time information
CN112418069B (en) * 2020-11-19 2021-05-11 中科智云科技有限公司 High-altitude parabolic detection method and device, computer equipment and storage medium
CN112733690B (en) * 2020-12-31 2024-02-20 北京易华录信息技术股份有限公司 High-altitude parabolic detection method and device and electronic equipment
CN113409362B (en) * 2021-06-29 2023-02-21 深圳市商汤科技有限公司 High altitude parabolic detection method and device, equipment and computer storage medium

Also Published As

Publication number Publication date
CN113409362A (en) 2021-09-17
WO2023273011A1 (en) 2023-01-05
CN113409362B (en) 2023-02-21

Similar Documents

Publication Publication Date Title
WO2023273011A9 (en) Method, apparatus and device for detecting object thrown from height, and computer storage medium
CN109154976B (en) System and method for training object classifier through machine learning
US9323991B2 (en) Method and system for video-based vehicle tracking adaptable to traffic conditions
US8744125B2 (en) Clustering-based object classification
US9230175B2 (en) System and method for motion detection in a surveillance video
CN108052917B (en) Method for automatically identifying illegal buildings based on new and old time phase change discovery
WO2005122094A1 (en) Method for detecting desired objects in a highly dynamic environment by a monitoring system
US10489674B2 (en) Information extraction using image data
CN106600625A (en) Image processing method and device for detecting small-sized living thing
Varghese Sample-based integrated background subtraction and shadow detection
CN109711256B (en) Low-altitude complex background unmanned aerial vehicle target detection method
CN114639075B (en) Method and system for identifying falling object of high altitude parabola and computer readable medium
WO2023273010A1 (en) High-rise littering detection method, apparatus, and device, and computer storage medium
CN110874592A (en) Forest fire smoke image detection method based on total bounded variation
US11227165B2 (en) Automatic lighting and security device
CN113065454B (en) High-altitude parabolic target identification and comparison method and device
CN108932465B (en) Method and device for reducing false detection rate of face detection and electronic equipment
CN113657250A (en) Flame detection method and system based on monitoring video
Sharma et al. Automatic vehicle detection using spatial time frame and object based classification
Secord et al. Tree detection in aerial lidar and image data
CN111191575A (en) Naked flame detection method and system based on flame jumping modeling
Hu et al. Research on abandoned and removed objects detection based on embedded system
CN116311212B (en) Ship number identification method and device based on high-speed camera and in motion state
Hao et al. A temporal-spatial background modeling of dynamic scenes
Prusty et al. A Machine Learning Approach for Detection and Suppression of Shadow or Wet Road Surfaces

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE