A noise-resistant method for fast recognition of hand motion trajectories

By combining the sliding window and Kalman filter methods, the problem of insufficient anti-noise ability of hand motion trajectory recognition in the CPU environment in the existing technology is solved, realizing fast and low hardware requirement trajectory recognition, and is suitable for more devices and scenes.

CN114863549BActive Publication Date: 2024-10-18HARBIN ENG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210306773.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2024-10-18
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

Existing hand motion trajectory recognition algorithms have weak anti-noise capabilities and poor robustness in a CPU environment, and methods based on deep learning are slow and require high hardware configuration, making it impossible to achieve rapid recognition without preparing a data set.

Method used

A sliding window is used to obtain trajectory sequence data, the isolation forest algorithm and the Kalman filter method are used for data cleaning and prediction, the trajectory type is determined based on the circularity and movement direction, and the effectiveness and movement direction of the trajectory points are identified through the sliding window and the Kalman filter. .

Benefits of technology

It achieves fast and low-hardware configuration requirements for anti-noise hand motion trajectory recognition in a CPU environment. It can accurately identify trajectories in noisy environments. It is fast, robust and suitable for more devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114863549B_ABST
    Figure CN114863549B_ABST
Patent Text Reader

Abstract

The present invention provides a noise-resistant method for fast identification of hand motion trajectories, which uses an isolation forest algorithm to calculate outliers in a trajectory; uses a Kalman filter method to predict the position of a next trajectory point after the end point of the current trajectory; detects whether a starting point is an outlier; determines whether the distances to the two preceding and following points are both less than a threshold to determine a retained point and a discarded point; determines whether a key point is an outlier, and whether the maximum distances of rows and columns are both greater than a minimum diameter threshold; determines a statistical direction angle change mean to determine whether the trajectory is clockwise or counterclockwise, or determines the moving direction or determines it to be stationary based on the relationship between the horizontal and vertical motion amplitudes and the distance threshold and the fluctuation threshold, and finally ends; the present invention can identify hand motion trajectories that move up, down, left, right, and clockwise or counterclockwise, and has the advantages of low hardware configuration requirements, fast calculation speed, strong noise resistance, good robustness, and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a noise-resistant hand motion trajectory rapid recognition method, belonging to the technical field of dynamic gesture recognition. Background Art

[0002] Dynamic gesture recognition is one of the main means of natural human-computer interaction, and its practical applications in industrial control, human-computer interaction in gaming and entertainment are becoming more and more widespread. Hand motion trajectory recognition is one of the key technologies for dynamic gesture recognition. Due to the influence of factors such as human limb movement characteristics, environmental interference, and the level of hand detection and recognition technology, there is a large amount of noise data in the hand motion trajectory, which brings great challenges to hand motion trajectory recognition. There are two main types of existing trajectory recognition algorithms: one is trajectory recognition based on traditional machine learning methods, such as trajectory recognition based on hidden Markov models and trajectory recognition based on Bayesian methods; the other is trajectory recognition based on deep learning, such as trajectory recognition based on LSTM and trajectory recognition based on GRU. Trajectory recognition based on traditional machine learning methods has weak noise resistance and poor robustness. Trajectory recognition methods based on deep learning are slow, have high hardware configuration requirements (generally require GPU environment), and require a large amount of data sets for training.

[0003] Purpose of the Invention

[0004] The purpose of the present invention is to realize noise-resistant fast recognition of hand motion trajectories in a CPU computing environment, and to provide a noise-resistant fast recognition method for hand motion trajectories without preparing a data set for training.

[0005] The object of the present invention is achieved in that:

[0006] The present invention proposes a noise-resistant method for rapid recognition of hand motion trajectories, which can recognize up, down, left, right, and clockwise / counterclockwise hand motion trajectories, and has the advantages of low hardware configuration requirements, fast calculation speed, strong noise resistance, and good robustness.

[0007] The specific steps are as follows:

[0008] S0: Use the sliding window to obtain the coordinate data of the trajectory sequence with a length of N and clean up the meaningless trajectory points;

[0009] S1: Use the isolation forest algorithm to calculate the outliers in the trajectory;

[0010] S2: Check each outlier point P one by one, and calculate the distance between P and its previous trajectory point PRE and the next trajectory point NXT in the trajectory sequence respectively; if neither of them exceeds the given distance threshold maxDisError, P is not considered an outlier and is retained, otherwise P is deleted from the trajectory sequence, and finally determine whether the start and end points of the sequence are outliers. If so, delete them from the trajectory sequence;

[0011] S3: Use the Kalman filter method to predict the position of the next trajectory point after the end point of the current trajectory;

[0012] S4: If there are valid trajectory points, calculate the maximum difference dx=max(X)-min(X) of the x-axis components of the valid trajectory points and the maximum difference dy=max(Y)-min(Y) of the y-axis components, where X represents the set of x-axis components of the trajectory points, and Y represents the set of y-axis components of the trajectory points. Then calculate the circularity of the trajectory. Where S refers to the area enclosed by the trajectory, C refers to the circumference of the trajectory formed by connecting the trajectory points, and the value range of roundness is [0,1];

[0013] If dx>2×minRadius, dy>2×minRadius, R>minRoundness, it is considered to be a circle and S5 is executed, otherwise S6 is executed; minRadius represents the minimum identification radius threshold of circular motion, and minRoundness represents the minimum roundness threshold considered to be a circle;

[0014] S5: Calculate the center of the circular trajectory where y i With x i Represents the ordinate and abscissa of the i-th trajectory point respectively; then calculates the azimuth of the trajectory point based on the trajectory point and the trajectory center point, and then calculates the difference delta_angle between each adjacent azimuth i , where i represents the difference between the i-th adjacent azimuths, and then the mean of the azimuth changes is calculated Where n is the number of trajectory points. If mean_delta_angle>0, it rotates clockwise, and mean_delta_angle<0, it rotates counterclockwise. i The formula for determining is as follows:

[0015] delta_angle i =θ i+1 -θ i +transcend(θ i ,θ i+1 )×2π

[0016]

[0017]

[0018]

[0019]

[0020] S6: If the lateral movement amplitude dx is greater than the longitudinal movement amplitude dy, and dx > minDist and dy < maxDist, it is considered a translational movement. minDist represents the threshold of the movement average value, and maxDist is the threshold of the fluctuation in the direction perpendicular to the movement direction. The setting of these two variables gives a large tolerance space for trajectory recognition. The relationship between the predicted position and the current position of the trajectory points is used to judge the movement direction by the Kalman filter. If the predicted point is on the right side of the current position, it is a rightward movement; otherwise, it is a leftward movement.

[0021] If dx < dy, and dy > minDist and dx < maxDist, it is considered a vertical movement. The relationship between the predicted position and the current position of the trajectory points is used to judge the movement direction by the Kalman filter. If the predicted point is above the current position, it is an upward movement; otherwise, it is a downward movement.

[0022] If dx < minDist and dy < minDist, it is regarded as stationary.

[0023] Further, the meaningless trajectory points are the trajectory point initialization values and the trajectory points with negative coordinate values.

[0024] Compared with the prior art, the beneficial effects of the present invention are:

[0025] The present invention can obtain accurate trajectory recognition results in the case where the trajectory points contain noise, is faster than the trajectory recognition method based on deep learning, can achieve real-time recognition, does not require high hardware requirements, can be used on more devices, is simpler than the method based on machine learning, has a higher recognition rate, and enables gesture recognition to have a wider application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flowchart of anti-noise hand movement trajectory recognition. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0027] The present invention will be further described below with reference to the drawings:

[0028] A method for quickly recognizing anti-noise hand movement trajectories, the specific steps are as follows:

[0029] S0: Use a sliding window to obtain the coordinate data of a trajectory sequence with a length of N, and clean up meaningless trajectory points, such as trajectory point initialization values ​​(generally the coordinate origin value) and trajectory points with negative coordinate values ​​(in the image coordinate system, all trajectory points are in the first quadrant and should be positive values);

[0030] S1: Use the isolation forest algorithm to calculate the outliers in the trajectory;

[0031] S2: Check each outlier point P one by one, and calculate the distance between P and its previous trajectory point PRE and the next trajectory point NXT in the trajectory sequence. If neither of them exceeds the given distance threshold maxDisError, P is not considered an outlier and is retained, otherwise P is deleted from the trajectory sequence. Finally, determine whether the start and end points of the sequence are outliers. If so, delete them from the trajectory sequence;

[0032] S3: Use the Kalman filter method to predict the position of the next trajectory point after the end point of the current trajectory;

[0033] S4: If there are valid trajectory points, calculate the maximum difference dx=max(X)-min(X) of the x-axis components of the valid trajectory points and the maximum difference dy=max(Y)-min(Y) of the y-axis components, where X represents the set of x-axis components of the trajectory points and Y represents the set of y-axis components of the trajectory points. Then calculate the circularity of the trajectory. Where S refers to the area enclosed by the trajectory, and C refers to the circumference of the trajectory formed by connecting the trajectory points. The value range of roundness is [0,1];

[0034] If dx>2×minRadius, dy>2×minRadius, R>minRoundness, it is considered to be a circle and S5 is executed. Otherwise, S6 is executed. minRadius represents the minimum identification radius threshold of circular motion, and minRoundness represents the minimum roundness threshold considered to be a circle;

[0035] S5: Calculate the center of the circular trajectory where y i With x i Represents the ordinate and abscissa of the i-th trajectory point respectively. Then calculate the azimuth of the trajectory point based on the trajectory point and the trajectory center point. Then calculate the difference delta_angle between each adjacent azimuth i , where i represents the difference between the i-th adjacent azimuths. Then the mean of the azimuth changes is calculated. Where n is the number of trajectory points. If mean_delta_angle>0, it rotates clockwise, and mean_delta_angle<0, it rotates counterclockwise. delta_angle i The formula for determining is as follows:

[0036] delta_angle i = θ i+1 - θ i + transcend(θ i , θ i+1 ) × 2π

[0037]

[0038]

[0039]

[0040]

[0041] S6: If the horizontal movement amplitude dx is greater than the vertical movement amplitude dy, and dx > minDist and dy < maxDist, it is considered a translational movement. minDist represents the threshold of the movement average value, and maxDist is the threshold of the fluctuation in the direction perpendicular to the movement direction. The setting of these two variables gives a large tolerance space for trajectory recognition. The relationship between the predicted position and the current position of the trajectory points is used to judge the movement direction by using the Kalman filter. If the predicted point is on the right side of the current position, it is a rightward movement, otherwise it is a leftward movement.

[0042] If dx < dy, and dy > minDist and dx < maxDist. Then it is considered a vertical movement. The relationship between the predicted position and the current position of the trajectory points is used to judge the movement direction by using the Kalman filter. If the predicted point is above the current position, it is an upward movement, otherwise it is a downward movement.

[0043] If dx < minDist and dy < minDist, it is regarded as stationary.

[0044] The implementation of this method is realized using the Python language. The Isolation Forest algorithm implemented using the scikit-learn machine learning library is used to filter out the abnormal points in the trajectory point sequence, and the Kalman filter of OpenCV is used to realize the tracking of the trajectory and the calculation related to roundness.

[0045] In step S1, the Isolation Forest algorithm sets the number of trees in the forest to 10, fits the trajectory point sequence, and then predicts the abnormal points in the trajectory point sequence again. 1 is the normal value, and -1 is the abnormal value. In step S2, the experimental value of maxDisError is 100.

[0046] In step S3, the Kalman filter parameter settings are as follows:

[0047]

[0048] When the Kalman filter sets the initial point of the hand motion trajectory, it needs to make 8 corrections and predictions to ensure that the filter prediction position moves quickly to the initial point. Each correction updates the current position, the measured position, and the last measured position, and each prediction updates the predicted position.

[0049] In step S4, minRadius is set to 20 and minRoundness is set to 0.4. The area and perimeter of the trajectory points are approximately calculated using contourArea and arcLength functions of OpenCV.

[0050] In step S5, the center of the circle is determined by calculating the mean of each dimension of the trajectory point sequence, and the azimuth of each point is calculated using the inverse tangent function of Numpy. Since the returned value range is between [-π,π], it is necessary to add 2π to the calculation result in [-π,0) so that the returned range falls between [0,2π].

[0051] In step S6, minDist is set to 50 and maxDist is set to 100.

[0052] The present invention provides a noise-resistant method for fast identification of hand motion trajectories, which uses an isolation forest algorithm to calculate outliers in a trajectory; uses a Kalman filter method to predict the position of a next trajectory point after the end point of the current trajectory; detects whether a starting point is an outlier; determines whether the distances to the two preceding and following points are both less than a threshold to determine a retained point and a discarded point; determines whether a key point is an outlier, and whether the maximum distances of rows and columns are both greater than a minimum diameter threshold; determines a statistical direction angle change mean to determine whether the trajectory is clockwise or counterclockwise, or determines the moving direction or determines it to be stationary based on the relationship between the horizontal and vertical motion amplitudes and the distance threshold and the fluctuation threshold, and finally ends; the present invention can identify hand motion trajectories that move up, down, left, right, and clockwise or counterclockwise, and has the advantages of low hardware configuration requirements, fast calculation speed, strong noise resistance, good robustness, and the like.

Claims

1. A noise-resistant method for rapid recognition of hand motion trajectories, characterized in that: The specific steps are as follows: S0: Use a sliding window to obtain the coordinate data of a trajectory sequence with a length of N, and clean up meaningless trajectory points; S1: Use the Isolation Forest algorithm to calculate the outlier points in the trajectory; S2: Check each outlier point P one by one, and calculate the distances between P and its previous trajectory point PRE and the next trajectory point NXT in the trajectory sequence respectively; if neither of them exceeds the given distance threshold maxDisError, then P is not considered an outlier point and is retained, otherwise P is deleted from the trajectory sequence. Finally, judge whether the start and end points of the sequence are outlier points. If so, delete them from the trajectory sequence; S3: Use the Kalman filtering method to predict the position of the next trajectory point after the end point of the current trajectory; S4: If there are valid trajectory points, calculate the maximum difference dx=max(X)-min(X) of the x-axis components of the valid trajectory points and the maximum difference dy=max(Y)-min(Y) of the y-axis components, where X represents the set of x-axis components of the trajectory points, and Y represents the set of y-axis components of the trajectory points. Then calculate the circularity of the trajectory. Where S refers to the area enclosed by the trajectory, C refers to the circumference of the trajectory formed by connecting the trajectory points, and the value range of roundness is [0,1]; If dx > 2 × minRadius, dy > 2 × minRadius, and R > minRoundness, it is considered a circle, and S5 is executed; otherwise, S6 is executed; minRadius represents the minimum recognition radius threshold for circular motion, and minRoundness represents the minimum roundness threshold for considering it a circle; S5: Calculate the center of the circular trajectory where y i With x i Represents the ordinate and abscissa of the i-th trajectory point respectively; then calculates the azimuth of the trajectory point based on the trajectory point and the trajectory center point, and then calculates the difference delta_angle between each adjacent azimuth i , where i represents the difference between the i-th adjacent azimuths, and then the mean of the azimuth changes is calculated Where n is the number of trajectory points. If mean_delta_angle>0, it rotates clockwise, mean_delta_angle<0, it rotates counterclockwise, delta_angle i The formula for determining is as follows: delta_angle i =θ i+1 -θ i +transcend(θ i ,i i+1 )×2π S6: If the lateral movement amplitude dx is greater than the longitudinal movement amplitude dy, and dx > minDist and dy < maxDist, it is considered a translational motion. minDist represents the motion average threshold, and maxDist is the fluctuation threshold in the direction perpendicular to the motion direction. The settings of these two variables give a large tolerance space for trajectory recognition. Use the Kalman filter to judge the motion direction based on the relationship between the predicted position and the current position of the trajectory point. If the predicted point is on the right side of the current position, it is a rightward movement; otherwise, it is a leftward movement; If dx < dy, and dy > minDist and dx < maxDist, it is considered a vertical movement. Use the Kalman filter to judge the motion direction based on the relationship between the predicted position and the current position of the trajectory point. If the predicted point is above the current position, it is an upward movement; otherwise, it is a downward movement; If dx < minDist and dy < minDist, it is regarded as stationary.

2. The noise-resistant hand motion trajectory rapid recognition method according to claim 1 is characterized in that: The meaningless trajectory points are the trajectory points with negative values in the trajectory point initialization value and coordinate value.

Citation Information

Patent Citations

  • A TOF camera-based tourist category online auditing method

    CN109583411A

  • Method and device for gesture recognition via millimeter wave radar based on track judgment

    CN113791411A