Head posture data collection method, device, electronic equipment and medium

By combining the inertial unit with the camera unit, offline calibration and real-time data calculation are used to solve the existing technology problems of insufficient accuracy of head posture data collection under lighting conditions and cumbersome calibration steps, achieving flexibility and accuracy. The improvement is suitable for head posture data collection in a variety of scenarios.

CN118436342BActive Publication Date: 2024-10-11HANGZHOU RUIJIAN ZHIXING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410903623.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-10-11
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

The accuracy of existing head posture data acquisition methods decreases in low-light or strong-light environments, the equipment cost is high and the field of view is limited. The calibration steps of the method based on the inertial measurement unit are cumbersome and the conditions are limited, and cannot fully cover various posture changes. .

Method used

The method of combining the inertial unit and the camera unit is used to simplify the calibration process of the inertial unit and improve the flexibility and accuracy of the head posture data by off-line calibrating the posture of the visual positioning mark. It combines real-time head images and inertial unit data to perform real-time calculations. The pose of the head relative to the camera.

Benefits of technology

Without being restricted by the collection angle and field of view, it improves the accuracy and richness of head posture data, simplifies the calibration steps of the inertial unit, enhances the diversity and applicability of the data, and is suitable for a variety of scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118436342B_ABST
    Figure CN118436342B_ABST
Patent Text Reader

Abstract

The present application provides a head posture data acquisition method, device, electronic device and medium, the method is applied to a head posture acquisition system including an inertial unit and a camera unit, and the inertial unit has a visual positioning mark; the method comprises: before acquisition, offline calibration of the posture of the visual positioning mark relative to the inertial unit; during acquisition, calibration of the posture of the camera unit relative to the inertial coordinate system and the posture of the head relative to the inertial unit during this acquisition process; then based on the real-time head image acquired by the camera unit at the same time, the real-time inertial unit data acquired by the inertial unit, the posture of the head relative to the inertial unit during this acquisition process, and the posture of the camera unit relative to the inertial coordinate system, the real-time head posture data during this acquisition process is determined, wherein the relationship between the inertial unit and the head is calibrated offline, which improves the flexibility of acquisition and is not limited by the acquisition angle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data acquisition technology, and in particular to a head posture data acquisition method, device, electronic device and medium. Background Art

[0002] With the rise of smart cockpit technology, head posture estimation has become one of the key technologies to improve user experience and system safety. Head posture estimation provides real-time and accurate user input for the cockpit system by accurately capturing movements such as rotation and tilt of the passenger's head.

[0003] The diversity, richness, and accuracy of head pose data are crucial in this context, providing key training data for the development of deep learning models. A common method for collecting head pose data is to use a camera with depth perception, but the sensitivity of this method to lighting conditions may lead to reduced accuracy in low-light or strong-light environments, while the high cost of the equipment and limited field of view may limit its application in certain scenarios, and the diversity and richness of the available head pose data collected are reduced. Another method is based on the inertial measurement unit. The existing inertial measurement unit-based acquisition method has too many calibration steps and limited acquisition conditions. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a head posture data collection method, device, electronic device and medium, which can offline calibrate the relationship between the inertial unit and the head, improve the flexibility of collection and are not limited by the collection angle.

[0005] A head posture data collection method provided in an embodiment of the present application is applied to a head posture collection system, wherein the head posture collection system comprises: an inertial unit and a camera unit, wherein a visual positioning mark is provided on the inertial unit; the method comprises:

[0006] Before collecting head posture data, offline calibrating the posture of the visual positioning marker relative to the inertial unit based on the offline marking image of the visual positioning marker collected by the camera unit;

[0007] When collecting head posture data, based on the current mark image of the visual positioning mark collected by the camera unit and the offline calibrated posture of the visual positioning mark relative to the inertial unit, calibrate the posture of the camera unit relative to the inertial coordinate system during this collection process;

[0008] Based on the positioning facial image captured by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this acquisition process, calibrate the posture of the head relative to the inertial unit during this acquisition process;

[0009] Based on the real-time head image collected by the camera unit and the real-time inertial unit data collected by the inertial unit at the same moment, the posture of the head relative to the inertial unit during this collection process, and the posture of the camera unit relative to the inertial coordinate system, the real-time head posture data during this collection process is determined; the real-time head posture data includes the real-time posture of the head relative to the camera and the real-time head image at the same moment.

[0010] In some embodiments, in the head posture data collection method, the offline marking image of the visual positioning mark collected by the camera unit and the offline calibration of the posture of the visual positioning mark relative to the inertial unit include:

[0011] Based on the offline marking image of the visual positioning mark collected by the camera unit, determining the marking posture data of the visual positioning mark; the marking posture data represents the posture of the visual positioning mark relative to the camera unit during the offline calibration process;

[0012] Acquire multiple sets of inertial unit data of inertial units and marker posture data of the visual positioning marker; wherein the inertial unit data represents the posture of the inertial unit relative to the inertial coordinate system, and the inertial unit data and the marker posture data are time synchronized;

[0013] Based on the inertial unit data of the multiple groups of inertial units and the marker pose data of the visual positioning marker, a pose of the visual positioning marker relative to the inertial unit is determined.

[0014] In some embodiments, in the head posture data collection method, determining the marking posture data of the visual positioning mark based on the offline marking image of the visual positioning mark collected by the camera unit includes:

[0015] For the offline marking image of the visual positioning mark collected by the camera unit, the shape information of the visual positioning mark in the offline marking image is detected by an image recognition method;

[0016] Based on the attribute information of the visual positioning mark, the camera parameters of the camera unit, and the shape information of the visual positioning mark in the offline marking image, the marking posture data of the visual positioning mark is determined; the attribute information of the visual positioning mark includes size information and position information.

[0017] In some embodiments, in the head posture data collection method, determining the posture of the visual positioning marker relative to the inertial unit based on the inertial unit data of the multiple groups of inertial units and the marker posture data of the visual positioning marker includes:

[0018] Determine, based on the inertial unit data of the multiple groups of inertial units and the mark posture data of the visual positioning mark, the movement postures of the multiple groups of inertial units and the movement postures of the visual positioning mark corresponding to the movement from the first position to the second position multiple times;

[0019] Based on the relationship that the moving posture of each group of inertial units and the moving posture of the visual positioning mark are equal, the posture of the visual positioning mark relative to the inertial unit is calculated.

[0020] In some embodiments, in the head posture data collection method, based on the current mark image of the visual positioning mark collected by the camera unit and the offline calibrated posture of the visual positioning mark relative to the inertial unit, the posture of the camera unit relative to the inertial coordinate system during this collection process is calibrated; including:

[0021] Based on the current mark image of the visual positioning mark captured by the camera unit, calculating the posture of the visual positioning mark relative to the camera unit during this acquisition process;

[0022] Based on the posture of the visual positioning mark relative to the inertial unit that has been calibrated offline in advance, the posture of the visual positioning mark relative to the camera unit during this acquisition process, and the inertial unit data synchronized with the current mark image, the posture of the camera unit relative to the inertial coordinate system during this acquisition process is calibrated.

[0023] In some embodiments, in the head posture data collection method, based on the positioning facial image collected by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this collection process, the posture of the head relative to the inertial unit during this collection process is calibrated, including:

[0024] Extracting two-dimensional point coordinate information of facial feature points from the positioning facial image captured by the camera unit, and combining the three-dimensional point information corresponding to the facial feature points to calculate the posture of the head relative to the camera unit during the current acquisition process;

[0025] Based on the inertial unit data synchronized with the positioning facial image, the posture of the head relative to the camera unit during the current acquisition process, and the posture of the camera unit relative to the inertial coordinate system, the posture of the head relative to the inertial unit during this acquisition process is calculated.

[0026] In some embodiments, the head posture data collection method includes determining the real-time head posture data in the current collection process based on the real-time head image collected by the camera unit and the real-time inertial unit data collected by the inertial unit at the same time, the posture of the head relative to the inertial unit and the posture of the camera unit relative to the inertial coordinate system in the current collection process; including:

[0027] Based on the posture of the head relative to the inertial unit and the posture of the camera unit relative to the inertial coordinate system during this acquisition process, converting the real-time inertial unit data into the real-time posture of the head relative to the camera unit;

[0028] The real-time posture of the head relative to the camera unit and the real-time head image at the same moment are associated to form real-time head posture data.

[0029] In some embodiments, a head posture data acquisition device is provided, which is applied to a head posture acquisition system, wherein the head posture acquisition system comprises: an inertial unit and a camera unit, wherein a visual positioning mark is provided on the inertial unit; the device comprises:

[0030] An offline calibration module, used for offline calibrating the posture of the visual positioning marker relative to the inertial unit based on the offline marking image of the visual positioning marker collected by the camera unit before collecting the head posture data;

[0031] A first calibration module is used to calibrate the posture of the camera unit relative to the inertial coordinate system during this acquisition process based on the current mark image of the visual positioning mark acquired by the camera unit and the offline calibrated posture of the visual positioning mark relative to the inertial unit when collecting head posture data;

[0032] A second calibration module is used to calibrate the posture of the head relative to the inertial unit during this acquisition process based on the positioning facial image captured by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this acquisition process;

[0033] The acquisition module is used to determine the real-time head posture data in this acquisition process based on the real-time head image acquired by the camera unit and the real-time inertial unit data acquired by the inertial unit at the same time, the posture of the head relative to the inertial unit during this acquisition process, and the posture of the camera unit relative to the inertial coordinate system; the real-time head posture data includes the real-time posture of the head relative to the camera and the real-time head image at the same time.

[0034] In some embodiments, an electronic device is provided, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the head posture data collection method are performed.

[0035] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the head posture data collection method are executed.

[0036] In an embodiment of the present application, a head posture data acquisition method, device, electronic device and medium are provided, which are applied to a head posture acquisition system, wherein the head posture acquisition system comprises: an inertial unit and a camera unit, wherein the inertial unit is fixed to the head, and a visual positioning mark is provided on the inertial unit; before collecting the head posture data, based on the offline marked image of the visual positioning mark collected by the camera unit, the posture of the visual positioning mark relative to the inertial unit is offline calibrated, and this offline calibration method improves the flexibility and accuracy of the inertial unit for acquiring head posture data; when collecting the head posture data, firstly, based on the current marked image of the visual positioning mark collected by the camera unit and the posture of the visual positioning mark relative to the inertial unit that has been calibrated offline, the posture of the camera unit relative to the inertial coordinate system during this acquisition process is calibrated; then, based on the positioning face image collected by the camera unit, the posture of the visual positioning mark relative to the inertial unit is calibrated offline. The image is collected by the camera unit at the same time, the posture of the camera unit relative to the inertial coordinate system during this collection process is obtained, and the posture of the head relative to the inertial unit during this collection process is calibrated. In this way, before collecting the head data, the relationship between the inertial unit and the head is calibrated offline. Finally, based on the real-time head image collected by the camera unit and the real-time inertial unit data collected by the inertial unit at the same time, the posture of the head relative to the inertial unit during this collection process, and the posture of the camera unit relative to the inertial coordinate system, the real-time inertial unit data is converted into the real-time posture of the head relative to the camera, so as to determine the real-time head posture data during this collection process. In this way, by pre-calibrating the relationship between the inertial unit and the head offline, a large amount of calibration is not required during the collection process, which simplifies the calibration process of the inertial unit and improves the flexibility of head posture data collection. At the same time, it is not limited by the collection angle and field of view, and more accurate and rich head posture data is collected. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 A flow chart of a head posture data collection method according to an embodiment of the present application is shown;

[0039] Figure 2A schematic diagram of the head posture described in an embodiment of the present application is shown;

[0040] Figure 3 The schematic diagram of ArUco marking described in the embodiment of the present application is shown;

[0041] Figure 4 A flow chart of a method for calibrating the posture of the camera unit relative to the inertial coordinate system during the acquisition process according to an embodiment of the present application is shown;

[0042] Figure 5 A schematic diagram showing the position of the camera unit, the inertial unit, and the head during the acquisition process described in the embodiment of the present application is shown;

[0043] Figure 6 A flow chart of a method for calibrating the posture of the head relative to the inertial unit during the acquisition process according to an embodiment of the present application is shown;

[0044] Figure 7 The structure diagram of the head posture data acquisition device described in the present application is shown;

[0045] Figure 8 A schematic structural diagram of an electronic device described in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0046] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme 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. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0047] With the rise of smart cockpit technology, head posture estimation has become one of the key technologies to improve user experience and system safety. Head posture estimation provides real-time and accurate user input for the cockpit system by accurately capturing movements such as rotation and tilt of the passenger's head.

[0048] The diversity, richness, and accuracy of head posture data are crucial in this context, providing key training data for the development of deep learning models. The diversity and richness of head posture data reflect the head movement patterns of different users, individual differences, and the complexity of various cockpit application scenarios, so that deep learning models can more comprehensively understand the diversity of head postures, improve the generalization ability of the model, and make it more reliable and intelligent in a real cockpit environment. The accuracy of head posture data determines the confidence and accuracy of the deep learning model. Therefore, the richness and accuracy of data in deep learning training not only enhances the performance of the model, but also provides a strong foundation for the innovation and development of cockpit technology.

[0049] A common method for collecting head posture data is to use a camera with depth perception, such as an RGB-D camera to obtain three-dimensional information of the head, and then use feature point positioning to estimate the two-dimensional feature points of the face. The head posture can be obtained based on the three-dimensional information and the two-dimensional feature points. However, the sensitivity of this method to lighting conditions may lead to a decrease in accuracy in low-light or high-light environments. In a dark environment, the camera may not be able to capture enough details to accurately identify the head posture; in a high-light environment, excessive light may produce reflections and shadows, interfering with the accuracy of posture estimation.

[0050] The high cost of the equipment and the limited field of view may limit its application in some scenarios. The richness and diversity of the head posture data collected are also insufficient. High-cost equipment may not be suitable for some budget-limited scenarios, and the limited field of view means that the camera may not be able to capture all the required head posture data. This may result in insufficient richness and diversity of the collected head posture data, and it cannot fully cover the posture changes in various actual scenarios.

[0051] Another method is based on the inertial measurement unit. The inertial measurement unit can infer the head posture in real time by measuring the acceleration and angular velocity information of the head. This method is not affected by lighting conditions and can work in any environment. However, the existing inertial measurement unit-based acquisition method has too many calibration steps and limited acquisition conditions.

[0052] Based on this, in an embodiment of the present application, a head posture data acquisition method, device, electronic device and medium are provided, which are applied to a head posture acquisition system, wherein the head posture acquisition system comprises: an inertial unit and a camera unit, wherein the inertial unit is fixed on the head, and a visual positioning mark is provided on the inertial unit; before collecting the head posture data, based on the offline marked image of the visual positioning mark collected by the camera unit, the posture of the visual positioning mark relative to the inertial unit is offline calibrated, and this offline calibration method improves the flexibility and accuracy of the inertial unit for acquiring head posture data; when collecting the head posture data, firstly, based on the current marked image of the visual positioning mark collected by the camera unit and the posture of the visual positioning mark relative to the inertial unit that has been calibrated offline, the posture of the camera unit relative to the inertial coordinate system during this acquisition process is calibrated; then, based on the positioning face image collected by the camera unit, the posture of the visual positioning mark relative to the inertial unit that has been calibrated offline is calibrated. The head image and the posture of the camera unit relative to the inertial coordinate system during this acquisition process are used to calibrate the posture of the head relative to the inertial unit during this acquisition process. In this way, before collecting the head data, the relationship between the inertial unit and the head is calibrated offline. Finally, based on the real-time head image collected by the camera unit and the real-time inertial unit data collected by the inertial unit at the same time, the posture of the head relative to the inertial unit during this acquisition process, and the posture of the camera unit relative to the inertial coordinate system, the real-time inertial unit data is converted into the real-time posture of the head relative to the camera, so as to determine the real-time head posture data during this acquisition process. In this way, by pre-calibrating the relationship between the inertial unit and the head offline, a large amount of calibration is not required during the acquisition process, which simplifies the calibration process of the inertial unit and improves the flexibility of head posture data collection. At the same time, it is not limited by the acquisition angle and field of view, and more accurate and rich head posture data are collected.

[0053] Please refer to Figure 1 , Figure 1 A flow chart of a head posture data collection method according to an embodiment of the present application is shown. The head posture data collection method is applied to a head posture collection system, and the head posture collection system includes: an inertial unit and a camera unit, and a visual positioning mark is provided on the inertial unit; the method includes the following steps S101-S104:

[0054] S101, before collecting head posture data, offline calibrating the posture of the visual positioning marker relative to the inertial unit based on the offline marking image of the visual positioning marker collected by the camera unit;

[0055] S102, when collecting head posture data, based on the current mark image of the visual positioning mark collected by the camera unit and the offline calibrated posture of the visual positioning mark relative to the inertial unit, calibrate the posture of the camera unit relative to the inertial coordinate system during this collection process;

[0056] S103, calibrating the posture of the head relative to the inertial unit during this acquisition process based on the positioning facial image captured by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this acquisition process;

[0057] S104. Determine the real-time head posture data during this acquisition process based on the real-time head image collected by the camera unit and the real-time inertial unit data collected by the inertial unit at the same time, the posture of the head relative to the inertial unit during this acquisition process, and the posture of the camera unit relative to the inertial coordinate system; the real-time head posture data includes the real-time posture of the head relative to the camera and the real-time head image at the same time.

[0058] Please refer to Figure 2 , Figure 2 A schematic diagram of the head posture described in an embodiment of the present application is shown: head posture refers to the direction of the head relative to a reference object (such as the body or the horizon). In three-dimensional space, head posture is usually described using Euler angles, which include three main rotation angles: Yaw, Pitch, and Roll. Yaw: The yaw angle describes the rotation of the head around a vertical axis, which is the direction through the head upward. Pitch: The pitch angle describes the rotation of the head around an axis from ear to ear. Roll: The roll angle describes the rotation of the head around an axis from the nose to the back of the head.

[0059] Inertial measurement unit: The inertial measurement unit uses multiple sensors to measure and record the motion state of an object, including speed, direction, acceleration, etc. In the present invention, these measurements are used to infer the changing posture and motion state of the object over time. The visual positioning marker can be a marker based on a QR code, such as an ArUco marker. ArUco stands for Augmented Reality University of Cordoba, which is a vision-based marking system for camera positioning and posture estimation. Specifically, the ArUco marker is a binary square reference marker consisting of a wide black border and an internal binary matrix that determines its identifier (id), forming a black and white matrix pattern. These patterns contain data that encodes specific information. By decoding this information, the position and direction of the camera can be determined. This type of visual positioning marker detection is simple, fast, and highly robust. Please refer to Figure 3 , Figure 3 A schematic diagram of ArUco marking described in an embodiment of the present application is shown.

[0060] The inertial unit is provided with a visual positioning mark to firmly fix the ArUco mark on the inertial unit, ensuring that the pattern of the ArUco mark will not be blocked when the inertial unit moves or rotates, so that the camera unit can clearly capture the mark.

[0061] In the step S101, before collecting head posture data, the posture of the visual positioning marker relative to the inertial unit is offline calibrated based on the offline marking image of the visual positioning marker collected by the camera unit.

[0062] The posture of the offline calibrated visual positioning mark relative to the inertial unit represents the position transformation relationship between the visual positioning mark and the inertial unit, or in other words, represents the transformation relationship between the mark coordinate system where the visual positioning mark is located and the inertial unit coordinate system where the inertial unit is located.

[0063] That is, based on the posture of the visual positioning marker relative to the inertial unit, the coordinate information of the visual positioning marker in the marker coordinate system can be converted into the inertial unit coordinate system.

[0064] The inertial coordinate system is a coordinate system defined relative to a fixed reference object (usually the earth), which is characterized by the absence of acceleration within it. For example, in the common north-east coordinate system, the x-axis of the coordinate system is parallel to the true north direction of the earth's surface, the y-axis is parallel to the true east direction of the earth's surface, and the z-axis points to the direction of gravity on the earth's surface. Before offline calibration, the camera unit and the inertial unit need to be time synchronized to ensure that the image data collected by the camera unit and the inertial unit data collected by the inertial unit can be accurately matched. Time synchronization can be achieved in a variety of ways, such as using an external synchronization signal method, sharing a connection to the same clock source to make the time of the camera unit and the inertial unit consistent; or by using the inertial measurement unit and the camera unit to detect the same marker to estimate the time difference, and achieve time synchronization based on the estimated time difference.

[0065] The inertial unit data is the position and posture of the inertial unit coordinate system relative to the inertial coordinate system.

[0066] The offline marking image of the visual positioning mark collected by the camera unit and offline calibration of the posture of the visual positioning mark relative to the inertial unit comprises:

[0067] Based on the offline marking image of the visual positioning mark collected by the camera unit, determining the marking posture data of the visual positioning mark; the marking posture data represents the posture of the visual positioning mark relative to the camera unit during the offline calibration process;

[0068] Acquire inertial unit data of multiple groups of inertial units and marker posture data of the visual positioning marker; wherein the inertial unit data represents the posture of the inertial unit, and the inertial unit data and the marker posture data are time synchronized;

[0069] Based on the inertial unit data of the multiple groups of inertial units and the marker pose data of the visual positioning marker, a pose of the visual positioning marker relative to the inertial unit is determined.

[0070] In the embodiment of the present application, based on the offline marking image of the visual positioning mark collected by the camera unit, determining the marking posture data of the visual positioning mark includes:

[0071] For the offline marking image of the visual positioning mark collected by the camera unit, the shape information of the visual positioning mark in the offline marking image is detected by an image recognition method;

[0072] Based on the attribute information of the visual positioning mark, the camera parameters of the camera unit, and the shape information of the visual positioning mark in the offline marking image, the marking posture data of the visual positioning mark is determined; the attribute information of the visual positioning mark includes size information and position information.

[0073] The size information of the visual positioning mark includes its physical size in the real world, such as height, width, etc.

[0074] The position information may be a relative position or an absolute position of the visual positioning mark, such as its coordinate information in a mark coordinate system.

[0075] The camera parameters of the camera unit include internal parameters of the camera (such as focal length, principal point, distortion coefficient, etc.) and external parameters (such as rotation and translation of the camera relative to the world coordinate system).

[0076] During the movement or rotation of the inertial unit, the relative positions of the visual positioning mark and the camera unit are different. In the image captured by the camera unit, the attribute information such as the size and position of the visual positioning mark is different and is affected by the camera parameters. Therefore, based on the attribute information of the visual positioning mark, the camera parameters of the camera unit, and the shape information of the visual positioning mark in the mark image, the posture of the visual positioning mark relative to the camera unit (i.e., the mark posture data of the visual positioning mark) can be reversely calculated.

[0077] In some embodiments, with respect to the mark image of the visual positioning mark captured by the camera unit, the shape information of the visual positioning mark in the mark image is detected by an image recognition method, and the coding information in the visual positioning mark is also identified.

[0078] The coding information is used to verify whether the visual positioning mark is qualified. For example, if wrong coding information is recognized or the coding information cannot be recognized, it means that the offline marked image is unqualified and cannot be used for offline calibration, thereby further improving the accuracy of calibration.

[0079] The unqualified offline labeled images may be due to blurriness, incompleteness and other reasons.

[0080] Exemplarily, the marker posture data is called R_cam2aruco, which represents the posture of the visual positioning marker relative to the camera unit during the offline calibration process, or the posture of the marker coordinate system where the visual positioning marker is located relative to the camera unit coordinate system where the camera unit is located.

[0081] The marker pose data includes rotation and displacement.

[0082] Move the inertial unit with ArUco markers within the field of view of the camera unit, use the image recognition method to detect the corner points of the ArUco markers, and calculate the posture R_cam2aruco of the ArUco marker relative to the camera unit. The specific steps are to detect the corner points of the ArUco marker using the corner point detection method, extract the shape and encoding information of the ArUco marker, use the known attribute information (size and position information) of the ArUco marker combined with the camera parameters, and estimate the posture R_cam2aruco of the camera unit coordinate system relative to the ArUco marker coordinate system through the solvePnP algorithm.

[0083] The solvePnP algorithm is used to solve the camera positioning problem, that is, to calculate the camera's posture (rotation and translation) through the known three-dimensional coordinates of the object in the world coordinate system and its two-dimensional coordinates in the image.

[0084] Acquire multiple sets of inertial unit data of inertial units and the marker posture data of the visual positioning marker; specifically, at multiple different moments, record the marker posture data of the ArUco marker and the inertial unit data at the corresponding moments, and synchronize the acquired values ​​in time.

[0085] Specifically, determining the posture of the visual positioning mark relative to the inertial unit based on the inertial unit data of the multiple groups of inertial units and the mark posture data of the visual positioning mark includes:

[0086] Determine, based on the inertial unit data of the multiple groups of inertial units and the mark posture data of the visual positioning mark, the movement postures of the multiple groups of inertial units and the movement postures of the visual positioning mark corresponding to the movement from the first position to the second position multiple times;

[0087] Based on the relationship that the moving posture of each group of inertial units and the moving posture of the visual positioning mark are equal, the posture of the visual positioning mark relative to the inertial unit is calculated.

[0088] Based on the relationship that the moving posture of each group of inertial units and the moving posture of the visual positioning marker are equal, an equation is constructed, and the constructed equation is solved to calculate the posture of the visual positioning marker relative to the inertial unit.

[0089] Specifically, the marking posture data of the ArUco mark and the inertial unit data at the corresponding moment are recorded, and the inertial unit data R_inertial2imu of the inertial unit is recorded at the same time, so as to obtain multiple groups of inertial unit data of the inertial unit and the marking posture data of the visual positioning mark.

[0090] According to the data of multiple synchronizations, the moving posture A of the inertial unit from one position to another and the moving posture B of the ArUco marker from one position to another can be calculated. During the multiple movements, the coordinate system of the ArUco marker and the coordinate system of the inertial unit remain unchanged, and the equation AX=XB can be established, where X is the posture R_aruco2imu of the ArUco marker relative to the inertial unit. Through the hand-eye calibration method, the optimal X can be solved, and the posture of the visual positioning marker relative to the inertial unit can be solved.

[0091] Here, the posture of the visual positioning marker relative to the inertial unit represents the posture transformation relationship of the visual positioning marker relative to the inertial unit, and the posture R_aruco2imu of the ArUco marker relative to the inertial unit can also be called the posture transformation matrix of the ArUco marker relative to the inertial unit.

[0092] The hand-eye calibration method is used to calculate the accurate transformation relationship between the robot arm and the camera. The problem of solving the transformation relationship can usually be constructed by A ' X ' =X ' B ' To represent, where A ' Represents the transformation matrix from the camera coordinate system to the calibration plate coordinate system, X ' Represents the transformation matrix from the robot arm to the calibration plate coordinate system, B ' Represents the coordinates of the feature points of the calibration plate observed by the camera in the camera coordinate system. ' X ' =X ' B ' One of the solutions is to use the least squares method, which seeks an optimal solution that minimizes the error.

[0093] It should be noted that when collecting head posture data, the inertial unit needs to be worn on the head. At the same time, since the position of the inertial unit worn on the head cannot be exactly the same during different collection processes, and the camera placement position cannot be exactly the same, it is necessary to calibrate the posture of the camera unit relative to the inertial coordinate system during this collection process, as well as the posture of the head relative to the inertial unit.

[0094] In step S102, when collecting head posture data, the posture of the camera unit relative to the inertial coordinate system during this collection process is calibrated based on the current mark image of the visual positioning mark collected by the camera unit and the offline calibrated posture of the visual positioning mark relative to the inertial unit.

[0095] The current marked image is a marked image used to calibrate the posture of the camera unit relative to the inertial coordinate system during the current acquisition process.

[0096] The posture of the visual positioning mark relative to the inertial unit that has been calibrated offline, that is, the posture of the visual positioning mark relative to the inertial unit that has been calibrated in advance, remains unchanged during different acquisition processes. In calibrating the posture of the camera unit relative to the inertial coordinate system during this acquisition process, it can be directly adopted without real-time calibration, which simplifies the calibration steps and improves the calibration efficiency.

[0097] For details, please refer to Figure 4 , based on the current mark image of the visual positioning mark captured by the camera unit and the offline calibrated posture of the visual positioning mark relative to the inertial unit, calibrate the posture of the camera unit relative to the inertial coordinate system during this acquisition process; including the following steps S401-S402:

[0098] S401, calculating the posture of the visual positioning mark relative to the camera unit in the current acquisition process based on the current mark image of the visual positioning mark acquired by the camera unit;

[0099] S402. Based on the posture of the visual positioning mark relative to the inertial unit that has been calibrated offline in advance, the posture of the visual positioning mark relative to the camera unit during this acquisition process, and the inertial unit data synchronized with the current marker image, calibrate the posture of the camera unit relative to the inertial coordinate system during this acquisition process.

[0100] Specifically, ensure that the ArUco mark on the inertial unit can be seen in the field of view of the camera unit and that the mark is facing the camera. Obtain the current mark image of the ArUco mark, and identify the mark posture data of the ArUco mark during this acquisition process, that is, the posture of the visual positioning mark relative to the camera unit during this acquisition process; posture calibration based on the ArUco mark is simple and fast, so this calibration is fast and the process is simple.

[0101] Then read the time-synchronized inertial unit data R_inertial2imu, and calculate the posture R_cam2inertial of the camera unit relative to the inertial coordinate system during this acquisition process; specifically, R_cam2inertial= R_inertial2imu.T@R_aruco2imu@R_cam2aruco; wherein, R_inertial2imu represents the inertial unit data of the inertial unit; R_cam2aruco represents the posture of the visual positioning marker relative to the camera unit; R_aruco2imu represents the posture of the visual positioning marker that has been pre-calibrated offline relative to the inertial unit, @ is a matrix multiplication operation, and T is a matrix transposition operation.

[0102] In the step S103, the posture of the head relative to the inertial unit during this acquisition process is calibrated based on the positioning facial image captured by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this acquisition process.

[0103] The positioning facial image is a facial image used to calibrate the posture of the head relative to the inertial unit during this acquisition process. The inertial unit is worn on the head of a person, so that the camera unit acquires the positioning facial image.

[0104] It should be noted that the positioning facial image is an image collected before the head posture data is formally collected.

[0105] Please refer to Figure 5 , Figure 5 The figure shows the position of the camera unit, the inertial unit, and the head during the acquisition process. Figure 5 As shown, the inertial unit 502 is worn on the head, an ArUco marker is set on the inertial unit 502, and the camera unit 501 collects facial images of the face at various roll angles, rotation angles and pitch angles.

[0106] Based on the positioning facial image collected by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this collection process, calibrating the posture of the head relative to the inertial unit during this collection process, including: extracting two-dimensional point coordinate information of facial feature points from the positioning facial image collected by the camera unit, combining the three-dimensional point information corresponding to the facial feature points, and calculating the posture of the head relative to the camera unit during the current collection process;

[0107] Based on the posture of the head relative to the camera unit and the posture of the camera unit relative to the inertial coordinate system during the current acquisition process, the posture of the head relative to the inertial unit during this acquisition process is calculated.

[0108] For details, please refer to Figure 6 , based on the positioning facial image captured by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this acquisition process, calibrating the posture of the head relative to the inertial unit during this acquisition process, including the following steps S601-S602:

[0109] S601, extracting two-dimensional point coordinate information of facial feature points from the positioning facial image captured by the camera unit, and calculating the posture of the head relative to the camera unit during the current acquisition process by combining the three-dimensional point information corresponding to the facial feature points;

[0110] S602: Calculate the posture of the head relative to the inertial unit during this acquisition process based on the inertial unit data synchronized with the positioning facial image, the posture of the head relative to the camera unit during the current acquisition process, and the posture of the camera unit relative to the inertial coordinate system.

[0111] It should be noted that the posture of the head relative to the camera unit will change during this acquisition, so only the posture of the head relative to the camera unit at the current calibration moment is calculated, thereby calculating the posture of the head relative to the inertial unit during this acquisition; the posture of the head relative to the inertial unit remains unchanged during this acquisition.

[0112] Facial feature points, also known as facial key points or facial landmarks, refer to a series of predefined points with special semantics in a face image. These points are usually located at specific locations on the face, such as the corners of the eyes, the corners of the mouth, the tip of the nose, the tip of the chin, etc. Facial feature points can be used to accurately describe the face.

[0113] The two-dimensional point coordinate information of facial feature points refers to the coordinate position of facial feature points on the two-dimensional image plane. In image processing, a two-dimensional image is usually represented by a pixel matrix, and each pixel has a corresponding row index (y coordinate) and column index (x coordinate). Therefore, the two-dimensional point coordinate information is usually given in the form of (x, y), indicating the specific position of the feature point in the image.

[0114] Through the facial feature point detection algorithm, facial feature points can be automatically located in the image and their two-dimensional coordinate information can be obtained.

[0115] Three-dimensional point information refers to the coordinate position of facial feature points in three-dimensional space. Compared with two-dimensional coordinates, three-dimensional coordinates contain more information and can more accurately describe the shape and posture of the face. Obtaining the three-dimensional coordinate information of facial feature points usually requires the use of three-dimensional scanning equipment or deep learning-based methods.

[0116] The two-dimensional point coordinate information of the facial feature points is combined with the three-dimensional point information corresponding to the facial feature points.

[0117] Specifically, the inertial unit is worn on the head of a person, and the face detection and face feature point model are used to extract the two-dimensional coordinate point information of the facial image from the image captured by the camera unit. Combined with the three-dimensional point information corresponding to these two-dimensional coordinate points, the posture R_head2cam of the head relative to the camera unit can be calculated by using the solvePnP algorithm.

[0118] The solvePnP algorithm is used to solve the camera positioning problem, that is, to calculate the camera's posture (rotation and translation) through the known three-dimensional coordinates of the object in the world coordinate system and its two-dimensional coordinates in the image.

[0119] Then, the posture R_head2imu of the head relative to the inertial unit can be calculated by combining the current inertial unit data of the inertial unit and the posture of the camera unit relative to the inertial coordinate system calculated in step S102 .

[0120] R_head2imu= (R_inertial2imu).T@R_cam2inertial@R_head2cam; wherein, R_inertial2imu represents the inertial unit data of the inertial unit; R_cam2inertial represents the posture of the camera unit relative to the inertial coordinate system; R_head2cam represents the posture of the head relative to the camera unit, @ is a matrix multiplication operation, and T is a matrix transposition operation.

[0121] At this point, all the calibration data required in this acquisition process have been obtained, that is, the posture of the head relative to the inertial unit and the posture of the camera unit relative to the inertial coordinate system in this acquisition process.

[0122] In step S104, based on the real-time head image collected by the camera unit and the real-time inertial unit data collected by the inertial unit at the same time, the posture of the head relative to the inertial unit and the posture of the camera unit relative to the inertial coordinate system during this collection process, the real-time head posture data during this collection process is determined; the real-time head posture data includes the real-time posture of the head relative to the camera and the real-time head image at the same time.

[0123] Specifically, the real-time head posture data in the current acquisition process is determined based on the real-time head image collected by the camera unit at the same time, the real-time inertial unit data collected by the inertial unit, the posture of the head relative to the inertial unit during the current acquisition process, and the posture of the camera unit relative to the inertial coordinate system; including:

[0124] Based on the posture of the head relative to the inertial unit and the posture of the camera unit relative to the inertial coordinate system during this acquisition process, converting the real-time inertial unit data into the real-time posture of the head relative to the camera unit;

[0125] The real-time posture of the head relative to the camera unit and the real-time head image at the same moment are associated to form real-time head posture data.

[0126] After obtaining the calibrated posture of the head relative to the inertial unit and the posture of the camera unit relative to the inertial coordinate system during this acquisition process, the head posture can be characterized according to the acquired real-time inertial unit data.

[0127] During the free rotation of the head, the camera unit is used to continuously capture the real-time head image of the head, and the real-time inertial unit data of the inertial unit is synchronously recorded, and the posture R_head2cam of the head relative to the camera unit is calculated in real time;

[0128] R_head2cam = (R_cam2inertial) .T@R_imu2inertial@R_head2imu; wherein, R_head2cam represents the posture of the head relative to the camera unit, R_cam2inertial represents the posture of the camera unit relative to the inertial coordinate system; R_imu2inertial represents the inertial unit data of the inertial unit; R_head2imu represents the posture of the head relative to the inertial unit, @ is a matrix multiplication operation, and T is a matrix transpose operation.

[0129] It should be noted that the collection of real-time head posture data is dynamic, allowing continuous collection of posture data during head movement.

[0130] The real-time posture of the head relative to the camera unit and the real-time head image at the same moment are associated as real-time head posture data. In this way, the real-time posture of the head relative to the camera unit and the real-time head image are associated as a pair of data, which can be used for neural network model training, for example, training a head posture recognition model. The real-time inertial unit data and head images collected in various postures are used as samples to train a head posture recognition model. The head posture recognition model recognizes the head image, determines the real-time posture of the head relative to the camera unit, and then converts it into the yaw angle (Yaw), pitch angle (Pitch) and roll angle (Roll) of the head relative to the reference object. After training, the head posture recognition model can recognize head images with more head postures.

[0131] Alternatively, the head posture recognition model fuses the real-time posture of the head relative to the camera unit and the real-time head image to recognize the yaw angle (Yaw), the pitch angle (Pitch) and the roll angle (Roll).

[0132] The embodiment of the present application converts the real-time inertial unit data into the real-time posture of the head relative to the camera unit, and collects sufficiently rich and diverse head posture data, so that the deep learning model can more comprehensively understand the diversity of head postures, improve the generalization ability of the model, and make it more reliable and intelligent in a real cockpit environment.

[0133] Based on the same inventive concept, a head posture data acquisition device corresponding to the head posture data acquisition method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned head posture data acquisition method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0134] Please refer to Figure 7 , Figure 7 The schematic diagram of the structure of the head posture data acquisition device described in the present application is shown as follows: Figure 7 As shown, the head posture data acquisition device is applied to a head posture acquisition system, and the head posture acquisition system includes: an inertial unit and a camera unit, and a visual positioning mark is provided on the inertial unit; the device includes:

[0135] An offline calibration module 701 is used to offline calibrate the posture of the visual positioning marker relative to the inertial unit based on the offline marking image of the visual positioning marker collected by the camera unit before collecting the head posture data;

[0136] A first calibration module 702 is used to calibrate the posture of the camera unit relative to the inertial coordinate system during this acquisition process based on the current mark image of the visual positioning mark acquired by the camera unit and the offline calibrated posture of the visual positioning mark relative to the inertial unit when collecting head posture data;

[0137] A second calibration module 703 is used to calibrate the posture of the head relative to the inertial unit during this acquisition process based on the positioning facial image captured by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this acquisition process;

[0138] The acquisition module 704 is used to determine the real-time head posture data in this acquisition process based on the real-time head image acquired by the camera unit and the real-time inertial unit data acquired by the inertial unit at the same time, the posture of the head relative to the inertial unit during this acquisition process, and the posture of the camera unit relative to the inertial coordinate system; the real-time head posture data includes the real-time posture of the head relative to the camera and the real-time head image at the same time.

[0139] In some embodiments, the offline calibration module in the head posture data acquisition device, when offline calibrating the posture of the visual positioning marker relative to the inertial unit based on the offline marked image of the visual positioning marker acquired by the camera unit, is specifically used to:

[0140] Based on the offline marking image of the visual positioning mark collected by the camera unit, determining the marking posture data of the visual positioning mark; the marking posture data represents the posture of the visual positioning mark relative to the camera unit during the offline calibration process;

[0141] Acquire inertial unit data of multiple groups of inertial units and marker posture data of the visual positioning marker; wherein the inertial unit data represents the posture of the inertial unit, and the inertial unit data and the marker posture data are time synchronized;

[0142] Based on the inertial unit data of the multiple groups of inertial units and the marker pose data of the visual positioning marker, a pose of the visual positioning marker relative to the inertial unit is determined.

[0143] In some embodiments, the offline calibration module in the head posture data acquisition device, when determining the marking posture data of the visual positioning mark based on the offline marking image of the visual positioning mark acquired by the camera unit, is specifically used to:

[0144] For the offline marking image of the visual positioning mark collected by the camera unit, the shape information of the visual positioning mark in the offline marking image is detected by an image recognition method;

[0145] Based on the attribute information of the visual positioning mark, the camera parameters of the camera unit, and the shape information of the visual positioning mark in the offline marking image, the marking posture data of the visual positioning mark is determined; the attribute information of the visual positioning mark includes size information and position information.

[0146] In some embodiments, the offline calibration module in the head posture data acquisition device, when determining the posture of the visual positioning mark relative to the inertial unit based on the inertial unit data of the multiple groups of inertial units and the marker posture data of the visual positioning mark, is specifically used to:

[0147] Determine, based on the inertial unit data of the multiple groups of inertial units and the mark posture data of the visual positioning mark, the movement postures of the multiple groups of inertial units and the movement postures of the visual positioning mark corresponding to the movement from the first position to the second position multiple times;

[0148] Based on the relationship that the moving posture of each group of inertial units and the moving posture of the visual positioning mark are equal, the posture of the visual positioning mark relative to the inertial unit is calculated.

[0149] In some embodiments, the first calibration module in the offline calibration module in the head posture data acquisition device, when calibrating the posture of the camera unit relative to the inertial coordinate system during this acquisition process based on the current mark image of the visual positioning mark acquired by the camera unit and the posture of the offline calibrated visual positioning mark relative to the inertial unit, is specifically used to:

[0150] Based on the current mark image of the visual positioning mark captured by the camera unit, calculating the posture of the visual positioning mark relative to the camera unit during this acquisition process;

[0151] Based on the posture of the visual positioning mark relative to the inertial unit that has been calibrated offline in advance, the posture of the visual positioning mark relative to the camera unit during this acquisition process, and the inertial unit data synchronized with the current mark image, the posture of the camera unit relative to the inertial coordinate system during this acquisition process is calibrated.

[0152] In some embodiments, the second calibration module in the offline calibration module in the head posture data acquisition device, when calibrating the posture of the head relative to the inertial unit during this acquisition process based on the positioning facial image acquired by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this acquisition process, is specifically used to:

[0153] Extracting two-dimensional point coordinate information of facial feature points from the positioning facial image captured by the camera unit, and combining the three-dimensional point information corresponding to the facial feature points to calculate the posture of the head relative to the camera unit during the current acquisition process;

[0154] Based on the inertial unit data synchronized with the positioning facial image, the posture of the head relative to the camera unit during the current acquisition process, and the posture of the camera unit relative to the inertial coordinate system, the posture of the head relative to the inertial unit during this acquisition process is calculated.

[0155] In some embodiments, the acquisition module in the head posture data acquisition device determines the real-time head posture data in this acquisition process based on the real-time head image acquired by the camera unit and the real-time inertial unit data acquired by the inertial unit at the same time, the posture of the head relative to the inertial unit and the posture of the camera unit relative to the inertial coordinate system in this acquisition process, specifically for:

[0156] Based on the posture of the head relative to the inertial unit and the posture of the camera unit relative to the inertial coordinate system during this acquisition process, converting the real-time inertial unit data into the real-time posture of the head relative to the camera unit;

[0157] The real-time posture of the head relative to the camera unit and the real-time head image at the same moment are associated to form real-time head posture data.

[0158] Based on the same inventive concept, an electronic device corresponding to the head posture data collection method is also provided in the embodiment of the present application. Since the principle of solving the problem by the electronic device in the embodiment of the present application is similar to the above-mentioned head posture data collection method in the embodiment of the present application, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0159] Please refer to Figure 8 , Figure 8 A schematic diagram of the structure of an electronic device described in an embodiment of the present application is shown, wherein the electronic device 800 comprises: a processor 802, a memory 801 and a bus, wherein the memory 801 stores machine-readable instructions executable by the processor 802, and when the electronic device 800 is running, the processor 802 communicates with the memory 801 via the bus, and when the machine-readable instructions are executed by the processor 802, the steps of the head posture data collection method as described above are performed.

[0160] Based on the same inventive concept, a computer-readable storage medium corresponding to the head posture data collection method is also provided in the embodiment of the present application. Since the principle of solving the problem by the computer-readable storage medium in the embodiment of the present application is similar to the above-mentioned head posture data collection method in the embodiment of the present application, the implementation of the computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.

[0161] A computer-readable storage medium stores a computer program, which executes the steps of the head posture data collection method when executed by a processor.

[0162] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0163] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0164] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0165] The modules described as separate components may or may not be physically separated, and the components shown as modules 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0166] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0167] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a platform server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0168] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A head posture data collection method, characterized in that: Applied to a head posture acquisition system, the head posture acquisition system comprises: an inertial unit and a camera unit, and a visual positioning mark is provided on the inertial unit; the method comprises: Before collecting head posture data, offline calibrating the posture of the visual positioning marker relative to the inertial unit based on the offline marking image of the visual positioning marker collected by the camera unit; When collecting head posture data, based on the current mark image of the visual positioning mark collected by the camera unit and the offline calibrated posture of the visual positioning mark relative to the inertial unit, calibrate the posture of the camera unit relative to the inertial coordinate system during this collection process; Based on the positioning facial image captured by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this acquisition process, the posture of the head relative to the inertial unit during this acquisition process is calibrated; the positioning facial image is a facial image used to calibrate the posture of the head relative to the inertial unit during this acquisition process; the inertial unit data is the posture of the inertial unit coordinate system relative to the inertial coordinate system; Based on the real-time head image collected by the camera unit and the real-time inertial unit data collected by the inertial unit at the same time, the posture of the head relative to the inertial unit during this collection process, and the posture of the camera unit relative to the inertial coordinate system, determine the real-time head posture data during this collection process; the real-time head posture data includes the real-time posture of the head relative to the camera and the real-time head image at the same time; Based on the positioning facial image collected by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this collection process, the posture of the head relative to the inertial unit during this collection process is calibrated, including: Extracting two-dimensional point coordinate information of facial feature points from the positioning facial image captured by the camera unit, and combining the three-dimensional point information corresponding to the facial feature points to calculate the posture of the head relative to the camera unit during the current acquisition process; Based on the inertial unit data synchronized with the positioning facial image, the posture of the head relative to the camera unit during the current acquisition process, and the posture of the camera unit relative to the inertial coordinate system, the posture of the head relative to the inertial unit during this acquisition process is calculated.

2. The head posture data collection method according to claim 1, characterized in that: The offline marking image of the visual positioning mark collected by the camera unit and offline calibration of the posture of the visual positioning mark relative to the inertial unit comprises: Based on the offline marked image of the visual positioning mark collected by the camera unit, determining the marking posture data of the visual positioning mark; the marking posture data represents the posture of the visual positioning mark relative to the camera unit during the offline calibration process; Acquire inertial unit data of multiple groups of inertial units and marker posture data of the visual positioning marker; wherein the inertial unit data represents the posture of the inertial unit, and the inertial unit data and the marker posture data are time synchronized; Based on the inertial unit data of the multiple groups of inertial units and the marker pose data of the visual positioning marker, a pose of the visual positioning marker relative to the inertial unit is determined.

3. The head posture data collection method according to claim 2, characterized in that: Determining the marking posture data of the visual positioning mark based on the offline marking image of the visual positioning mark collected by the camera unit includes: For the offline marking image of the visual positioning mark collected by the camera unit, the shape information of the visual positioning mark in the offline marking image is detected by an image recognition method; Based on the attribute information of the visual positioning mark, the camera parameters of the camera unit, and the shape information of the visual positioning mark in the offline marking image, the marking posture data of the visual positioning mark is determined; the attribute information of the visual positioning mark includes size information and position information.

4. The head posture data collection method according to claim 2, characterized in that: Determining the posture of the visual positioning marker relative to the inertial unit based on the inertial unit data of the multiple groups of inertial units and the marker posture data of the visual positioning marker comprises: Determine, based on the inertial unit data of the multiple groups of inertial units and the mark posture data of the visual positioning mark, the movement postures of the multiple groups of inertial units and the movement postures of the visual positioning mark corresponding to the movement from the first position to the second position multiple times; Based on the relationship that the moving posture of each group of inertial units and the moving posture of the visual positioning mark are equal, the posture of the visual positioning mark relative to the inertial unit is calculated.

5. The head posture data collection method according to claim 1, characterized in that: Based on the current mark image of the visual positioning mark collected by the camera unit and the offline calibrated posture of the visual positioning mark relative to the inertial unit, calibrate the posture of the camera unit relative to the inertial coordinate system during this collection process; including: Based on the current mark image of the visual positioning mark captured by the camera unit, calculating the posture of the visual positioning mark relative to the camera unit during this acquisition process; Based on the posture of the visual positioning mark relative to the inertial unit that has been calibrated offline in advance, the posture of the visual positioning mark relative to the camera unit during this acquisition process, and the inertial unit data synchronized with the current mark image, the posture of the camera unit relative to the inertial coordinate system during this acquisition process is calibrated.

6. The head posture data collection method according to claim 1, characterized in that: Based on the real-time head image collected by the camera unit and the real-time inertial unit data collected by the inertial unit at the same time, the posture of the head relative to the inertial unit during this collection process, and the posture of the camera unit relative to the inertial coordinate system, determine the real-time head posture data during this collection process; including: Based on the posture of the head relative to the inertial unit and the posture of the camera unit relative to the inertial coordinate system during this acquisition process, converting the real-time inertial unit data into the real-time posture of the head relative to the camera unit; The real-time posture of the head relative to the camera unit and the real-time head image at the same moment are associated to form real-time head posture data.

7. A head posture data acquisition device, characterized in that: Applied to a head posture acquisition system, the head posture acquisition system comprises: an inertial unit and a camera unit, the inertial unit is provided with a visual positioning mark; the device comprises: An offline calibration module, used for offline calibrating the posture of the visual positioning marker relative to the inertial unit based on the offline marking image of the visual positioning marker collected by the camera unit before collecting the head posture data; A first calibration module is used to calibrate the posture of the camera unit relative to the inertial coordinate system during this acquisition process based on the current mark image of the visual positioning mark acquired by the camera unit and the offline calibrated posture of the visual positioning mark relative to the inertial unit when collecting head posture data; A second calibration module is used to calibrate the posture of the head relative to the inertial unit during this acquisition process based on the positioning facial image collected by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this acquisition process; the positioning facial image is a facial image used to calibrate the posture of the head relative to the inertial unit during this acquisition process; the inertial unit data is the posture of the inertial unit coordinate system relative to the inertial coordinate system; A collection module, used to determine the real-time head posture data in this collection process based on the real-time head image collected by the camera unit and the real-time inertial unit data collected by the inertial unit at the same time, the posture of the head relative to the inertial unit during this collection process, and the posture of the camera unit relative to the inertial coordinate system; the real-time head posture data includes the real-time posture of the head relative to the camera and the real-time head image at the same time; The second calibration module, when calibrating the posture of the head relative to the inertial unit during this acquisition process based on the positioning facial image captured by the camera unit, the inertial unit data synchronized with the positioning facial image, and the posture of the camera unit relative to the inertial coordinate system during this acquisition process, is specifically used to: Extracting two-dimensional point coordinate information of facial feature points from the positioning facial image captured by the camera unit, and combining the three-dimensional point information corresponding to the facial feature points to calculate the posture of the head relative to the camera unit during the current acquisition process; Based on the inertial unit data synchronized with the positioning facial image, the posture of the head relative to the camera unit during the current acquisition process, and the posture of the camera unit relative to the inertial coordinate system, the posture of the head relative to the inertial unit during this acquisition process is calculated.

8. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the head posture data collection method as described in any one of claims 1 to 6 are performed.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the head posture data collection method as described in any one of claims 1 to 6.