Filtering method for processing optical flow abnormal data based on MAD

By using a MAD-based method, a two-dimensional threshold is generated by calculating the median absolute deviation of the optical flow vector. This solves the failure and adaptability problems of traditional optical flow filtering methods in real-world scenarios, achieving higher robustness and reliability.

CN121505316APending Publication Date: 2026-02-10JIANGXI LIANCHUANG (WANNIAN) ELECTRONICS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510923080.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Traditional optical flow outlier filtering methods fail in real-world scenarios, lack adaptability, are sensitive to outliers leading to threshold distortion, and do not simultaneously consider the dual-dimensional characteristics of the optical flow vector's length and angle.

Method used

A MAD-based approach is adopted to generate a two-dimensional threshold by calculating the median absolute deviation of the optical flow vector length and angle. This threshold is then combined with the Z-value to identify outliers and perform filtering.

Benefits of technology

It improves robustness in non-Gaussian noise scenarios, effectively removes outliers, preserves detailed motion, and enhances the scientific validity and reliability of the threshold by controlling the data retention rate through K and Z values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121505316A_ABST
    Figure CN121505316A_ABST
Patent Text Reader

Abstract

The invention discloses a filtering method for processing optical flow abnormal data based on MAD, and relates to the field of computer vision and motion analysis. According to the method, the optical flow vector length and the optical flow vector angle are calculated, the median absolute deviation is calculated, then the average number of the median absolute deviation is calculated, the length threshold value of the optical flow and the angle threshold value of the optical flow are calculated by introducing a Z value, and data exceeding the length threshold value and the angle threshold value at the same time are eliminated. According to the filtering method for processing the optical flow abnormal data based on the MAD, variance calculation is replaced by the MAD, dependence on data distribution is eliminated, the robustness of a non-Gaussian noise scene is improved, the capability of resisting abnormal value interference is high, abnormal values can be effectively eliminated, meanwhile, comprehensive analysis is carried out from the length vector and the angle vector of the optical flow, and the filtering method has a two-dimensional characteristic and is suitable for popularization and application. And meanwhile, detail motions such as slow rotation and micro torsion can be kept, and data processing is finer and smoother.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision and motion analysis technology, specifically a filtering method for optical flow anomaly data based on MAD processing. Background Technology

[0002] Optical flow anomaly data filtering is a real-time filtering method involving abnormal data in optical flow calculation. It is mainly applied in scenarios requiring high-precision motion estimation, such as autonomous driving, video analysis, and robot navigation. In the vision module, during image processing, it uses corresponding optical flow processing algorithms to remove abnormal data in the image, thereby reducing the final data deviation and reducing the difficulty of data processing.

[0003] However, traditional optical flow outlier filtering methods have the following drawbacks;

[0004] 1. Relying on the Gaussian distribution assumption, it may fail in real-world scenarios, such as sudden changes in lighting or motion blur.

[0005] 2. The fixed threshold method lacks adaptability to different scenarios;

[0006] 3. Variance calculation is sensitive to outliers, leading to threshold distortion;

[0007] 4. The length and angle characteristics of the optical flow vector were not considered simultaneously;

[0008] To address the aforementioned issues, a filtering method for optical flow anomaly data based on MAD processing is provided. Summary of the Invention

[0009] To address the shortcomings of existing technologies, this invention provides a filtering method for optical flow anomaly data based on MAD processing. This method solves the problems of traditional optical flow anomaly filtering methods, such as failure in real-world scenarios, lack of adaptability to different scenarios, sensitivity to anomalies leading to threshold distortion, and failure to simultaneously consider the length and angle characteristics of the optical flow vector.

[0010] To achieve the above objectives, the present invention provides the following technical solution: a filtering method for optical flow anomaly data based on MAD processing, comprising the following steps:

[0011] S1. Input image data and convert it into a grayscale image;

[0012] S2. Design an optical flow algorithm to filter out optical flow anomalies. The steps are as follows:

[0013] 1. Obtain the original optical flow vector field (x,y) output by the optical flow algorithm;

[0014] II. Calculate the optical flow vector length and optical flow vector angle And by calculating the median absolute deviation, the MAD of length and angle is scaled to the standard deviation scale. and ;

[0015] Fourth, a threshold is generated by introducing the Z-value to measure the degree to which data points deviate from the population mean, and the length threshold of the optical flow is obtained. Angular threshold of optical flow ;

[0016] V. Outlier filtering, through... and Perform a threshold check; if...

[0017] and If the value is abnormal, it is considered an outlier and is deleted directly, while normal values ​​are retained.

[0018] S3. Process the normal values ​​by dividing the offset by the focal length of the pixel and multiplying the offset by a scaling factor.

[0019] S4. Perform low-pass filtering on the data;

[0020] S5, Packaging .

[0021] Preferably, the optical flow vector length is calculated as follows; ;

[0022] The optical flow vector angle is calculated as follows: ;

[0023] And based on this, the median length of the optical flow vector was calculated. Median of vector angle .

[0024] Preferred, based on the statistics and It can be calculated;

[0025] The absolute deviation of optical flow length is ;

[0026] The absolute deviation of the optical flow angle is .

[0027] Preferred, according to and Perform the following calculations;

[0028] Average absolute deviation of optical flow length ;

[0029] Average value of optical flow angle deviation .

[0030] Preferred, based on and To calculate the and ,

[0031] Sure ;

[0032] Where K represents the proportionality constant of the Gaussian distribution MAD to the standard deviation, and K = 0.4826.

[0033] Preferred, according to and The length threshold and angle threshold of optical flow are calculated;

[0034] , ;

[0035] , ;

[0036] Where Z represents the standard deviation factor of a data point from the mean.

[0037] Preferably, the Z value is taken as follows;

[0038] In a typical dynamic scenario, Z=1.8, the data retention rate is 93%.

[0039] In low-noise scenarios, Z=2.0, resulting in a data retention rate of 95%.

[0040] In high-noise and safety-critical scenarios, Z=3.0, at which point the data retention rate is 99.7%.

[0041] Preferably, the logic of the optical flow algorithm is as follows:

[0042] Step 1: Obtain the current image data grayscale frame and convert the input image into a single-channel grayscale image;

[0043] Step 2: Pyramid Construction;

[0044] Step 3: Corner detection, and utilize... The method performs feature point matching;

[0045] Step 4: Feature point judgment, and judgment of data where the feature point is greater than the minimum feature point;

[0046] If so, calculate its offset, then perform outlier filtering and quality assessment, and then take the average to obtain the final offsets of X and Y;

[0047] If not, return and re-perform corner detection.

[0048] Preferably, the pyramid is a Gaussian pyramid with 4 layers, and each layer is processed by Gaussian smoothing and downsampling.

[0049] This invention discloses a filtering method for optical flow anomaly data based on MAD processing, which has the following beneficial effects:

[0050] 1. The filtering method for optical flow anomaly data based on MAD uses MAD to replace variance calculation, eliminates the dependence on data distribution, improves robustness in non-Gaussian noise scenarios, and has strong anti-outlier interference ability, effectively removing outliers.

[0051] 2. This filtering method for optical flow anomaly data based on MAD performs comprehensive analysis from the length vector and angle vector of the optical flow. It has dual-dimensional characteristics, higher reliability, and can preserve detailed motions such as slow rotation and slight torsion, making the data processing more delicate.

[0052] 3. This filtering method for optical flow anomaly data based on MAD introduces K and Z values. By using the statistical theoretical constant K=1.4826, it ensures that MAD and standard deviation are equivalent under normal distribution, thus improving the scientific validity of the threshold. At the same time, it uses Z value for quantitative control: by selecting Z value, it can accurately control the data retention rate. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a flowchart of the method for filtering optical flow anomaly data according to the present invention;

[0055] Figure 2 This is a flowchart of the actual operation steps of the method for filtering optical flow anomaly data of the present invention;

[0056] Figure 3 This is a flowchart illustrating the filtering method for optical flow anomaly data according to the present invention. Detailed Implementation

[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] This application provides a filtering method for optical flow anomaly data based on MAD processing, which solves the problems of traditional optical flow anomaly filtering methods, such as failure in real-world scenarios, lack of adaptability to different scenarios, sensitivity to anomalies leading to threshold distortion, and failure to simultaneously consider the length and angle characteristics of the optical flow vector.

[0059] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0060] This invention discloses a filtering method for optical flow anomaly data based on MAD processing.

[0061] According to the appendix Figure 1-3 As shown, it includes the following steps:

[0062] S1. Input image data and convert it into a grayscale image;

[0063] S2. Design an optical flow algorithm to filter out optical flow anomalies.

[0064] S3. Process the normal values ​​by dividing the offset by the focal length of the pixel and multiplying the offset by a scaling factor.

[0065] S4. Perform low-pass filtering on the data;

[0066] S5, Packaging .

[0067] During the process of filtering optical flow anomalies using optical flow algorithms;

[0068] First, obtain the original optical flow vector field (x,y) output by the optical flow algorithm;

[0069] The optical flow vector length is calculated as follows: ;

[0070] The optical flow vector angle is calculated as follows: ;

[0071] And based on this, the median length of the optical flow vector was calculated. Median of vector angle .

[0072] Based on the statistics and The absolute deviation of the optical flow length can be calculated as follows: The absolute deviation of the optical flow angle is .

[0073] Then according to and The average absolute deviation of optical flow length was calculated. and the average value of optical flow angle deviation .

[0074] based on and To calculate and Therefore, it is possible to effectively determine ; ;

[0075] Where K represents the proportionality constant of the Gaussian distribution MAD to the standard deviation, and K = 0.4826.

[0076] Then according to and The length threshold and angle threshold of optical flow can be calculated to obtain the following results;

[0077] , ;

[0078] , ;

[0079] Finally, by introducing the Z-value, the degree to which data points deviate from the population mean is measured, and the length threshold of optical flow is obtained. Angular threshold of optical flow ; and through the and Perform a threshold check; if...

[0080] and If the value is abnormal, it is considered an outlier and is deleted directly, while normal values ​​are retained.

[0081] Where Z represents the standard deviation multiple of a data point from the mean. In a normal dynamic scenario, Z=1.8, the data retention rate is 93%; in a low-noise scenario, Z=2.0, the data retention rate is 95%; and in a high-noise and safety-critical scenario, Z=3.0, the data retention rate is 99.7%.

[0082] Working principle; the entire process of filtering abnormal data can be described as follows:

[0083] Data preprocessing module: Separates the length and angle of the optical flow vector;

[0084] Median calculation module: median of length and angle;

[0085] MAD calculation module: Calculates the absolute deviation based on the median result, and then applies the median algorithm to obtain Len_MAD and Ang_MAD;

[0086] Statistical transformation module: Execute σ=K×MAD (K=1.4826);

[0087] Threshold generation module: Generates a two-dimensional threshold based on the user-defined Z value;

[0088] Exception Decision Module: Parallel Inspection and Is it within the threshold range?

[0089] The advantages of using this method for data processing are:

[0090] 1. It performs comprehensive analysis based on the length and angle vectors of optical flow, which has dual-dimensional characteristics, higher reliability, and can preserve detailed motions such as slow rotation and slight torsion, resulting in more delicate data processing.

[0091] 2. MAD is used to replace variance calculation, eliminating the dependence on data distribution, improving robustness in non-Gaussian noise scenarios, and having strong resistance to outlier interference, effectively removing outliers.

[0092] 3. By introducing K and Z values, and using the statistical theoretical constant K: 1.4826, we ensure that MAD and standard deviation are equivalent under a normal distribution, thereby improving the scientific validity of the threshold.

[0093] Z-value quantization control: Precisely control the data retention rate by selecting the Z-value.

[0094] The logic of the optical flow algorithm is as follows:

[0095] By acquiring the current image data grayscale frame, the input image is converted into a single-channel grayscale image; then a pyramid is constructed; corner detection is performed, and then... The method performs feature point matching; finally, feature point judgment is performed, and the feature point is judged to be greater than the minimum feature point data; if it is, its offset is calculated, then outlier filtering is performed, and quality assessment is performed at the same time. Then the average value is taken to obtain the final X and Y offsets; if not, it returns and corner detection is performed again.

[0096] The pyramid is a Gaussian pyramid with 3-5 layers, each layer using Gaussian smoothing and downsampling. Gaussian smoothing, which utilizes a two-dimensional Gaussian function, is the core step in constructing the image pyramid. Reasonable selection of parameters and optimization can improve processing efficiency while maintaining image quality, laying a solid foundation for subsequent tasks such as optical flow calculation and feature detection.

[0097] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.

Claims

1. A filtering method for optical flow anomaly data based on MAD processing, characterized in that, Includes the following steps: S1. Input image data and convert it into a grayscale image; S2. Design an optical flow algorithm to filter out optical flow anomalies. The steps are as follows:

1. Obtain the original optical flow vector field (x,y) output by the optical flow algorithm; II. Calculate the optical flow vector length and optical flow vector angle And by calculating the median absolute deviation, the MAD of length and angle is scaled to the standard deviation scale. and ; Fourth, a threshold is generated by introducing the Z-value to measure the degree to which data points deviate from the population mean, and the length threshold of the optical flow is obtained. Angular threshold of optical flow ; V. Outlier filtering, through... and Perform a threshold check; if... and If the value is abnormal, it is considered an outlier and is deleted directly, while normal values ​​are retained. S3. Process the normal values ​​by dividing the offset by the focal length of the pixel and multiplying the offset by a scaling factor. S4. Perform low-pass filtering on the data; S5, Packaging .

2. The filtering method for optical flow anomaly data based on MAD processing according to claim 1, characterized in that: The optical flow vector length is calculated as follows: ; The optical flow vector angle is calculated as follows: ; And based on this, the median length of the optical flow vector was calculated. Median of vector angle .

3. The filtering method for optical flow anomaly data based on MAD processing according to claim 2, characterized in that: Based on the statistics and It can be calculated; The absolute deviation of optical flow length is ; The absolute deviation of the optical flow angle is .

4. The filtering method for optical flow anomaly data based on MAD processing according to claim 3, characterized in that: according to and Perform the following calculations; Average absolute deviation of optical flow length ; Average value of optical flow angle deviation .

5. The filtering method for optical flow anomaly data based on MAD processing according to claim 4, characterized in that: based on and To calculate the and , Sure ; Where K represents the proportionality constant of the Gaussian distribution MAD to the standard deviation, and K = 0.4826.

6. The filtering method for optical flow anomaly data based on MAD processing according to claim 5, characterized in that: according to and The length threshold and angle threshold of optical flow are calculated; 、 ; 、 ; Where Z represents the standard deviation factor of a data point from the mean.

7. The filtering method for optical flow anomaly data based on MAD processing according to claim 6, characterized in that: The Z value is taken as follows; In a typical dynamic scenario, Z=1.8, the data retention rate is 93%. In low-noise scenarios, Z=2.0, resulting in a data retention rate of 95%. In high-noise and safety-critical scenarios, Z=3.0, at which point the data retention rate is 99.7%.

8. The filtering method for optical flow anomaly data based on MAD processing according to claim 1, characterized in that: The logic of the optical flow algorithm is as follows: Step 1: Obtain the current image data grayscale frame and convert the input image into a single-channel grayscale image; Step 2: Pyramid Construction; Step 3: Corner detection, and utilize... The method performs feature point matching; Step 4: Feature point judgment, and judgment of data where the feature point is greater than the minimum feature point; If so, calculate its offset, then perform outlier filtering and quality assessment, and then take the average to obtain the final offsets of X and Y; If not, return and re-perform corner detection.

9. A filtering method for optical flow anomaly data based on MAD processing according to claim 8, characterized in that: The pyramid is a Gaussian pyramid with four layers, each layer of which is processed using Gaussian smoothing and downsampling.

Citation Information

Patent Citations

  • Dynamic obstacle detection method and device in agricultural machine motion state

    CN111754550A

  • Abnormal behavior detection method based on optical flow algorithm

    CN112364680A

  • Large-displacement optical flow field estimation method

    CN112419373A

  • Day and night atmospheric turbulence parameter estimation method based on optical flow calculation

    CN115061220A