Human body posture recognition method based on image processing
By acquiring standard images and performing cropping, denoising, and masking coefficient processing, combined with pixel divergence and sample vector calculation, the problem of noise interference and image matching in complex scenes in traditional pose recognition is solved, achieving more accurate human pose recognition.
Patent Information
- Application Number
- CN202511340693.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-09-19
Smart Images

Figure CN120833622A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of gesture recognition, and particularly relates to a human body gesture recognition method based on image processing. BACKGROUND
[0002] With the rapid development of computer vision and artificial intelligence technology, human body gesture recognition, as an important branch of computer vision, has become a key technology in the fields of intelligent monitoring, human-computer interaction and motion analysis. Traditional gesture recognition methods mainly rely on the analysis of sensor data and image data, and have limitations such as insufficient accuracy and weak anti-interference ability in complex scenes.
[0003] In terms of technology evolution, the existing gesture recognition methods generally face two major challenges: first, the noise interference problem in dynamic scenes, such as environmental factors such as light changes and background clutter, which will cause recognition errors; second, the image matching problem, which is difficult to accurately compare with the image when the user is static, increasing the recognition difficulty. SUMMARY
[0004] In order to solve the above problems, the present application provides a human body gesture recognition method based on image processing.
[0005] The technical scheme of the present application is: a human body gesture recognition method based on image processing includes the following steps:
[0006] S1, obtaining a standard image when a user stands, and collecting a current image of the user;
[0007] S2, processing the current image of the user to obtain a latest image, and generating a mask coefficient for each position according to a mask threshold of the latest image;
[0008] S3, determining the gesture region of the user according to the mask coefficient and the pixel value of each position in the latest image and the pixel value of the same position in the standard image.
[0009] Further, S2 includes the following sub-steps:
[0010] S21, according to the standard image, performing cropping processing on the current image of the user;
[0011] S22, performing denoising processing on the cropped current image to obtain a latest image;
[0012] S23, generating a mask coefficient for each position in the latest image.
[0013] The beneficial effect of the above further solution is that, in the present invention, the cropping operation can unify original images of different sizes and proportions into a standard size. By generating mask coefficients for different locations in the image, the image can be subsequently subjected to Gaussian processing. The mask coefficients can be used for local processing of the image. By assigning higher weights to specific areas, the detailed features of the area can be enhanced, for example, highlighting key areas such as joints and limb extremities, making gesture recognition more refined and accurate.
[0014] Furthermore, S23 includes the following sub-steps:
[0015] S231, calculating the pixel divergence of each position according to the pixel value of each position in the latest image;
[0016] S232, taking the pixel divergence mean at all positions as the mask threshold;
[0017] S233. Determine the mask coefficient of each position according to the mask threshold.
[0018] The beneficial effect of the above further solution is that, in the present invention, pixel divergence is calculated based on the difference between the pixel value and the mean of its neighborhood. This calculation quantifies the degree of difference between each pixel and its surrounding pixels. In an image, edges and changing regions typically correspond to sudden changes in pixel values, so pixel divergence can effectively highlight these areas. By setting a mask threshold, a mask coefficient, equivalent to a weight, can be determined for each location in the image. This helps reduce the impact of background noise, irrelevant objects, or other interfering factors on gesture recognition, allowing the algorithm to focus more on the human body area.
[0019] Further, in S231, the latest image Rank Pixel divergence at column position The calculation formula is:
[0020] ;
[0021] Where, Indicates the latest image Rank The pixel value at the column position, Indicates the Rank The mean pixel value of the neighborhood pixel points at the column position, Represents a logarithmic function.
[0022] The selection of neighborhood pixels can be determined according to the actual situation, and four neighborhoods, eight neighborhoods, and D neighborhoods can be selected.
[0023] Further, in S233, the latest image Rank Masking coefficient of column position The calculation formula is:
[0024] ;
[0025] In the formula, denotes a masking threshold, denotes a pixel value of a position of the i th row and the j th column in the latest image, denotes a pixel value of a position of the i th row and the j th column in the standard image, denotes a pixel value of a position of the i th row and the j th column in the latest image, denotes an index.
[0026] Further, S3 comprises the following sub-steps:
[0027] S31, generating a sample vector for each position of the standard image and the latest image respectively;
[0028] S32, calculating a changed pixel value of each position in the latest image according to the pixel value of each position in the latest image and the masking coefficient and the sample vector of the same position in the standard image;
[0029] S33, judging whether a ratio between the changed pixel value of each position in the latest image and the pixel value of the same position in the standard image is greater than a threshold value, and if yes, taking the position as a changed pixel point;
[0030] S34, taking all the changed pixel points as a gesture region of the user.
[0031] The above further scheme has the beneficial effect that: in the present application, the generation of the changed pixel point comprehensively considers the pixel value, the masking coefficient and the sample vector, and the change of each position in the image can be more accurately calculated. The pixel value reflects the basic information of the image, the masking coefficient highlights the weight of the position, and the sample vector captures the key features of the image. In combination with these factors, the change of the gesture can be more accurately identified. Integrating all the changed pixel points as the gesture region of the user can more intuitively show the change of the gesture of the user.
[0032] In S31, the image features can be extracted through a convolution kernel, and then the features are flattened into vectors, so that the key information in the image can be captured.
[0033] Further, in S32, the calculation formula of the changed pixel value of the position of the i th row and the j th column in the latest image is:
[0034] ;
[0035] In the formula, denotes a pixel value of a position of the i th row and the j th column in the latest image, denotes a pixel value of a position of the i th row and the j th column in the standard image, The mask coefficient for the column position, Indicates the latest image Rank The sample vector of column positions, represents the sample vector at the same position in the standard image, represents the index, represents the Gaussian kernel parameter, Represents the F2 norm operation.
[0036] The beneficial effects of the present invention are as follows: the present invention obtains a standard image of the user when standing, providing a stable benchmark for subsequent posture recognition. By comparing the current image with the standard image, the user's posture changes can be more accurately identified. In the specific recognition process, a mask coefficient is generated for each position based on the mask threshold of the latest image, which can further highlight the key areas in the image and suppress unimportant areas. This weighted processing allows the posture recognition algorithm to pay more attention to information related to human posture, improves the accuracy and robustness of recognition, and maintains a good recognition effect even in complex backgrounds; finally, the present invention comprehensively considers the mask coefficient and pixel value in the latest image and the pixel value in the standard image, and integrates multi-dimensional information to determine the user's posture area. This comprehensive consideration makes the determination of the posture area more accurate and reliable, reducing the possibility of misjudgment and missed judgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 Flowchart of the human posture recognition method based on image processing. DETAILED DESCRIPTION
[0038] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0039] like Figure 1 As shown, the present invention provides a method for human posture recognition based on image processing, comprising the following steps:
[0040] S1. Obtain a standard image of the user standing, and collect the user's current image;
[0041] S2. Process the user's current image to obtain the latest image, and generate a mask coefficient for each position based on the mask threshold of the latest image;
[0042] S3. Determine the user's posture area based on the mask coefficient and pixel value of each position in the latest image and the pixel value of the same position in the standard image.
[0043] In this embodiment of the present invention, S2 includes the following sub-steps:
[0044] S21. Crop the user's current image according to the standard image;
[0045] S22, performing denoising processing on the cropped current image to obtain a latest image;
[0046] S23, generating a mask coefficient for each position in the latest image.
[0047] In the present application, the cropping operation can unify original images of different sizes and proportions into a standard size. By generating a mask coefficient for different positions in the image, subsequent Gaussian processing can be performed on the image. The mask coefficient can be used for local processing of the image. By assigning higher weights to specific regions, the details of the region can be enhanced, such as highlighting key parts such as joints and extremities of the human body, making the pose recognition more precise and accurate.
[0048] In an embodiment of the present application, S23 includes the following sub-steps:
[0049] S231, calculating the pixel dispersion of each position according to the pixel value of each position in the latest image;
[0050] S232, taking the mean value of the pixel dispersion of all positions as a mask threshold;
[0051] S233, determining the mask coefficient of each position according to the mask threshold.
[0052] In the present application, the calculation of pixel dispersion is based on the difference between pixel value and its neighborhood mean. Through this calculation, the difference between each pixel point and its surrounding pixel points can be quantified. In the image, edges and changing regions usually correspond to the mutation of pixel values, so the pixel dispersion can effectively highlight these regions. By setting the mask threshold, the mask coefficient of each position in the image can be determined, which is equivalent to the weight. It helps to reduce the influence of background noise, irrelevant objects or other interference factors on pose recognition, making the algorithm more focused on the human body region.
[0053] In an embodiment of the present application, in S231, the calculation formula of the pixel dispersion of the position in the latest image is: row and column is:
[0054] ;
[0055] In the formula, represents the pixel value of the position in the latest image, represents the mean value of the pixel value of the neighborhood pixel point of the position, represents the logarithmic function.
[0056] The selection of the neighborhood pixel points can be determined according to actual conditions, and four-neighborhood, eight-neighborhood, D-neighborhood and the like can be selected.
[0057] In the embodiment of the present application, in S233, the calculation formula of the mask coefficient of the position of the i-th row and the j-th column in the latest image is as follows:
[0058]
[0059] In the formula, Mask Threshold represents the mask threshold, and represents the pixel value of the position of the i-th row and the j-th column in the latest image, and represents the index.
[0060] In the embodiment of the present application, S3 includes the following sub-steps:
[0061] S31, generating a sample vector for each position of the standard image and the latest image respectively;
[0062] S32, calculating a changed pixel value of each position in the latest image according to the pixel value and the mask coefficient of each position in the latest image and the sample vector of the same position in the standard image;
[0063] S33, judging whether the ratio between the changed pixel value of each position in the latest image and the pixel value of the same position in the standard image is greater than a threshold value, and if yes, taking the position as a changed pixel point;
[0064] S34, taking all the changed pixel points as the gesture region of the user.
[0065] In the present application, the generation of the changed pixel point comprehensively considers the pixel value, the mask coefficient and the sample vector, and can more accurately calculate the change of each position in the image. The pixel value reflects the basic information of the image, the mask coefficient highlights the weight of the position, and the sample vector captures the key features of the image. In combination with these factors, the change of the gesture can be more accurately identified. Integrating all the changed pixel points as the gesture region of the user can more intuitively show the change of the gesture of the user.
[0066] In S31, the image features can be extracted through a convolution kernel, and then the features are flattened into vectors, so that the key information in the image can be captured.
[0067] In the embodiment of the present application, in S32, the calculation formula of the changed pixel value of the position of the i-th row and the j-th column in the latest image is as follows:
[0068] ;
[0069] wherein, denotes the mask coefficient of the position of the latest image, denotes the sample vector of the position of the latest image, denotes the sample vector of the same position of the standard image, denotes the index, denotes the Gaussian kernel parameter, denotes the F2 norm operation.
[0070] Those skilled in the art will appreciate that the embodiments described herein are presented for the purpose of aiding the reader in understanding the principles of the present application and should be understood as not limiting the scope of protection of the present application to such specific recitations and embodiments. Those skilled in the art can make various other specific modifications and combinations according to the technical spirit of the present application disclosed herein without departing from the scope of the present application, and such modifications and combinations are still within the scope of protection of the present application.
Claims
1. A human posture recognition method based on image processing, characterized by, The method comprises the following steps: S1, obtaining a standard image when a user stands and collecting a current image of the user; S2, processing the current image of the user to obtain a latest image, and generating a mask coefficient for each position according to a mask threshold of the latest image; S3, determining a gesture region of the user according to the mask coefficient and the pixel value of each position in the latest image and the pixel value of the same position in the standard image. 2.The image processing-based human posture recognition method according to claim 1, characterized in that, The S2 comprises the following sub-steps: S21, performing a clipping process on the current image of the user according to the standard image; S22, performing a denoising process on the clipped current image to obtain the latest image; S23, generating a mask coefficient for each position in the latest image. 3.The image processing-based human posture recognition method of claim 2, wherein, The S23 comprises the following sub-steps: S231, calculating the pixel divergence of each position according to the pixel value of each position in the latest image; S232, taking the mean value of the pixel divergence of all positions as the mask threshold; S233, determining the mask coefficient of each position according to the mask threshold.
4. The human posture recognition method based on image processing according to claim 3, characterized in that, In the S231, the pixel dispersion of the pixel at the line and column position in the latest image is calculated according to the following formula: ; wherein represents the pixel value of the pixel in the latest image at the position of the row and the column, represents the average of the pixel values of the neighboring pixels at the position of the row and the column, represents the logarithm function. 5.The image processing-based human posture recognition method according to claim 3, characterized in that, In the S233, the latest image Rank Masking factor for column position The calculation formula is: ; wherein denotes a mask threshold, denotes the pixel value of the pixel in the latest image at the row and the column position, denotes an exponent. 6.The image processing-based human posture recognition method according to claim 1, characterized in that, The S3 comprises the following sub-steps: S31, generating a sample vector for each position of the standard image and the latest image respectively; S32, calculating the changed pixel value of each position in the latest image according to the pixel value and the mask coefficient of each position in the latest image and the sample vector of the same position in the standard image; S33, judging whether the ratio between the changed pixel value of each position in the latest image and the pixel value of the same position in the standard image is greater than a threshold value, and if yes, taking the position as a changed pixel point; S34, taking all the changed pixel points as the gesture region of the user. 7.The image processing-based human posture recognition method according to claim 6, characterized in that, In the S32, the change pixel value of the position of the row and the column of the latest image The calculation formula of the change pixel value is: ; wherein denotes the mask coefficient for the position of the latest image, denotes the position of the latest image, denotes the position of the latest image, denotes the sample vector for the same position in the standard image, denotes the index, denotes the Gaussian kernel parameter, denotes the F2 norm operation.
Citation Information
Patent Citations
Image detection method and image detection device for determining postures of user
CN109697400A
A method for calculating phenotypic parameters of lettuce grown in smart agriculture
CN114937030A
AI logic drawing method based on artificial intelligence
CN118537423A
Pedestrian head identification method and system
US20180181803A1
System and Method for Monitoring for Driver Presence and Position Using a Driver Facing Camera
US20210124916A1