High-altitude falling object detection method and system based on machine vision
By combining Gaussian pyramid decomposition and Gaussian mixture model with adaptive thresholding, the false alarm problem of machine vision high-altitude falling object detection system in complex scenarios is solved, achieving high accuracy and robustness in high-altitude falling object detection.
Patent Information
- Application Number
- CN202511398864.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-28
- Publication Date
- 2026-01-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing machine vision-based high-altitude falling object detection systems have a high false alarm rate and are difficult to accurately detect high-altitude falling objects when faced with complex scenarios such as swaying leaves and sudden changes in lighting.
The Gaussian pyramid decomposition method is used to calculate the image stability cardinality, determine the baseline image, and combine the Gaussian mixture model and adaptive threshold to generate a foreground mask for target detection and calculate the risk index of falling objects from heights.
It improves the accuracy of high-altitude falling object detection, reduces the false detection rate, enhances the system's adaptability and robustness, and can maintain good detection performance in different complex scenarios.
Smart Images

Figure CN121330261A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of falling object detection technology, specifically to a method and system for detecting falling objects from heights based on machine vision. Background Technology
[0002] With the acceleration of urbanization, the number of high-rise buildings in cities is increasing daily, leading to frequent incidents of falling objects from heights, posing a serious threat to people's lives and property. To effectively prevent and reduce the harm caused by falling objects, timely and accurate detection and early warning are crucial. Machine vision technology, as a technique capable of simulating human visual functions and analyzing and processing images and videos, has broad application prospects in the field of falling object detection. By analyzing images captured by cameras, machine vision systems can identify target objects in the images and determine whether they are falling objects, thus achieving an early warning function. Traditional background modeling algorithms, such as the Gaussian mixture model (MOG2), are one of the commonly used target detection methods in machine vision. It models the historical data of each pixel in the image sequence, compares the current frame image with the background model, and thus detects foreground targets. However, in practical applications, there are situations such as swaying leaves and sudden changes in lighting, and these interfering factors can cause false alarms. Therefore, a machine vision-based method and system for detecting falling objects from heights is needed to solve these problems. Summary of the Invention
[0003] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a high-altitude falling object detection method and system based on machine vision, so as to solve the problems existing in the above-mentioned background technology.
[0004] This invention is implemented as follows: a machine vision-based method for detecting falling objects from heights, the method comprising the following steps:
[0005] The original image is acquired, and Gaussian pyramid decomposition is performed on the original image to obtain multi-layer images. The stability cardinality of each layer image is calculated, and the baseline layer image is determined based on the stability cardinality.
[0006] A background model is established for the reference layer image, and the non-reference layer images are weighted and fused after downsampling;
[0007] Extract the current frame image, perform a difference calculation between the current frame image and the background model to obtain a difference map, and determine the adaptive threshold;
[0008] Binarization of the difference map is performed based on an adaptive threshold to generate a foreground mask, and target detection and trajectory initialization are performed based on the foreground mask;
[0009] Determine the real-time speed and mass of the falling object, calculate the high-altitude falling object risk index, and generate early warning information based on the high-altitude falling object risk index.
[0010] As a further aspect of the present invention, the step of performing Gaussian pyramid decomposition on the original image to obtain multi-layer images, calculating the stability cardinality of each layer image, and determining the reference layer image based on the stability cardinality specifically includes:
[0011] The original image is preprocessed by applying Gaussian filtering to eliminate high-frequency noise and extract the building facade area from the original image.
[0012] The exterior facade area is identified as the decomposition region, and low-resolution layers are generated through downsampling, with each layer having half the resolution of the previous layer.
[0013] For each low-resolution layer generated, the stability cardinality of that layer's image is calculated. When the stability cardinality is less than the stability threshold, the latest low-resolution layer image is determined as the baseline layer image, and the generation of new low-resolution layers is stopped.
[0014] As a further aspect of the present invention, when calculating the stability cardinality of each image layer, the variance σ of each pixel i in that image layer at time t is determined. t (i) Stability base N represents the total number of pixels.
[0015] As a further aspect of the present invention, the step of establishing a background model for the reference layer image and then weightedly fusing the non-reference layer images after downsampling specifically includes:
[0016] Determine the parameters of the Gaussian mixture model algorithm, including the learning rate, maximum Gaussian number, and initial background threshold;
[0017] The Gaussian mixture model is trained based on the Z consecutive reference layer images in the original image to output the initial background model;
[0018] The non-reference layer images are downsampled using bilinear interpolation to obtain the same resolution as the reference layer images. The fusion weights are determined based on the stability cardinality of each non-reference layer image, and the fusion is performed to obtain the final background model.
[0019] As a further aspect of the present invention, the step of target detection and trajectory initialization based on foreground mask specifically includes:
[0020] Connected regions in the foreground mask are marked using an 8-neighbor or 4-neighbor connectivity algorithm, with each connected region considered as a candidate target.
[0021] Connected regions are filtered based on area and shape. For the retained connected regions, target features are extracted, including bounding boxes, centroid coordinates, and pixel area.
[0022] Perform trajectory initialization: record target features and timestamps, and update target speed in real time.
[0023] As a further aspect of the present invention, the step of determining the real-time velocity and mass of the falling object and calculating the risk index of falling objects from heights specifically includes:
[0024] Based on the centroid coordinates of consecutive frames in the trajectory, the horizontal and vertical displacements of the centroid are calculated, and the real-time velocity is obtained by combining the frame rate.
[0025] The volume of the falling object is determined based on the pixel area, and the color and shape features of the falling object are identified to determine the material and obtain the mass of the falling object.
[0026] Calculate the Falling Object Risk Index (FORI): FORI = k1 × v 2 +k2×m, where v represents real-time velocity, m represents mass, and k1 and k2 are constant coefficients.
[0027] Another object of the present invention is to provide a high-altitude falling object detection system based on machine vision, the system comprising:
[0028] The baseline image module is used to acquire the original image, perform Gaussian pyramid decomposition on the original image to obtain multiple layers of images, calculate the stability cardinality of each layer of images, and determine the baseline image based on the stability cardinality.
[0029] The background model determination module is used to establish a background model for the reference layer image and to weighted fuse the non-reference layer images after downsampling.
[0030] The difference map determination module is used to extract the current frame image, perform difference calculation between the current frame image and the background model to obtain the difference map, and determine the adaptive threshold.
[0031] The target detection module is used to binarize the difference map based on an adaptive threshold, generate a foreground mask, and perform target detection and trajectory initialization based on the foreground mask;
[0032] The falling object risk index module is used to determine the real-time speed and mass of falling objects, calculate the falling object risk index, and generate early warning information based on the falling object risk index.
[0033] As a further embodiment of the present invention, the reference layer image module includes:
[0034] The image preprocessing unit is used to preprocess the original image, apply Gaussian filtering to eliminate high-frequency noise, and extract the building facade area from the original image.
[0035] Image decomposition unit is used to determine the exterior facade area as the decomposition region, and generates low-resolution layers through downsampling, with each layer having half the resolution of the previous layer;
[0036] The stability cardinality calculation unit is used to calculate the stability cardinality of the image of each low-resolution layer generated. When the stability cardinality is less than the stability threshold, the latest low-resolution layer image is determined as the reference layer image, and the generation of new low-resolution layers is stopped.
[0037] As a further aspect of the present invention, the background model determination module includes:
[0038] The model parameter determination unit is used to determine the parameters of the Gaussian mixture model algorithm, including the learning rate, the maximum Gaussian number, and the initial background threshold.
[0039] The initial background model unit is used to train the Gaussian mixture model based on the Z consecutive reference layer images in the original image and output the initial background model.
[0040] The final background model unit is used to downsample the non-reference layer images to obtain the same resolution as the reference layer images through bilinear interpolation. The fusion weights are determined based on the stability cardinality of each non-reference layer image, and the fusion is performed to obtain the final background model.
[0041] As a further aspect of the present invention, the target detection module includes:
[0042] The candidate target determination unit is used to mark the connected regions in the foreground mask using an 8-neighborhood or 4-neighborhood connectivity algorithm, with each connected region being regarded as a candidate target;
[0043] The target feature extraction unit is used to filter connected regions based on area and shape, and extract target features from the retained connected regions. The target features include bounding boxes, centroid coordinates, and pixel area.
[0044] The trajectory initialization unit is used to initialize the trajectory: record target features and timestamps, and update the target speed in real time.
[0045] Compared with the prior art, the beneficial effects of the present invention are:
[0046] This invention decomposes the original image into a Gaussian pyramid, calculates the stability cardinality of each image layer, and determines the reference layer image. It can automatically select a suitable reference layer based on the stability of the image under different scenarios, effectively reducing the impact of interference factors such as swaying leaves and sudden changes in lighting on background modeling. This improves the accuracy of detecting falling objects from high altitudes and reduces the false detection rate. Background modeling can be automatically adjusted to maintain good detection performance, enhancing adaptability and robustness. Attached Figure Description
[0047] Figure 1 This is a flowchart of a machine vision-based method for detecting falling objects from heights.
[0048] Figure 2 This is a flowchart for determining a reference layer image in a machine vision-based method for detecting falling objects from heights.
[0049] Figure 3 This is a flowchart of establishing a background model in a machine vision-based method for detecting falling objects from heights.
[0050] Figure 4 This is a flowchart illustrating target detection in a machine vision-based method for detecting falling objects from heights.
[0051] Figure 5 This is a flowchart for calculating the risk index of falling objects from heights in a machine vision-based method for detecting falling objects from heights.
[0052] Figure 6 This is a schematic diagram of a high-altitude falling object detection system based on machine vision. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0054] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.
[0055] like Figure 1 As shown, this embodiment of the invention provides a high-altitude falling object detection method based on machine vision, the method comprising the following steps:
[0056] S100: Acquire the original image, perform Gaussian pyramid decomposition on the original image to obtain multi-layer images, calculate the stability cardinality of each layer image, and determine the reference layer image based on the stability cardinality.
[0057] S200: Establish a background model for the reference layer image and then weight and fuse the non-reference layer images after downsampling;
[0058] S300: Extract the current frame image, perform difference calculation between the current frame image and the background model to obtain the difference map, and determine the adaptive threshold;
[0059] S400 binarizes the difference map based on an adaptive threshold, generates a foreground mask, and performs target detection and trajectory initialization based on the foreground mask;
[0060] S500 determines the real-time speed and mass of falling objects, calculates the high-altitude falling object risk index, and generates early warning information based on the high-altitude falling object risk index.
[0061] It should be noted that traditional background modeling algorithms (such as MOG2) struggle to accurately distinguish between real falling objects and these interfering factors when faced with complex scenes such as swaying leaves and sudden changes in lighting. These factors cause significant variations in pixel values within the image, increasing the difference from a normal background model. This makes it difficult for the algorithm to accurately differentiate between real falling objects and these interfering factors. Consequently, the system frequently misclassifies swaying leaves and changes in lighting as falling objects, resulting in numerous false alarms, reduced system reliability and practicality, and an inability to meet the needs of real-world falling object detection. The embodiments of this invention aim to solve the above problems.
[0062] In this embodiment of the invention, a 4K resolution camera (supporting 10x optical zoom) is first deployed to cover the entire height of the building facade. The camera captures the original image, which is then decomposed into multiple layers using a Gaussian pyramid. A Gaussian pyramid is a multi-scale image representation structure that generates a series of images with progressively decreasing resolution by performing multiple Gaussian smoothing and downsampling operations on the original image. The stability cardinality of each layer is calculated, and a reference layer image is determined based on this cardinality. Here, the layer with the smallest stability cardinality (i.e., the layer with the most dramatic dynamic background) is selected as the reference layer, effectively reducing the false detection rate of dynamic backgrounds. Next, a background model is built based on the reference layer image. Non-reference layer images are then downsampled and weighted to retain detail information to supplement the deficiencies of the initial background model, resulting in the final background model. Then, the current frame image is extracted, and a difference map is obtained by calculating the difference between each pixel in the current frame image and the background model. Simultaneously, an adaptive threshold is determined: the adaptive threshold = the mean pixel value of the background model + 3 × the standard deviation of the background model pixels. The mean and standard deviation of the background model pixels can be obtained from the previous 100 consecutive frames of the current frame image. The adaptive threshold is then used to binarize the difference map, generating a foreground mask (binarized image). Specifically, when the absolute difference of a pixel is greater than the adaptive threshold, the foreground mask for that pixel is set to 1; otherwise, it is set to 0. Based on this foreground mask, target detection and trajectory initialization can be performed. Next, the real-time speed and mass of the falling object are determined, the Falling Object Risk Index (FORI) is calculated, and warning information is generated based on the FORI. For example, FORI < 0.5: low risk (green warning), 0.5 ≤ FORI < 1.0: medium risk (yellow warning), FORI ≥ 1.0: high risk (red warning), and the warning is immediately pushed to the property management platform. The embodiments of this invention employ Gaussian pyramid decomposition and a method for determining the baseline layer based on a stability cardinality, enabling them to adapt to scenarios of varying complexity. Whether in areas with frequent changes in lighting or environments with numerous swaying leaves, the system can automatically adjust parameters to maintain excellent detection performance, enhancing its adaptability and robustness in practical applications.
[0063] like Figure 2 As shown, in a preferred embodiment of the present invention, the steps of performing Gaussian pyramid decomposition on the original image to obtain multi-layer images, calculating the stability cardinality of each layer image, and determining the reference layer image based on the stability cardinality specifically include:
[0064] S101, preprocess the original image, apply Gaussian filtering to eliminate high-frequency noise, and extract the building facade area from the original image;
[0065] S102, the exterior facade area is determined as the decomposition area, and low-resolution layers are generated by downsampling, with each layer having half the resolution of the previous layer;
[0066] S103. For each low-resolution layer generated, the stability cardinality of the image of that layer is calculated. When the stability cardinality is less than the stability threshold, the latest low-resolution layer image is determined as the reference layer image, and the generation of new low-resolution layers is stopped.
[0067] In this embodiment of the invention, Gaussian filtering (kernel size 5×5, Gaussian distribution standard deviation 1.5) is applied to the image to eliminate high-frequency noise. Additionally, the building facade area in the original image is extracted (pre-extracted through semantic segmentation). Only the facade area is determined as the decomposition region, significantly reducing the computational load. During decomposition, low-resolution layers are generated through downsampling, with each layer having half the resolution of the previous layer. For example, when 5 layers are obtained, the corresponding resolutions are: original resolution, 1 / 2, 1 / 4, 1 / 8, and 1 / 16. Upon generating each low-resolution layer, the stability cardinality of that layer is immediately calculated. When the stability cardinality is less than a stability threshold (e.g., 1.2), the latest low-resolution layer image is determined as the baseline layer image. Specifically, when calculating the stability cardinality of each layer image, the variance σt(i) of each pixel i in that layer image at time t is first determined. The variance σt(i) is obtained from the frame image corresponding to time t and the previous n (e.g., 20) consecutive images. N represents the total number of pixels. The smaller the stability base number, the more intense the dynamic background of the layer.
[0068] like Figure 3 As shown, in a preferred embodiment of the present invention, the step of establishing a background model for the reference layer image and then weightedly fusing the non-reference layer images after downsampling specifically includes:
[0069] S201, Determine the parameters of the Gaussian mixture model algorithm, including the learning rate, maximum Gaussian number, and initial background threshold;
[0070] S202, the Gaussian mixture model is trained based on the Z consecutive reference layer images in the original image, and the initial background model is output;
[0071] S203, the non-reference layer images are downsampled using bilinear interpolation to obtain the same resolution as the reference layer images, the fusion weights are determined based on the stability cardinality of each non-reference layer image, and the fusion is performed to obtain the final background model.
[0072] In this embodiment of the invention, the parameters of the Gaussian mixture model algorithm are determined, including the learning rate, the maximum Gaussian number, and the initial background threshold. The learning rate is set to 0.05 to control the background update speed; the maximum Gaussian number is set to 3 to balance complexity and adaptability; and the initial background threshold is set to 0.7 to indicate the initial probability of a pixel being identified as background. Then, the Gaussian mixture model is trained based on Z consecutive frames (e.g., 100 frames) of the reference layer images in the original image, resulting in the initial background model B0. Next, the non-reference layer images are downsampled using bilinear interpolation to obtain the same resolution as the reference layer images. For example, the downsampled result of the j-th layer image is Ij. Then, the fusion weights are determined based on the stability cardinality of each non-reference layer image. The larger the stability cardinality, the smaller the corresponding fusion weight wj, where wj = 1 / S. Finally, wj and w0 of the non-reference layer images are normalized, where w0 represents the weight of the reference layer image and is a constant value. After normalization, the sum of wj for all non-reference layer images is 1-w0. Finally, the images are fused to obtain the final background model B1 = w0 × B0 + ∑wj × Ij. In this way, the final background model combines the stability of the reference layer background model with the high-frequency details of other layers, making it more robust.
[0073] like Figure 4 As shown in the preferred embodiment of the present invention, the steps of target detection and trajectory initialization based on foreground mask specifically include:
[0074] S401, uses an 8-neighbor or 4-neighbor connectivity algorithm to mark connected regions in the foreground mask;
[0075] S402, based on area and shape, filters connected regions, and extracts target features from the retained connected regions. The target features include bounding boxes, centroid coordinates and pixel area.
[0076] S403, perform trajectory initialization: record target features and timestamps, and update target speed in real time.
[0077] In this embodiment of the invention, after determining the foreground mask, connected regions in the foreground mask are marked using an 8-neighbor or 4-neighbor connectivity algorithm, with each connected region considered as a candidate target. Then, area filtering is performed: connected regions with an area smaller than a minimum threshold (e.g., 50 pixels) are removed (to avoid false detection of small noise); and shape filtering is performed: the compactness of the connected regions (perimeter 2 / area) is calculated, and non-object regions (such as thin shadows) with excessively low compactness (e.g., >0.3) are removed. Next, target features are extracted from the retained connected regions. These features include the bounding box (the smallest bounding rectangle of the target in the image), centroid coordinates (the center point of the bounding box), and pixel area (the total number of pixels in the connected regions). Finally, trajectory initialization is performed: the target features and corresponding timestamps are recorded, and the target speed is updated in real time.
[0078] like Figure 5 As shown, in a preferred embodiment of the present invention, the steps of determining the real-time velocity and mass of the falling object and calculating the risk index of falling objects from heights specifically include:
[0079] S501 calculates the horizontal and vertical displacements of the centroid based on the centroid coordinates of consecutive frames in the trajectory, and obtains the real-time velocity by combining the frame rate.
[0080] S502: Determine the volume of the falling object based on the pixel area, identify the color and shape features of the falling object, determine the material, and obtain the mass of the falling object.
[0081] S503, Calculate the Falling Object Risk Index (FORI): FORI = k1 × v 2 +k2×m.
[0082] In this embodiment of the invention, the horizontal and vertical displacements of the centroid in consecutive frames are calculated. Combined with the frame rate, the real-time velocity of the target can be obtained. Simultaneously, the volume of the falling object is determined based on the pixel area, and the volume can be calculated entirely as a cube. Furthermore, a color and shape library is established, containing colors and shapes corresponding to various materials. By matching the target with the color and shape library, the material of the falling object can be identified, thereby obtaining the target density. If a match fails, a default density is used, thus obtaining the mass of the falling object. Finally, the high-altitude falling object risk index FORI is calculated: FORI = k1 × v 2 +k2×m, where v represents the real-time velocity, m represents the mass, and k1 and k2 are constant coefficients that are preset values.
[0083] like Figure 6 As shown, this embodiment of the invention also provides a high-altitude falling object detection system based on machine vision, the system comprising:
[0084] The baseline image module 100 is used to acquire the original image, perform Gaussian pyramid decomposition on the original image to obtain multiple layers of images, calculate the stability cardinality of each layer of images, and determine the baseline image based on the stability cardinality.
[0085] Background model determination module 200 is used to establish a background model for the reference layer image and to weighted fuse the non-reference layer images after downsampling.
[0086] The difference map determination module 300 is used to extract the current frame image, perform difference calculation between the current frame image and the background model to obtain the difference map, and determine the adaptive threshold.
[0087] The target detection module 400 is used to binarize the difference map based on an adaptive threshold, generate a foreground mask, and perform target detection and trajectory initialization based on the foreground mask;
[0088] The Falling Object Risk Index Module 500 is used to determine the real-time speed and mass of falling objects, calculate the falling object risk index, and generate early warning information based on the falling object risk index.
[0089] In a preferred embodiment of the present invention, the reference layer image module 100 includes:
[0090] The image preprocessing unit is used to preprocess the original image, apply Gaussian filtering to eliminate high-frequency noise, and extract the building facade area from the original image.
[0091] Image decomposition unit is used to determine the exterior facade area as the decomposition region, and generates low-resolution layers through downsampling, with each layer having half the resolution of the previous layer;
[0092] The stability cardinality calculation unit is used to calculate the stability cardinality of the image of each low-resolution layer generated. When the stability cardinality is less than the stability threshold, the latest low-resolution layer image is determined as the reference layer image, and the generation of new low-resolution layers is stopped.
[0093] In a preferred embodiment of the present invention, the background model determination module 200 includes:
[0094] The model parameter determination unit is used to determine the parameters of the Gaussian mixture model algorithm, including the learning rate, the maximum Gaussian number, and the initial background threshold.
[0095] The initial background model unit is used to train the Gaussian mixture model based on the Z consecutive reference layer images in the original image and output the initial background model.
[0096] The final background model unit is used to downsample the non-reference layer images to obtain the same resolution as the reference layer images through bilinear interpolation. The fusion weights are determined based on the stability cardinality of each non-reference layer image, and the fusion is performed to obtain the final background model.
[0097] In a preferred embodiment of the present invention, the target detection module 400 includes:
[0098] The candidate target determination unit is used to mark the connected regions in the foreground mask using an 8-neighborhood or 4-neighborhood connectivity algorithm, with each connected region being regarded as a candidate target;
[0099] The target feature extraction unit is used to filter connected regions based on area and shape, and extract target features from the retained connected regions. The target features include bounding boxes, centroid coordinates, and pixel area.
[0100] The trajectory initialization unit is used to initialize the trajectory: record target features and timestamps, and update the target speed in real time.
[0101] The above description only details the preferred embodiments of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0102] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0103] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0104] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the disclosure in the specification and embodiments. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A method for detecting falling objects from heights based on machine vision, characterized in that, The method includes the following steps: The original image is acquired, and Gaussian pyramid decomposition is performed on the original image to obtain multi-layer images. The stability cardinality of each layer image is calculated, and the baseline layer image is determined based on the stability cardinality. A background model is established for the reference layer image, and the non-reference layer images are weighted and fused after downsampling; Extract the current frame image, perform a difference calculation between the current frame image and the background model to obtain a difference map, and determine the adaptive threshold; Binarization of the difference map is performed based on an adaptive threshold to generate a foreground mask, and target detection and trajectory initialization are performed based on the foreground mask; Determine the real-time speed and mass of the falling object, calculate the high-altitude falling object risk index, and generate early warning information based on the high-altitude falling object risk index.
2. The high-altitude falling object detection method based on machine vision according to claim 1, characterized in that, The steps of performing Gaussian pyramid decomposition on the original image to obtain multi-layer images, calculating the stability cardinality of each layer, and determining the reference layer image based on the stability cardinality specifically include: The original image is preprocessed by applying Gaussian filtering to eliminate high-frequency noise and extract the building facade area from the original image. The exterior facade area is identified as the decomposition region, and low-resolution layers are generated through downsampling, with each layer having half the resolution of the previous layer. For each low-resolution layer generated, the stability cardinality of that layer's image is calculated. When the stability cardinality is less than the stability threshold, the latest low-resolution layer image is determined as the baseline layer image, and the generation of new low-resolution layers is stopped.
3. The high-altitude falling object detection method based on machine vision according to claim 2, characterized in that, When calculating the stability cardinality of each image layer, the variance σ of each pixel i in that image layer at time t is determined. t (i) Stability base N represents the total number of pixels.
4. The high-altitude falling object detection method based on machine vision according to claim 1, characterized in that, The steps of establishing a background model for the reference layer image and then weighted fusing the non-reference layer images after downsampling specifically include: Determine the parameters of the Gaussian mixture model algorithm, including the learning rate, maximum Gaussian number, and initial background threshold; The Gaussian mixture model is trained based on the Z consecutive reference layer images in the original image to output the initial background model; The non-reference layer images are downsampled using bilinear interpolation to obtain the same resolution as the reference layer images. The fusion weights are determined based on the stability cardinality of each non-reference layer image, and the fusion is performed to obtain the final background model.
5. The high-altitude falling object detection method based on machine vision according to claim 1, characterized in that, The steps for target detection and trajectory initialization based on foreground mask specifically include: Connected regions in the foreground mask are marked using an 8-neighbor or 4-neighbor connectivity algorithm, with each connected region considered as a candidate target. Connected regions are filtered based on area and shape. For the retained connected regions, target features are extracted, including bounding boxes, centroid coordinates, and pixel area. Perform trajectory initialization: record target features and timestamps, and update target speed in real time.
6. The high-altitude falling object detection method based on machine vision according to claim 5, characterized in that, The steps of determining the real-time speed and mass of the falling object and calculating the risk index of falling objects from heights specifically include: Based on the centroid coordinates of consecutive frames in the trajectory, the horizontal and vertical displacements of the centroid are calculated, and the real-time velocity is obtained by combining the frame rate. The volume of the falling object is determined based on the pixel area, and the color and shape features of the falling object are identified to determine the material and obtain the mass of the falling object. Calculate the Falling Object Risk Index (FORI): FORI = k1 × v 2 +k2×m, where v represents real-time velocity, m represents mass, and k1 and k2 are constant coefficients.
7. A high-altitude falling object detection system based on machine vision, characterized in that, The system includes: The baseline image module is used to acquire the original image, perform Gaussian pyramid decomposition on the original image to obtain multiple layers of images, calculate the stability cardinality of each layer of images, and determine the baseline image based on the stability cardinality. The background model determination module is used to establish a background model for the reference layer image and to weighted fuse the non-reference layer images after downsampling. The difference map determination module is used to extract the current frame image, perform difference calculation between the current frame image and the background model to obtain the difference map, and determine the adaptive threshold. The target detection module is used to binarize the difference map based on an adaptive threshold, generate a foreground mask, and perform target detection and trajectory initialization based on the foreground mask; The falling object risk index module is used to determine the real-time speed and mass of falling objects, calculate the falling object risk index, and generate early warning information based on the falling object risk index.
8. The high-altitude falling object detection system based on machine vision according to claim 7, characterized in that, The reference layer image module includes: The image preprocessing unit is used to preprocess the original image, apply Gaussian filtering to eliminate high-frequency noise, and extract the building facade area from the original image. Image decomposition unit is used to determine the exterior facade area as the decomposition region, and generates low-resolution layers through downsampling, with each layer having half the resolution of the previous layer; The stability cardinality calculation unit is used to calculate the stability cardinality of the image of each low-resolution layer generated. When the stability cardinality is less than the stability threshold, the latest low-resolution layer image is determined as the reference layer image, and the generation of new low-resolution layers is stopped.
9. The high-altitude falling object detection system based on machine vision according to claim 7, characterized in that, The background model determination module includes: The model parameter determination unit is used to determine the parameters of the Gaussian mixture model algorithm, including the learning rate, the maximum Gaussian number, and the initial background threshold. The initial background model unit is used to train the Gaussian mixture model based on the Z consecutive reference layer images in the original image and output the initial background model. The final background model unit is used to downsample the non-reference layer images to obtain the same resolution as the reference layer images through bilinear interpolation. The fusion weights are determined based on the stability cardinality of each non-reference layer image, and the fusion is performed to obtain the final background model.
10. The high-altitude falling object detection system based on machine vision according to claim 7, characterized in that, The target detection module includes: The candidate target determination unit is used to mark the connected regions in the foreground mask using an 8-neighborhood or 4-neighborhood connectivity algorithm, with each connected region being regarded as a candidate target; The target feature extraction unit is used to filter connected regions based on area and shape, and extract target features from the retained connected regions. The target features include bounding boxes, centroid coordinates, and pixel area. The trajectory initialization unit is used to initialize the trajectory: record target features and timestamps, and update the target speed in real time.