Method and system for measuring motion of oscillating oil cylinder based on computer vision

Through computer vision technology, adaptively mixed Gaussian background model and morphological processing, combined with Harris corner point detection, the precise measurement of the motion parameters of the swing cylinder is achieved, solving the complexity and reliability problems of traditional methods, and providing stable and accurate Exercise assessment.

CN119273718AActive Publication Date: 2025-01-07CHANGSHA CHANGHENG INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411794639.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-01-07
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

In the monitoring of the motion performance of swing cylinders, the existing technology has problems such as complex sensor installation, high cost, poor reliability, single data and easy interference, and it is difficult to fully reflect the motion characteristics of the cylinders.

Method used

Using a computer vision-based method, the sliding average filtering method is calculated by adaptively mixing Gaussian background model, adaptive threshold segmentation and morphological processing, combined with Harris corner detection and normalized cross-correlation matching algorithm, and the sliding average filtering method is realized to realize the motion parameters of the swing cylinder. Accurate measurement and evaluation.

Benefits of technology

It improves the accuracy and reliability of motion parameter measurement, provides quantitative evaluation of motion stability and range, enhances equipment operation stability and fault identification capabilities, and reduces system complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273718A_ABST
    Figure CN119273718A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for measuring motion of a swinging oil cylinder based on computer vision. The method comprises the following steps: S1, acquiring a working video sequence of the swinging oil cylinder; processing each frame of image in the video sequence based on an adaptive Gaussian mixture background model to obtain a foreground image; s2, optimizing the foreground image based on adaptive threshold segmentation and morphological processing, and outputting a binary contour image sequence; s3, contour feature extraction is conducted on the binarized contour image sequence, overall motion parameters of the swing oil cylinder are calculated, and the overall motion parameters of the swing oil cylinder comprise the swing angle, the angular speed and the angular acceleration of the swing oil cylinder; s4, smoothing the overall motion parameters of the oscillating oil cylinder by adopting a moving average filtering method to obtain the smoothed overall motion parameters of the oscillating oil cylinder; and S5, calculating a stability index and a motion range index of the motion of the swing oil cylinder based on the smoothed overall motion parameters of the swing oil cylinder. Accurate measurement and evaluation of motion parameters of the swing oil cylinder can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of swing cylinder motion measurement, and in particular to a swing cylinder motion measurement method and system based on computer vision. Background Art

[0002] With the rapid development of the construction machinery industry, the application of swing cylinders in excavators, loaders, cranes and other equipment is becoming more and more extensive, and their performance requirements are also constantly improving. As an important actuator of construction machinery, the monitoring and evaluation of the motion performance of the swing cylinder is of great significance to ensure the safe operation of the equipment.

[0003] The invention patent with application number CN202310547804.2 discloses a method for monitoring the motion performance of a swing cylinder, which uses a swing cylinder with an angle sensor, which detects the rotation angle by setting an output nut in the cylinder barrel and installing an angle sensor at the end of the fixed screw. Although this method can achieve accurate angle measurement, the swing cylinder with an angle sensor still has the following problems: 1. Various sensors need to be installed on the cylinder, which increases the complexity and cost of the system; 2. The installation position of the sensor is often exposed to harsh working environments, and reliability is difficult to guarantee; 3. The monitoring data obtained is often a single parameter, which is difficult to fully reflect the motion characteristics of the cylinder; 4. It relies on contact measurement, which is easy to interfere with the equipment itself. Summary of the invention

[0004] In view of this, the present invention provides a swing cylinder motion measurement method and system based on computer vision, aiming to achieve accurate measurement and evaluation of the swing cylinder motion smoothness and motion range through computer vision technologies such as adaptive mixed Gaussian background model, adaptive threshold segmentation and morphological processing.

[0005] To achieve the above object, the present invention provides a computer vision-based swing cylinder motion measurement method, comprising the following steps: S1: Get the video sequence of the swing cylinder working , ,in For the Frame image, is the frame number, is the total number of frames; each frame image in the video sequence is processed based on the adaptive mixed Gaussian background model to obtain the corresponding foreground image; S2: Optimize the foreground image based on adaptive threshold segmentation and morphological processing, and output a binary contour image sequence; S3: extracting contour features from the binary contour image sequence, and calculating the overall motion parameters of the swing cylinder, wherein the overall motion parameters of the swing cylinder include the swing angle, angular velocity and angular acceleration of the swing cylinder; S4: Smoothing the overall motion parameters of the swing cylinder using a sliding average filtering method to obtain smoothed overall motion parameters of the swing cylinder; S5: Calculate the stability index and motion range index of the swing cylinder based on the smoothed overall motion parameters of the swing cylinder, including: S51: Calculate the motion stability index of the swing cylinder: ; ; in, and They are the angular velocity fluctuation and angular acceleration fluctuation of the swing cylinder respectively; and Respectively The angular velocity and angular acceleration of the swing cylinder after smoothing in the frame image; and are the average values ​​of the angular velocity and angular acceleration of the swing cylinder after smoothing respectively; S52: Calculate the range of motion of the swing cylinder: ; ; in, and They are the swing angle range and angular velocity range of the swing cylinder respectively; and They are the swing angle sequence and angular velocity sequence of the swing cylinder after smoothing, , ,in For the The swing angle of the swing cylinder after smoothing in the frame image.

[0006] As a further improvement method of the present invention: Optionally, in step S1, processing each frame image in the video sequence based on the adaptive mixed Gaussian background model to obtain a corresponding foreground image includes the following steps: S11: Initialize the parameters of the mixed Gaussian model: For Frame Image Each pixel in , and are the horizontal and vertical coordinates respectively, initialize Parameters of a Gaussian distribution: ; ; ; in, is the pixel in the first frame image Place The weights of the Gaussian distribution; is the pixel in the first frame image Place The mean vector of a Gaussian distribution is a 3D vector; is the pixel in the first frame image Place The covariance matrix of a Gaussian distribution is a 3×3 matrix; is the pixel in the first frame image The RGB value vector at is a 3D vector; is the number of Gaussian distribution; For the Gaussian distributed random perturbations; is the initial standard deviation; is a 3×3 identity matrix; S12: For each frame in the video sequence ,calculate Medium pixel The degree of match with each Gaussian distribution: ; ; ; in, For the Pixels in the frame image The RGB value at Mahalanobis distance of a Gaussian distribution; For the Pixels in the frame image Place The mean vector of the Gaussian distribution; For the Pixels in the frame image Place The covariance matrix of the Gaussian distribution; For the Pixels in the frame image RGB value vector at ; Transpose the matrix; For the Pixels in the frame image Does it match the The indicator function of a Gaussian distribution; is the matching threshold; For the Pixels in the frame image Place The standard deviation of a Gaussian distribution; is the trace of the matrix; S13: Update each Gaussian distribution parameter: ; ; ; in, is the learning rate; and Respectively Frame and Pixels in the frame image Place The weights of the Gaussian distribution; For the Pixels in the frame image Place The mean vector of the Gaussian distribution; For the Pixels in the frame image Place The covariance matrix of the Gaussian distribution; For the Pixels in the frame image Place The parameter update coefficient of a Gaussian distribution is: ; S14: Sort the Gaussian distribution and extract the foreground target. First, calculate the Pixels in the frame image Place The ratio of the weight and standard deviation of a Gaussian distribution ;according to Sort each pixel in descending order The Gaussian distribution at the position where the cumulative weight exceeds the background threshold is selected distribution as the background model, specifically: ; in, Pixel The number of Gaussian distributions that are judged as background models; is the background threshold; ; If the pixel Before mismatch Gaussian distribution, it is determined as the foreground point, and the first Frame foreground binary image , the mismatching criterion is for the pixel point If the RGB value of If the Mahalanobis distance of each Gaussian distribution is greater than 2.5 times the standard deviation, the pixel is considered not to match the Gaussian distribution.

[0007] Optionally, in step S2, optimizing the foreground image based on adaptive threshold segmentation and morphological processing to output a binary contour image sequence includes: S21: Foreground binary image Each pixel marked as foreground in , calculate the adaptive threshold based on local statistical features: S211: Calculate the adaptive threshold based on local statistical features: ; in, For the Pixels in the frame image Adaptive threshold at ; For the Pixels in the frame Centered The average pixel value in a local neighborhood; For the Pixels in the frame Centered Standard deviation within a local neighborhood; S212: Perform threshold segmentation: ; in, For the Pixels in the frame image Binarization result after adaptive threshold segmentation; For the Pixels in the frame image The pixel value of the foreground binary image; S22: Apply morphological processing to optimize the target contour. Binarization result after adaptive threshold segmentation of frame image use Rectangular Structuring Element First dilate and then erode to obtain Binarized contour image of the frame image ; Binarized contour image sequence .

[0008] Optionally, in the step S3, contour features are extracted from the binary contour image sequence, and overall motion parameters of the swing cylinder are calculated, wherein the overall motion parameters of the swing cylinder include the swing angle, angular velocity and angular acceleration of the swing cylinder, including: S31: Extract contour feature point sequence: Binarize the contour image for each frame , Harris corner detection algorithm is used to extract feature points, and normalized cross-correlation matching algorithm is combined to achieve cross-frame tracking of feature points. Feature point set of frame image ; S32: Calculate the overall motion parameters of the swing cylinder: ; ; ; in, For the The swing angle of the swing cylinder in the frame image; For the Angular velocity of the swing cylinder in the frame image; For the Angular acceleration of the swing cylinder in the frame image; For the The coordinates of the center point of the swing cylinder in the frame image are calculated by Feature point set of frame image The centroid of all feature points in is obtained; For the Coordinates of the reference point of the swing cylinder in the frame image; is the time interval between adjacent frames.

[0009] Optionally, in step S4, a sliding average filtering method is used to smooth the overall motion parameters of the swing cylinder to obtain the smoothed overall motion parameters of the swing cylinder, including: The sliding average filtering method is used to smooth the overall motion parameters of the swing cylinder: ; ; ; in, , and Respectively The swing angle, angular velocity and angular acceleration of the swing cylinder after smoothing in the frame image; is the half length of the sliding window, satisfying ; ,satisfy .

[0010] The present invention also discloses a swing cylinder motion measurement system based on computer vision, comprising: Foreground extraction module: obtain the swing cylinder working video sequence, and process each frame image in the video sequence based on the adaptive mixed Gaussian background model to obtain the corresponding foreground image; Contour extraction module: optimizes the foreground image based on adaptive threshold segmentation and morphological processing, and outputs a binary contour image sequence; Motion parameter calculation module: extracts contour features from binary contour image sequence and calculates the overall motion parameters of the swing cylinder; Smoothing module: Use the sliding average filtering method to smooth the overall motion parameters of the swing cylinder to obtain the smoothed overall motion parameters of the swing cylinder; Performance calculation module: Calculate the motion stability index and motion range index of the swing cylinder based on the smoothed overall motion parameters of the swing cylinder. Beneficial Effects

[0011] The present invention uses an adaptive mixed Gaussian background model to process video sequences, which can effectively cope with background changes and lighting interference under complex working conditions. By dynamically updating Gaussian distribution parameters, the background model is adaptively established to improve the accuracy and robustness of target extraction. At the same time, combined with adaptive threshold segmentation and morphological processing, the target contour extraction effect is further optimized, laying a solid foundation for subsequent motion parameter calculation.

[0012] The present invention innovatively combines Harris corner point detection with the normalized cross-correlation matching algorithm to achieve accurate feature point extraction and cross-frame tracking. The overall motion parameters of the swing cylinder are calculated based on the feature point sequence, and the sliding average filter method is used for smoothing, which effectively suppresses the influence of measurement noise. This method significantly improves the accuracy and reliability of motion parameter measurement, making the measurement results more stable and accurate.

[0013] The present invention proposes a swing cylinder motion evaluation index system, including the motion smoothness of the swing cylinder and the motion range of the swing cylinder. The two smoothness indicators, angular velocity fluctuation and angular acceleration fluctuation, can quantitatively reflect the fluctuations in the motion of the swing cylinder, which is of great significance for evaluating the operating stability of the equipment and identifying potential faults. Large fluctuations usually mean that the equipment is unstable, and there may be mechanical failures or control system abnormalities. At the same time, by calculating the two motion range indicators, the swing angle range and the angular velocity range, the actual working range of the swing cylinder can be accurately grasped, which helps to determine whether the equipment is operating within the design range and whether there is overtravel or undertravel. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 The figure is a flow chart of a method for measuring the motion of a swing cylinder based on computer vision according to an embodiment of the present invention. DETAILED DESCRIPTION

[0015] The present invention is further described below in conjunction with the accompanying drawings, but the present invention is not limited in any way. Any changes or substitutions made based on the teachings of the present invention belong to the protection scope of the present invention.

[0016] Embodiment 1: A method for measuring the motion of a swing cylinder based on computer vision, such as Figure 1 As shown, the following steps are included: S1: Get the video sequence of the swing cylinder working , ,in For the Frame image, is the frame number, is the total number of frames; each frame image in the video sequence is processed based on the adaptive mixed Gaussian background model to obtain the corresponding foreground image.

[0017] The process of processing each frame of the video sequence based on the adaptive mixed Gaussian background model to obtain the corresponding foreground image includes the following steps: S11: Initialize the parameters of the mixed Gaussian model: For Frame Image Each pixel in , and are the horizontal and vertical coordinates respectively, initialize The parameters of the Gaussian distribution are : ; ; ; in, is the pixel in the first frame image Place The weights of the Gaussian distribution; is the pixel in the first frame image Place The mean vector of a Gaussian distribution is a 3D vector; is the pixel in the first frame image Place The covariance matrix of a Gaussian distribution is a 3×3 matrix; is the pixel in the first frame image The RGB value vector at is a 3D vector; is the number of Gaussian distribution; For the Gaussian distributed random perturbations; is the initial standard deviation; is a 3×3 identity matrix; S12: For each frame in the video sequence ,calculate Medium pixel The degree of match with each Gaussian distribution: ; ; ; in, For the Pixels in the frame image The RGB value at Mahalanobis distance of a Gaussian distribution; For the Pixels in the frame image Place The mean vector of the Gaussian distribution; For the Pixels in the frame image Place The covariance matrix of the Gaussian distribution; For the Pixels in the frame image RGB value vector at ; Transpose the matrix; For the Pixels in the frame image Does it match the The indicator function of a Gaussian distribution; is the matching threshold, which is 2.5 in this embodiment; For the Pixels in the frame image Place The standard deviation of a Gaussian distribution; is the trace of the matrix; S13: Update each Gaussian distribution parameter: ; ; ; in, is the learning rate; and Respectively Frame and Pixels in the frame image Place The weights of the Gaussian distribution; For the Pixels in the frame image Place The mean vector of the Gaussian distribution; For the Pixels in the frame image Place The covariance matrix of the Gaussian distribution; For the Pixels in the frame image Place The parameter update coefficient of a Gaussian distribution is: ; S14: Sort Gaussian distribution and extract foreground objects: ; in, For the Pixels in the frame image Place The ratio of the weight to the standard deviation of a Gaussian distribution; For the Pixels in the frame image Place The standard deviation of a Gaussian distribution; Sort each pixel in descending order The Gaussian distribution at the position where the cumulative weight exceeds the background threshold is selected distribution as the background model, specifically: ; in, Pixel The number of Gaussian distributions that are judged as background models; is the background threshold; in this embodiment, it is 0.7; ; If the pixel Before mismatch Gaussian distribution, it is determined as the foreground point, and the first Frame foreground binary image , the mismatching criterion is for the pixel point If the RGB value of If the Mahalanobis distance of each Gaussian distribution is greater than 2.5 times the standard deviation, the pixel is considered not to match the Gaussian distribution.

[0018] This step uses an adaptive mixed Gaussian background model to extract moving targets. Its technical advantage is that it constructs multiple Gaussian distributions to describe the dynamic change characteristics of each pixel, can adaptively learn and update the background model, and has strong adaptability to environmental changes. This method realizes the dynamic adjustment of model parameters by introducing parameter update coefficients, and combines Mahalanobis distance as a matching metric to effectively improve the algorithm's ability to resist noise. At the same time, a mechanism is used to sort Gaussian distributions by weight and standard deviation ratio, and several distributions whose cumulative weight exceeds the background threshold are reasonably used as background models, which not only ensures the reliability of the model, but also improves the accuracy of foreground target extraction.

[0019] S2: Optimize the foreground image based on adaptive threshold segmentation and morphological processing, and output a binary contour image sequence: S21: Foreground binary image Each pixel marked as foreground in , calculate the adaptive threshold based on local statistical features: S211: Calculate the adaptive threshold based on local statistical features: ; in, For the Pixels in the frame image Adaptive threshold at ; For the Pixels in the frame Centered The average pixel value in a local neighborhood; For the Pixels in the frame Centered Standard deviation within a local neighborhood; S212: Perform threshold segmentation: ; in, For the Pixels in the frame image Binarization result after adaptive threshold segmentation; For the Pixels in the frame image The pixel value of the foreground binary image; S22: Apply morphological processing to optimize the target contour: ; in, For the Binarized contour image of the frame image; For the Binarization result image after adaptive threshold segmentation of the frame image; and They are dilation operation and erosion operation respectively; for Rectangular structural elements, in this embodiment, all values ​​are 1 Matrix; Binarized contour image sequence .

[0020] This step optimizes the target contour by introducing an adaptive threshold segmentation method based on local statistical features and combining it with morphological processing. Its technical advantages are mainly reflected in two aspects: adaptability and robustness. First, this method does not use a fixed threshold, but dynamically calculates the threshold based on the average value and standard deviation of the local neighborhood of each pixel point, so that the selection of the threshold can be adaptively adjusted as the local features of the image change. This adaptive mechanism can effectively deal with complex situations such as uneven illumination and local contrast changes in the image. Secondly, by combining adaptive threshold segmentation with foreground binary images, the impact of background interference can be effectively reduced and the accuracy of target extraction can be improved.

[0021] S3: Extracting contour features from the binary contour image sequence and calculating the overall motion parameters of the swing cylinder, which include the swing angle, angular velocity and angular acceleration of the swing cylinder: S31: Extract contour feature point sequence: Binarize the contour image for each frame , Harris corner detection algorithm is used to extract feature points, and normalized cross-correlation matching algorithm is combined to achieve cross-frame tracking of feature points. Feature point set of frame image ; S32: Calculate the overall motion parameters of the swing cylinder: ; ; ; in, For the The swing angle of the swing cylinder in the frame image; For the Angular velocity of the swing cylinder in the frame image; For the Angular acceleration of the swing cylinder in the frame image; For the The coordinates of the center point of the swing cylinder in the frame image are calculated by Feature point set of frame image The centroid of all feature points in is obtained; For the The coordinates of the reference point of the swing cylinder in the frame image, which are the coordinates of the center of the image in this embodiment; is the time interval between adjacent frames.

[0022] First, the Harris corner detection algorithm can accurately identify the significant feature points in the image. These feature points have rotation invariance and strong local features, and are particularly suitable for tracking the key positions of moving targets. The cross-frame tracking of feature points achieved through the normalized cross-correlation matching algorithm can effectively solve problems such as changes in perspective and illumination caused by target motion, and ensure the continuity and stability of feature point tracking. Secondly, based on the set of tracked feature points, the center position of the swing cylinder is determined by calculating the centroid of the feature points. This method can effectively reduce the influence of the positioning error of a single feature point and improve the accuracy of center point positioning. On this basis, by calculating the relative position relationship between the center point and the reference point, the swing angle of the swing cylinder can be accurately obtained, and important motion parameters such as angular velocity and angular acceleration can be further obtained.

[0023] S4: Use the sliding average filtering method to smooth the overall motion parameters of the swing cylinder to obtain the smoothed overall motion parameters of the swing cylinder: ; ; ; in, , and Respectively The swing angle, angular velocity and angular acceleration of the swing cylinder after smoothing in the frame image; is the half length of the sliding window, satisfying ; ,satisfy .

[0024] This step uses the sliding average filtering method to smooth the overall motion parameters of the swing cylinder. Its technical advantages are mainly reflected in effectively suppressing measurement noise and improving data reliability. By introducing a sliding window mechanism, the weighted average of the data before and after the current moment, a total of twice the half-length of the window plus one moment, can effectively smooth the random fluctuations and interference introduced by the image acquisition, feature extraction and parameter calculation process.

[0025] S5: Calculate the stability index and motion range index of the swing cylinder based on the smoothed overall motion parameters of the swing cylinder: S51: Calculate the motion stability index of the swing cylinder: ; ; in, and They are the angular velocity fluctuation and angular acceleration fluctuation of the swing cylinder respectively; and Respectively The average value of the angular velocity and the average value of the angular acceleration of the swing cylinder after smoothing in the frame image; S52: Calculate the range of motion of the swing cylinder: ; ; in, and They are the swing angle range and angular velocity range of the swing cylinder respectively; and They are the swing angle sequence and angular velocity sequence of the swing cylinder after smoothing, , ,in For the The swing angle of the swing cylinder after smoothing in the frame image.

[0026] Embodiment 2: The present invention also discloses a swing cylinder motion measurement system based on computer vision, comprising the following five modules: Foreground extraction module: obtain the swing cylinder working video sequence, and process each frame image in the video sequence based on the adaptive mixed Gaussian background model to obtain the corresponding foreground image; Contour extraction module: optimizes the foreground image based on adaptive threshold segmentation and morphological processing, and outputs a binary contour image sequence; Motion parameter calculation module: extracts contour features from the binary contour image sequence and calculates the overall motion parameters of the swing cylinder; Smoothing module: Use sliding average filtering method to smooth the overall motion parameters of the swing cylinder to obtain the smoothed overall motion parameters of the swing cylinder; Performance calculation module: Calculate the motion stability index and motion range index of the swing cylinder based on the smoothed overall motion parameters of the swing cylinder.

[0027] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0028] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0029] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for measuring the motion of a swing cylinder based on computer vision, characterized in that: The following steps are involved: S1: Get the video sequence of the swing cylinder working , ,in For the Frame image, is the frame number, is the total number of frames; each frame image in the video sequence is processed based on the adaptive mixed Gaussian background model to obtain the corresponding foreground image; S2: Optimize the foreground image based on adaptive threshold segmentation and morphological processing, and output a binary contour image sequence; S3: extracting contour features from the binary contour image sequence, and calculating the overall motion parameters of the swing cylinder, wherein the overall motion parameters of the swing cylinder include the swing angle, angular velocity and angular acceleration of the swing cylinder; S4: Smoothing the overall motion parameters of the swing cylinder using a sliding average filtering method to obtain smoothed overall motion parameters of the swing cylinder; S5: Calculate the stability index and motion range index of the swing cylinder based on the smoothed overall motion parameters of the swing cylinder, including: S51: Calculate the motion stability index of the swing cylinder: ; ; in, and They are the angular velocity fluctuation and angular acceleration fluctuation of the swing cylinder respectively; and Respectively The angular velocity and angular acceleration of the swing cylinder after smoothing in the frame image; and are the average values ​​of the angular velocity and angular acceleration of the swing cylinder after smoothing respectively; S52: Calculate the range of motion of the swing cylinder: ; ; in, and They are the swing angle range and angular velocity range of the swing cylinder respectively; and They are the swing angle sequence and angular velocity sequence of the swing cylinder after smoothing, , ,in For the The swing angle of the swing cylinder after smoothing in the frame image.

2. The computer vision-based swing cylinder motion measurement method according to claim 1 is characterized in that: In step S1, processing each frame image in the video sequence based on the adaptive mixed Gaussian background model to obtain a corresponding foreground image includes the following steps: S11: Initialize the parameters of the mixed Gaussian model: For Frame Image Each pixel in , and are the horizontal and vertical coordinates respectively, initialize Parameters of a Gaussian distribution: ; ; ; in, is the pixel in the first frame image Place The weights of the Gaussian distribution; is the pixel in the first frame image Place The mean vector of a Gaussian distribution is a 3D vector; is the pixel in the first frame image Place The covariance matrix of a Gaussian distribution is a 3×3 matrix; is the pixel in the first frame image The RGB value vector at is a 3D vector; is the number of Gaussian distribution; For the Gaussian distributed random perturbations; is the initial standard deviation; is a 3×3 identity matrix; S12: For each frame in the video sequence ,calculate Medium pixel The degree of match with each Gaussian distribution: ; ; ; in, For the Pixels in the frame image The RGB value at Mahalanobis distance of a Gaussian distribution; For the Pixels in the frame image Place The mean vector of the Gaussian distribution; For the Pixels in the frame image Place The covariance matrix of the Gaussian distribution; For the Pixels in the frame image RGB value vector at ; Transpose the matrix; For the Pixels in the frame image Does it match the The indicator function of a Gaussian distribution; is the matching threshold; For the Pixels in the frame image Place The standard deviation of a Gaussian distribution; is the trace of the matrix; S13: Update each Gaussian distribution parameter: ; ; ; in, is the learning rate; and Respectively Frame and Pixels in the frame image Place The weights of the Gaussian distribution; For the Pixels in the frame image Place The mean vector of the Gaussian distribution; For the Pixels in the frame image Place The covariance matrix of the Gaussian distribution; For the Pixels in the frame image Place The parameter update coefficient of a Gaussian distribution is: ; S14: Sort the Gaussian distribution and extract the foreground target. First, calculate the Pixels in the frame image Place The ratio of the weight and standard deviation of a Gaussian distribution ;according to Sort each pixel in descending order The Gaussian distribution at the position where the cumulative weight exceeds the background threshold is selected distribution as the background model, specifically: ; in, Pixel The number of Gaussian distributions that are judged as background models; is the background threshold; ; If the pixel Before mismatch Gaussian distribution, it is determined as the foreground point, and the first Frame foreground binary image , the mismatch criterion is for the pixel point If the RGB value of If the Mahalanobis distance of each Gaussian distribution is greater than 2.5 times the standard deviation, the pixel is considered not to match the Gaussian distribution.

3. The computer vision-based swing cylinder motion measurement method according to claim 2 is characterized in that: The step S2 includes the following steps: S21: Foreground binary image Each pixel marked as foreground in , calculate the adaptive threshold based on local statistical features: S211: Calculate the adaptive threshold based on local statistical features: ; in, For the Pixels in the frame image Adaptive threshold at ; For the Pixels in the frame image Centered The average pixel value in a local neighborhood; For the Pixels in the frame Centered Standard deviation within a local neighborhood; S212: Perform threshold segmentation: ; in, For the Pixels in the frame image Binarization result after adaptive threshold segmentation; For the Pixels in the frame image The pixel value of the foreground binary image; S22: Apply morphological processing to optimize the target contour. Binarization result after adaptive threshold segmentation of frame image use Rectangular Structuring Element First dilate and then erode to obtain Binarized contour image of the frame image ; Binarized contour image sequence .

4. The computer vision-based swing cylinder motion measurement method according to claim 3 is characterized in that: The step S3 includes the following steps: S31: Extract contour feature point sequence: Binarize the contour image for each frame , Harris corner detection algorithm is used to extract feature points, and normalized cross-correlation matching algorithm is combined to achieve cross-frame tracking of feature points. Feature point set of frame image ; S32: Calculate the overall motion parameters of the swing cylinder: ; ; ; in, For the The swing angle of the swing cylinder in the frame image; For the Angular velocity of the swing cylinder in the frame image; For the Angular acceleration of the swing cylinder in the frame image; For the The coordinates of the center point of the swing cylinder in the frame image are calculated by Feature point set of frame image The centroid of all feature points in is obtained; For the Coordinates of the reference point of the swing cylinder in the frame image; is the time interval between adjacent frames.

5. The computer vision-based swing cylinder motion measurement method according to claim 4 is characterized in that: The step S4 includes the following steps: The sliding average filtering method is used to smooth the overall motion parameters of the swing cylinder: ; ; ; in, , and Respectively The swing angle, angular velocity and angular acceleration of the swing cylinder after smoothing in the frame image; is the half length of the sliding window, satisfying ; ,satisfy .

6. The swing cylinder motion measurement system based on computer vision is characterized by: include: Foreground extraction module: obtain the swing cylinder working video sequence, and process each frame image in the video sequence based on the adaptive mixed Gaussian background model to obtain the corresponding foreground image; Contour extraction module: optimizes the foreground image based on adaptive threshold segmentation and morphological processing, and outputs a binary contour image sequence; Motion parameter calculation module: extracts contour features from the binary contour image sequence and calculates the overall motion parameters of the swing cylinder; Smoothing module: Use sliding average filtering method to smooth the overall motion parameters of the swing cylinder to obtain the smoothed overall motion parameters of the swing cylinder; Performance calculation module: calculates the motion stability index and motion range index of the swing cylinder based on the smoothed overall motion parameters of the swing cylinder; To realize the swing cylinder motion measurement method based on computer vision as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Moving object rapid detection method based on video sequence

    CN106846359A

  • Monocular vision obstacle avoidance system for ornithopter

    CN115840459A

  • Information processor and information processing method for performing process adapted to user motion

    US20100328319A1

  • Motion target shadow detection method and system in monitoring video

    WO2017054455A1