Body posture detection method and device based on image recognition
By implementing video recording and body posture detection on the web, the problems of cumbersome and poor convenience of users in the prior art are solved, real-time posture detection without network upload and client installation is realized, and user experience is improved.
Patent Information
- Application Number
- CN202510062992.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-04-22
AI Technical Summary
In the prior art, users have cumbersome operations for body posture recognition, and need to install specific client applications, and have high requirements for the network, resulting in poor convenience.
A body posture detection method based on image recognition is provided, which is applied to the web terminal, obtains video data through video recording, establishes a coordinate system, calculates the position difference between the parts to be measured, and judges whether the posture meets the specification based on the preset body posture specification information.
Implement video recording and real-time body posture detection on the web side, without uploading the server through the network, avoiding detection failure problems caused by network delay, and no need to install additional client applications, improving user convenience.
Smart Images

Figure CN119863843A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of body posture detection, and in particular to a body posture detection method and device based on image recognition. Background Art
[0002] At present, the technology of recognizing user's body posture has been applied in many fields. For example, by analyzing the user's body posture, it can help detect the correctness and efficiency of exercise, reduce sports injuries, and improve training effects; combining head portrait and body posture analysis can be used for identity verification or monitoring to prevent identity theft; using body posture judgment for gesture control, posture recognition, etc., to provide a smoother human-computer interaction experience, etc.
[0003] However, in the prior art, the recognition of user body posture is usually performed in a server-side plus client-side manner. The user needs to install a specific client application (mobile application and desktop application, etc.) on the terminal (such as a mobile phone, computer, etc.), use the built-in shooting function of the client application to shoot the user's image data and upload it to the server, and the server performs recognition processing and then returns the recognition result to the client application. The above solution requires the installation of a specific client application and has high requirements on the network, making the operation of user body posture recognition cumbersome and less convenient. Summary of the invention
[0004] The present application provides a body posture detection method and device based on image recognition to improve the convenience of body posture recognition for users.
[0005] In a first aspect, the present application provides a body posture detection method based on image recognition, which is applied to a web terminal, and the method comprises:
[0006] Perform video recording, obtain and display video data containing multiple parts to be tested; the video data contains multiple key points, and each part to be tested corresponds to at least one of the key points;
[0007] Establishing a coordinate system based on the video data, and obtaining coordinate data of a plurality of key points in the video data in the coordinate system;
[0008] Calculate the position difference between the plurality of the parts to be measured according to the coordinate data;
[0009] Based on the position differences between the plurality of parts to be measured and the preset body posture standard information, it is determined whether the posture of the part to be measured meets the standard.
[0010] In a second aspect, the present application provides a body posture detection device based on image recognition, the device comprising:
[0011] An image acquisition module is used to record a video, acquire and display video data containing a plurality of parts to be measured; the video data contains a plurality of key points, and each part to be measured corresponds to at least one of the key points;
[0012] A coordinate acquisition module, used to establish a coordinate system based on the video data, and acquire coordinate data of a plurality of key points in the video data in the coordinate system;
[0013] A position calculation module, used for calculating the position difference between the plurality of the parts to be measured according to the coordinate data;
[0014] The posture judgment module is used to judge whether the posture of the part to be measured meets the standard based on the position difference between the multiple parts to be measured and the preset body posture standard information.
[0015] In a third aspect, the present application provides an electronic device comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the processor is configured to execute a body posture detection method based on image recognition as described in the first aspect above.
[0016] In a fourth aspect, the present application further provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the body posture detection method based on image recognition described in the first aspect of the present application.
[0017] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art: the body posture detection method based on image recognition provided by the embodiment of the present application is applied to the web side, and through video recording, video data containing multiple parts to be measured is obtained and displayed, a coordinate system is established based on the video data, and the coordinate data of multiple key points in the video data in the coordinate system are obtained, and the position difference between the multiple parts to be measured is calculated according to the coordinate data, and based on the position difference between the multiple parts to be measured and the preset body posture specification information, it is judged whether the posture of the part to be measured meets the specification. Compared with the problem of poor convenience of use caused by the need to record the video through a specific client and upload it to the server for processing in the prior art, the solution provided by the present application can realize video recording and real-time detection of the user's body posture on the web side, and there is no need to upload the server through the network during the detection process, which avoids the detection failure problem caused by network delay and other reasons, and there is no need to install additional client applications, which improves the convenience of body posture detection for users. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0021] Figure 1 A schematic diagram of a flow chart of a body posture detection method based on image recognition provided in an embodiment of the present application;
[0022] Figure 2 A schematic diagram showing the positions of key points and human body parts provided in the embodiments of the present application;
[0023] Figure 3 A schematic diagram of the structure of a body posture detection device based on image recognition provided in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0026] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0027] In order to solve the technical problems of cumbersome operation and poor convenience in user body posture recognition in the prior art, the present application provides a body posture detection method based on image recognition, which can realize local web-based body posture recognition. The recognition process does not require the installation of specific applications, and does not require network data transmission, thereby improving the convenience of user body posture recognition.
[0028] Figure 1 A body posture detection method based on image recognition is provided in the embodiment of the present application, referring to Figure 1 , a body posture detection method based on image recognition provided by the present application includes:
[0029] S1: Record a video to obtain and display video data containing multiple parts to be tested.
[0030] The video data contains multiple key points, and each part to be measured corresponds to at least one key point.
[0031] In the solution of this application, users record videos through the web terminal. The web terminal is an application accessed through a web browser. The web terminal is a user interface or system developed based on web technologies (such as HTML, CSS, JavaScript, etc.). Unlike traditional mobile applications or desktop applications, the web terminal does not require the installation of additional applications. Users can directly access, operate and interact through the browser, so it is more convenient.
[0032] In a feasible embodiment of the present application, video recording is performed to obtain and display video data containing multiple parts to be measured, including the following steps:
[0033] S101: Calling an API to control the camera to record images and generate video data.
[0034] Specifically, after the user clicks to start recording, JavaScript is triggered to call the getUserMedia() method. getUserMedia() is a Web API provided by the browser to obtain the user's media devices (such as cameras and microphones). When the user triggers recording, JavaScript will call this method to access the user's camera. After the getUserMedia() method returns successfully, a MediaStream object containing a video stream (i.e., video data) will be obtained. The MediaStream object is a stream of media content. A stream contains several tracks, such as video and audio tracks. The MediaStream object will be passed to subsequent processing steps.
[0035] S102: Detect key points in the video data through an image processing framework.
[0036] The video data is input into the Holistic model of the MediaPipe framework, and the key points in the video data output by the Holistic model are obtained. Specifically, this application detects key points in video data through Google's MediaPipe framework. MediaPipe provides a Holistic model that can identify and track multiple key points of the human body (such as gestures, postures, facial expressions, etc.). MediaPipe Holistic can detect key points of the human body by processing the MediaStream object and provide gesture recognition results in real time.
[0037] S103: Bind the video data to the video tag and display the video data in real time.
[0038] Specifically, bind the MediaStream returned by getUserMedia() to the video tag in HTML to display the user's real-time video on the web page.
[0039] In a feasible embodiment of the present application, in order to enable the user to see his own body posture in the video data more intuitively, the HTML canvas element can also be used to draw information related to human posture recognition in real time. After obtaining the key points of the human body (such as the position coordinates of arms, head, legs, etc.) through the Holistic model of MediaPipe, these key points can be drawn through canvas, and the skeleton of the human body can be drawn by connecting them through lines. Canvas can draw the recognition results of each frame following the video stream. For example, when the camera starts recording video data, the user can not only see his real-time image, but also see the key points and skeleton information drawn in real time, enhancing the user experience.
[0040] S2: Establish a coordinate system based on the video data, and obtain coordinate data of multiple key points in the video data in the coordinate system.
[0041] Specifically, the coordinate system is established with one corner of the image in the video data as the origin (0,0), and the other corner on the diagonal line as the coordinate point (1,1). The horizontal and vertical coordinates of the key points in the coordinate system are both decimals between 0 and 1. Figure 2 For example, you can Figure 2 The upper left corner is taken as the coordinate origin (0,0), and the lower right corner is taken as the coordinate point (1,1). Figure 2The horizontal and vertical coordinates of all key points in the video are decimals between 0 and 1. The key points output by Mediapipe Holisti are an array that contains the coordinate information of multiple key points, which are used to represent the relative positions in the current video frame. For example, the coordinates (x, y) of a key point are (0.3, 0.4), which means that the key point is located at 30% of the width and 40% of the height of the picture.
[0042] S3: Calculate the position difference between multiple parts to be measured according to the coordinate data.
[0043] Specifically, calculating the position difference between multiple parts to be measured according to the coordinate data includes the following steps:
[0044] S301: Acquire preset resolution parameters of output video data.
[0045] Specifically, the relevant configuration parameters of the video stream, including but not limited to resolution, noise reduction, etc., can be obtained by calling the getUserMedia() method to obtain the resolution parameters of the output video data.
[0046] S302: According to the resolution parameter, the coordinates of the key points in the coordinate system are converted into pixel coordinates through an image processing framework.
[0047] Specifically, since the coordinates output by Mediapipe Holisti are proportional values relative to the video frame, in order to facilitate subsequent processing and calculation, it is necessary to convert these relative position coordinates into pixel coordinates according to the resolution parameters of the video data obtained in step S1. For example, assuming that the coordinates of a key point are (0.5, 0.4) and the resolution of the video stream is 1000*1000 (in pixels, px), the pixel coordinates of the key point are (1000*0.5, 1080*0.4) = (500, 400).
[0048] S303: Calculate the pixel coordinate difference between the key points corresponding to the multiple parts to be measured in the horizontal and vertical coordinates to obtain the position difference; and / or calculate the pixel coordinate difference between the preset point and at least one key point in the horizontal and vertical coordinates as the position difference.
[0049] Specifically, Figure 2As shown, the key points output by Mediapipe Holisti correspond to different parts of the human body, and each key point has its own number. For example, key points numbered 7 and 8 correspond to the left and right ears of the human body, respectively; key points numbered 11 and 12 correspond to the left and right shoulders of the human body, respectively; key points numbered 13 and 14 correspond to the left elbow and right elbow of the human body, respectively; key points numbered 15 corresponds to the left wrist of the human body, key points numbered 17, 19 and 21 correspond to the left palm of the human body, numbered 16 corresponds to the right wrist of the human body, and key points numbered 18, 20 and 22 correspond to the right palm of the human body. Calculating the position difference between the parts to be measured is to calculate the pixel coordinate difference of the key points corresponding to the parts to be measured on the horizontal and vertical coordinates. For example, calculating the position difference between the left elbow and the left shoulder is to calculate the position difference between the key point numbered 13 and the key point numbered 11. The preset point is determined based on the pixel coordinates of multiple key points. For example, assuming that the preset point is the midpoint of the line between the left elbow and the left shoulder, the coordinates of the preset point are calculated based on the coordinates of the key point numbered 13 and the coordinates of the key point numbered 11.
[0050] S4: Based on the position differences between the multiple parts to be measured and the preset body posture standard information, determine whether the posture of the part to be measured meets the standard.
[0051] The preset body posture standard information can be flexibly set according to the actual situation, and the present invention does not limit this. For example, the body posture standard information can include the limit range of head deflection, the limit range of shoulder inclination, and the limit condition of palm height, etc. In a feasible embodiment of the present application, the posture detection of the part to be tested is mainly divided into two categories, one is the detection of the inclination of the human head, and the other is the detection of the movement of the upper limbs of the human body.
[0052] The detection of the inclination of the human head is based on the position difference between at least two organs of the human head and the head inclination standard information, and determines whether the inclination of the head meets the standard.
[0053] Specifically, according to the first horizontal coordinate distance between the left ear and the nose and the second horizontal coordinate distance between the right ear and the nose, when the difference between the first horizontal coordinate distance and the second horizontal coordinate distance is greater than the first preset threshold, it is determined that the head rotation angle is too large and does not meet the specification. For example, assuming that the first preset threshold is 50px, the pixel coordinates of the key point numbered 0 corresponding to the nose are (500,100), the pixel coordinates of the key point numbered 7 corresponding to the left ear are (670,90), and the pixel coordinates of the key point numbered 8 corresponding to the right ear are (400,90), then the first horizontal coordinate distance between the left ear and the nose is |670-500|=170px, the second horizontal coordinate distance between the right ear and the nose is |400-500|=100px, and the difference between the first horizontal coordinate distance and the second horizontal coordinate distance is |170-100|=70px, which is greater than the first preset threshold of 50px, so it is determined that the tilt angle of the user's head in the horizontal direction is too large and does not meet the specification.
[0054] The motion detection of the human upper limbs is based on the position difference between at least two organs of the human upper limbs and the upper limb motion standard information to determine whether the upper limb motion meets the standard.
[0055] Specifically, judging whether the upper limb movement meets the specification includes but is not limited to at least one of the following options:
[0056] (1) According to the longitudinal coordinate height difference between the left shoulder and the right shoulder, when the longitudinal coordinate height difference is greater than a second preset threshold, it is determined that the shoulder is uneven and does not meet the specification.
[0057] For example, assuming that the second preset threshold is 40px, the pixel coordinates of the key point numbered 11 corresponding to the left shoulder are (550,200), and the pixel coordinates of the key point numbered 12 corresponding to the right shoulder are (450,250). The difference in longitudinal coordinate height between key point 11 and key point 12 is |200-250|=50px, which is greater than the second preset threshold of 40px. Therefore, it is determined that the user's shoulders are uneven and do not meet the specifications.
[0058] (2) Based on the first longitudinal coordinate of the midpoint of the line from the elbow to the shoulder and the second longitudinal coordinate of the hand, if the height of the second longitudinal coordinate is less than the height of the first longitudinal coordinate, it is determined that the hand is in a raised state which does not meet the specification.
[0059] For example, assuming that the pixel coordinates of the key point No. 11 corresponding to the left shoulder are (550, 200), the pixel coordinates of the key point No. 12 corresponding to the right shoulder are (450, 250), the pixel coordinates of the key point No. 13 corresponding to the left elbow are (750, 300), and the pixel coordinates of the key point No. 14 corresponding to the right elbow are (250, 300), then the coordinates of the midpoint of the line between the left elbow and the left shoulder are (650, 250), and the coordinates of the midpoint of the line between the right elbow and the right shoulder are (350, 275). When the vertical coordinate heights of the key points corresponding to the left hand (including the wrist and palm), namely key points 15, 17, 19, and 21, are all less than the vertical coordinate height of the midpoint of the line between the left elbow and the left shoulder (250px), it is determined that the left hand is in the raised state, which does not meet the specification. When the key points corresponding to the right hand (including the wrist and palm), i.e., the key points 16, 18, 20, and 22, have longitudinal coordinate heights less than the longitudinal coordinate height of the midpoint of the line from the right elbow to the right shoulder (275px), the right hand is judged to be in a raised state, which does not meet the specifications.
[0060] It should be understood that the detection of the user's body posture in the present application is not limited to the detection of the head and upper limbs in the above examples. Other types of posture detection may be performed on the user's head and upper limbs according to actual conditions, or other body parts of the user, such as legs, torso, etc., may be detected, which will not be repeated here.
[0061] In order to help users adjust their body posture to meet the standards, in a feasible embodiment of the present application, when it is determined that the user's action does not meet the standards, a prompt can be given to the user that the corresponding body part does not meet the standards, for example, through a prompt box.
[0062] When the conditions for ending recording are met, the Camera object provided in Mediapipe is called to end recording, and MediaRecorder and MediaStream are ended. MediaRecorder is an interface provided by MediaStream Recording API for easy media recording. It is instantiated by calling the MediaRecorder() construction method. A series of configurations for the recorded file format can be set, and the recording can be started and ended actively. Among them, the conditions for ending recording can be determined to be met after the preset time of starting recording by setting a timer, and the conditions for ending recording can also be determined to be met when the user clicks to end recording. In a feasible embodiment of the present application, after the recording is ended, the recorded video can be stored, and the video can be stored locally or uploaded to the cloud.
[0063] In summary, the technical solution provided by the present application is applied to the web side, and by performing video recording, video data containing multiple parts to be measured is obtained and displayed, a coordinate system is established based on the video data, the coordinate data of multiple key points in the video data in the coordinate system are obtained, and the position difference between the multiple parts to be measured is calculated according to the coordinate data. Based on the position difference between the multiple parts to be measured and the preset body posture specification information, it is determined whether the posture of the part to be measured meets the specification. Compared with the problem of poor convenience of use caused by the need to record the video through a specific client and upload it to the server for processing in the prior art, the solution provided by the present application can realize video recording and real-time detection of the user's body posture on the web side. During the detection process, there is no need to upload the server through the network, which avoids the detection failure problem caused by network delays and other reasons, and there is no need to install additional client applications, which improves the convenience of body posture detection for users.
[0064] Corresponding to the above method embodiment, the present application also provides a body posture detection device based on image recognition, referring to Figure 3 The present application provides a body posture detection device based on image recognition, including: an image acquisition module 301, a coordinate acquisition module 302, a position calculation module 303 and a posture judgment module 304.
[0065] The image acquisition module 301 is used to record a video, acquire and display video data containing multiple parts to be measured; the video data contains multiple key points, and each part to be measured corresponds to at least one key point.
[0066] The coordinate acquisition module 302 is used to establish a coordinate system based on the video data and acquire the coordinate data of multiple key points in the video data in the coordinate system.
[0067] The position calculation module 303 is used to calculate the position difference between multiple parts to be measured according to the coordinate data.
[0068] The posture judgment module 304 is used to judge whether the posture of the part to be measured meets the standard based on the position difference between the multiple parts to be measured and the preset body posture standard information.
[0069] like Figure 4 As shown, an embodiment of the present application provides an electronic device, including a processor 411, a communication interface 412, a memory 413 and a communication bus 414, wherein the processor 411, the communication interface 412, and the memory 413 communicate with each other through the communication bus 414.
[0070] The memory 413 is used to store computer programs.
[0071] In one embodiment of the present application, the processor 411 is used to execute the program stored in the memory 413 to implement the body posture detection method based on image recognition provided by any of the above method embodiments, including:
[0072] Recording a video, obtaining and displaying video data containing multiple parts to be tested; the video data contains multiple key points, and each part to be tested corresponds to at least one key point;
[0073] Establish a coordinate system based on the video data, and obtain coordinate data of multiple key points in the video data in the coordinate system;
[0074] Calculate the position difference between multiple parts to be measured according to the coordinate data;
[0075] Based on the position differences between multiple parts to be measured and preset body posture standard information, it is determined whether the posture of the part to be measured meets the standard.
[0076] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the body posture detection method based on image recognition as provided in any of the aforementioned method embodiments are implemented.
[0077] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0078] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0079] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0080] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A body posture detection method based on image recognition, characterized in that: Applied to the web side, the method includes: Perform video recording, obtain and display video data containing multiple parts to be tested; the video data contains multiple key points, and each part to be tested corresponds to at least one of the key points; Establishing a coordinate system based on the video data, and obtaining coordinate data of a plurality of key points in the video data in the coordinate system; Calculate the position difference between the plurality of the parts to be measured according to the coordinate data; Based on the position differences between the plurality of parts to be measured and the preset body posture standard information, it is determined whether the posture of the part to be measured meets the standard.
2. The body posture detection method based on image recognition according to claim 1, characterized in that: Record videos, obtain and display video data of multiple test parts, including: Calling an API to control the camera to record images and generate the video data; Detecting and obtaining the key points in the video data through an image processing framework; The video data is bound to a video tag, and the video data is displayed in real time.
3. The body posture detection method based on image recognition according to claim 2, characterized in that: Detecting and obtaining the key points in the video data through an image processing framework includes: The video data is input into a Holistic model of a MediaPipe framework, and the key points in the video data output by the Holistic model are obtained.
4. The body posture detection method based on image recognition according to claim 1, characterized in that: The coordinate system uses one corner of the image as the coordinate origin (0,0) and another corner of the corner on the diagonal as the coordinate point (1,1); the horizontal and vertical coordinates of the key point in the coordinate system are both decimals between 0 and 1.
5. The body posture detection method based on image recognition according to claim 4, characterized in that: Calculating the position difference between the plurality of the parts to be measured according to the coordinate data includes: Obtaining a preset resolution parameter for outputting the video data; According to the resolution parameter, converting the coordinates of the key point in the coordinate system into pixel coordinates through an image processing framework; Calculate the pixel coordinate difference of the key points corresponding to the multiple parts to be measured in the horizontal and vertical coordinates to obtain the position difference; and / or calculate the pixel coordinate difference between the preset point and at least one of the key points in the horizontal and vertical coordinates as the position difference; the preset point is determined based on the pixel coordinates of the multiple key points.
6. The body posture detection method based on image recognition according to claim 1, characterized in that: Based on the position differences between the plurality of parts to be measured and the preset body posture standard information, judging whether the posture of the part to be measured meets the standard includes: Based on the position difference between at least two organs of the human head and the head tilt standard information, determining whether the tilt of the head meets the standard; Based on the position difference between at least two organs of the upper limb of the human body and the upper limb movement standard information, it is judged whether the movement of the upper limb meets the standard.
7. The body posture detection method based on image recognition according to claim 6, characterized in that: Based on the position difference between at least two organs of the human head and the head tilt standard information, judging whether the tilt of the head meets the standard, including: judging that the head rotation angle is too large and does not meet the standard when the difference between the first horizontal coordinate distance and the second horizontal coordinate distance is greater than a first preset threshold according to a first horizontal coordinate distance between the left ear and the nose and a second horizontal coordinate distance between the right ear and the nose; Based on the position difference between at least two organs of the upper limb of the human body and the upper limb movement standard information, judging whether the movement of the upper limb meets the standard, including: According to the longitudinal coordinate height difference between the left shoulder and the right shoulder, when the longitudinal coordinate height difference is greater than a second preset threshold, it is determined that the shoulder is uneven and does not meet the specification; And / or, based on the first longitudinal coordinate of the midpoint of the line from the elbow to the shoulder and the second longitudinal coordinate of the hand, when the height of the second longitudinal coordinate is less than the height of the first longitudinal coordinate, it is determined that the hand is in a raised state which does not meet the specifications.
8. A body posture detection device based on image recognition, characterized in that: The device comprises: An image acquisition module is used to record a video, acquire and display video data containing a plurality of parts to be measured; the video data contains a plurality of key points, and each part to be measured corresponds to at least one of the key points; A coordinate acquisition module, used to establish a coordinate system based on the video data, and acquire coordinate data of a plurality of key points in the video data in the coordinate system; A position calculation module, used for calculating the position difference between the plurality of the parts to be measured according to the coordinate data; The posture judgment module is used to judge whether the posture of the part to be measured meets the standard based on the position difference between the multiple parts to be measured and the preset body posture standard information.
9. An electronic device, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor coupled to the at least one bus; At least one memory connected to the at least one bus, wherein the processor is configured to be able to implement the body posture detection method based on image recognition as described in any one of claims 1-7.
10. A computer storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute the body posture detection method based on image recognition as described in any one of claims 1-7.
Citation Information
Cited By
Intelligent safety management system of digital production line
CN120375263A