Data processing method and apparatus, device, and storage medium
By obtaining the calibration plate image of the head-mounted display device and calculating the transformation matrix, the error problem in the adjustment of the posture estimation parameters of the head-mounted display device is solved, and the six-degree-of-freedom evaluation accuracy and display effect are improved.
Patent Information
- Application Number
- PCT/CN2023/127836
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-10
- Filing Date
- 2023-10-30
- Publication Date
- 2024-09-26
AI Technical Summary
In the existing technology, there are errors in the adjustment of pose estimation parameters of the head-mounted display device, resulting in low accuracy of six-degree-of-freedom evaluation, which cannot effectively improve the display effect of the head-mounted display device.
By obtaining the calibration board image of the head-mounted device during the movement of the motion capture site, determine the offset distance between the projection coordinates of the corner points and the image coordinates, calculate the transformation matrix from the motion capture object to the camera, and adjust the pose estimation based on the actual movement trajectory. Measure parameters.
It improves the accuracy of the head-mounted display device's prediction of six degrees of freedom, improves the display effect, reduces motion trajectory errors, and enhances the accuracy of pose estimation parameters.
Smart Images

Figure CN2023127836_26092024_PF_FP
Abstract
Description
Data processing method, device, equipment and storage medium
[0001] This application claims priority to Chinese patent application number "202310127541.X", filed on February 10, 2023, entitled "Data processing method, device, equipment and storage medium". The entire contents of the Chinese patent application are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, and storage medium. Background Art
[0003] Extended Reality (XR) refers to technologies that use modern, computer-based high-tech methods to create a digital environment that combines real and virtual experiences, as well as novel human-computer interaction methods, to provide users with an immersive experience with seamless transitions between the virtual and real worlds. As XR technology matures, it places higher demands on display terminals (such as head-mounted displays) in terms of determining their position and posture information.
[0004] In the field of XR technology, head-mounted display devices need to continuously adjust the pose estimation parameters to improve the evaluation accuracy of the six degrees of freedom (DoF) (rotation and translation of three coordinate axes) of the camera on the head-mounted display device, so that the head-mounted display device has a higher display effect. In the prior art, when adjusting the pose estimation parameters of the head-mounted display device, it is often necessary to first determine the motion trajectory of the camera on the head-mounted display device, and then evaluate the motion trajectory through hand-eye calibration to adjust the pose estimation parameters of the head-mounted display device based on the evaluation results. However, since there is an error in the determined camera trajectory, and this error will act on the hand-eye calibration link, resulting in a larger error in the evaluation result of the motion trajectory, and thus the pose estimation parameters of the head-mounted display device cannot be effectively adjusted.
[0005] Summary of the Invention
[0006] The embodiments of the present application provide a data processing method, apparatus, device, and storage medium, which can achieve precise adjustment of the pose estimation parameters of a head-mounted display device and have high applicability.
[0007] In one aspect, an embodiment of the present application provides a data processing method, the method comprising: obtaining at least one calibration plate image determined by a head-mounted display device during movement of the head-mounted display device in a motion capture environment, each calibration plate image being captured by a camera of the head-mounted display device, the head-mounted display device including at least one camera; determining at least one corner point from the at least one calibration plate image, and determining a projection coordinate of a first coordinate of each corner point in a calibration plate coordinate system onto an image coordinate system; determining a second coordinate of each corner point in the image coordinate system, and an offset distance between the projection coordinate and the second coordinate of each corner point; and determining a first transformation matrix from an object coordinate system where a motion capture object is located to a camera coordinate system corresponding to a first camera based on the offset distance corresponding to each corner point, the first camera being any camera included in the head-mounted display device, the motion capture object being rigidly connected to the head-mounted display device; and determining a second motion trajectory of the first camera in the world coordinate system within the preset time interval based on the first transformation matrix and a first motion trajectory of the motion capture object in a world coordinate system when the head-mounted display device moves within a preset time interval, and adjusting pose estimation parameters of the head-mounted display device based on the second motion trajectory.
[0008] On the other hand, an embodiment of the present application provides a data processing device, the device comprising:
[0009] an image determination module, configured to obtain at least one calibration plate image determined by the head-mounted display device during movement of the head-mounted display device in the motion capture field, wherein each calibration plate image is captured by a camera of the head-mounted display device, and the head-mounted display device includes at least one camera;
[0010] A coordinate determination module, configured to determine at least one corner point from at least one of the calibration plate images, and determine the projection coordinates of each corner point from a first coordinate in the calibration plate coordinate system to a corresponding image coordinate system;
[0011] a matrix determination module, configured to determine a second coordinate of each corner point in the image coordinate system, and an offset distance between the projected coordinate and the second coordinate of each corner point; and, based on the offset distance corresponding to each corner point, determine a first transformation matrix from an object coordinate system where the motion capture object is located to a camera coordinate system corresponding to a first camera, wherein the first camera is any one of the cameras included in the head-mounted display device, and the motion capture object is rigidly connected to the head-mounted display device;
[0012] The parameter adjustment module is configured to determine a second motion trajectory of the first camera in the world coordinate system within the preset time interval based on the first transformation matrix and a first motion trajectory of the motion capture object in the world coordinate system when the head-mounted display device moves within the preset time interval, and adjust the pose estimation parameters of the head-mounted display device based on the second motion trajectory.
[0013] On the other hand, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the processor and the memory are connected to each other;
[0014] The memory is used to store computer programs;
[0015] The above-mentioned processor is configured to execute the data processing method provided in the embodiment of the present application when calling the above-mentioned computer program.
[0016] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the data processing method provided by the embodiment of the present application.
[0017] On the other hand, an embodiment of the present application provides a computer program product, which includes a computer program. When the above computer program is executed by a processor, it implements the data processing method provided by the embodiment of the present application.
[0018] In the embodiment of the present application, after determining the projected coordinates of each corner point in the calibration plate image from the calibration plate coordinate system to the image coordinate system, a first transformation matrix from the object coordinate system to the camera coordinate system corresponding to the first camera on the head-mounted display device can be determined based on the offset between the projected coordinates of each corner point and the coordinates of that corner point in the image coordinate system. This not only avoids the influence of errors caused by the recovered motion trajectory of the first camera when determining the first transformation matrix based on the recovered motion trajectory, but also effectively improves the efficiency of determining the first transformation matrix.
[0019] Furthermore, through the first transformation matrix, the motion trajectory of the motion capture object on the head-mounted display device within a preset time interval can be converted into the actual motion trajectory of the first camera within the preset time interval, so that the posture estimation parameters of the head-mounted display device can be accurately adjusted based on the actual motion trajectory of the first camera, which is conducive to improving the head-mounted display device's estimation accuracy of the six degrees of freedom of the first camera and improving the display effect of the head-mounted display device. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] FIG1 is a schematic diagram of a scenario using a head-mounted display device according to an embodiment of the present application;
[0022] FIG2 is a flow chart of a data processing method according to an embodiment of the present application;
[0023] 3a-3d are schematic diagrams of calibration plate images provided in an embodiment of the present application;
[0024] FIG4 is a schematic diagram of a calibration plate provided in an embodiment of the present application;
[0025] FIG5 is a schematic diagram of a scenario for determining a calibration plate coordinate system according to an embodiment of the present application;
[0026] FIG6 is a first schematic diagram of the coordinate system correspondence provided in an embodiment of the present application;
[0027] FIG7 is a schematic diagram of a scene for determining an image coordinate system according to an embodiment of the present application;
[0028] FIG8 is a schematic diagram of a scene for determining an object coordinate system according to an embodiment of the present application;
[0029] FIG9 is a second schematic diagram of the coordinate system correspondence provided in an embodiment of the present application;
[0030] FIG10 is a third schematic diagram of the coordinate system correspondence provided in an embodiment of the present application;
[0031] FIG11 is a fourth schematic diagram of the coordinate system correspondence provided in an embodiment of the present application;
[0032] FIG12 is a fifth schematic diagram of the coordinate system correspondence provided in an embodiment of the present application;
[0033] FIG13 is a schematic structural diagram of a data processing device provided in an embodiment of the present application;
[0034] FIG14 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0036] For head-mounted display devices in the field of extended reality (ER), based on the data processing method provided in the embodiments of the present application, the motion trajectory of the camera on the head-mounted display device can be determined during the movement of the head-mounted display device, and the pose estimation parameters of the head-mounted display device can be adjusted based on the motion trajectory of the camera.
[0037] XR refers to the use of computers to combine the real and virtual worlds to create a virtual environment where humans and machines can interact. It is a general term for various technologies, including Virtual Reality (VR), Augmented Reality (AR), and Mixed Reality (MR). XR can also integrate the visual interaction technologies of these three to provide users with an immersive experience, allowing them to seamlessly transition between the virtual and real worlds.
[0038] A head-mounted display (HMD) is a device used to interact with the user. All HMDs can be referred to as HMDs. By using various HMDs and sending optical signals to the eyes using different methods, different technical effects such as virtual reality (VR), augmented reality (AR), and mixed reality (MR) can be achieved.
[0039] Virtual reality uses computer technology to simulate a three-dimensional, highly simulated 3D space. When a user wears a VR headset, they experience the illusion of being in the real world. Within this space, users can navigate and interact with the virtual environment using a controller or keyboard.
[0040] Among them, augmented reality applies virtual information to the real world through computer technology, and the real environment and virtual objects are superimposed on the same screen or space in real time and exist simultaneously.
[0041] Among them, mixed reality uses computer technology to merge the real world and the virtual world together to create a new environment and virtual images that conform to general visual perception. In this environment, objects in the real world can coexist with objects in the virtual world and interact with each other in real time.
[0042] Referring to Figure 1, Figure 1 is a schematic diagram of a scene using a head-mounted display device provided in an embodiment of the present application. As shown in Figure 1, a user can wear a head-mounted display device 11 to interact with a virtual scene.
[0043] The head display device 11 is connected to at least one camera 12 for photographing the environment around the user, so that the photographed image information can be better used for displaying and interacting with virtual scenes.
[0044] For the data processing device 13, the data processing device 13 can determine multiple calibration plate images captured by the camera 12 of the head-mounted display device 11, and then finally determine the motion trajectory of the camera 12 when the head-mounted display device 11 moves within any preset time interval based on the calibration plate images captured by the camera 12, so as to adjust the posture estimation parameters of the head-mounted display device 11 based on the determined motion trajectory.
[0045] The data processing device 13 may be a server or a terminal device with data processing capabilities.
[0046] Among them, the server can be an Internet of Vehicles server or other independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, such as Internet of Vehicles edge cloud platforms, cloud computing platforms, etc.
[0047] Among them, the terminal device can be a smart phone, tablet computer, laptop computer, desktop computer, intelligent voice interaction device (such as smart speaker), wearable electronic device (such as smart watch), vehicle terminal, smart home appliance (such as smart TV), AR / VR device, etc., but is not limited to these.
[0048] Refer to Figure 2, which is a flow chart of the data processing method provided in the embodiment of the present application. As shown in Figure 2, the data processing method provided in the embodiment of the present application may specifically include the following steps:
[0049] Step S21: Acquire at least one calibration plate image determined by the head-mounted display device during the movement of the head-mounted display device in the motion capture field.
[0050] In some feasible implementations, multiple calibration targets are placed in the motion capture field. When the head-mounted display device moves in the motion capture field, the camera on the head-mounted display device can capture images as the head-mounted display device moves, and the captured images including the calibration targets are further determined as calibration target images.
[0051] Among them, the head-mounted display device includes a motion capture object, which is rigidly connected to the head-mounted display device. When the head-mounted display device moves in the motion capture field, the motion capture system can capture the motion of the motion capture object moving in the motion capture field to determine the position information and movement trajectory of the motion capture object during the movement.
[0052] In which, when the head-mounted display device moves in the motion capture field, each camera on the head-mounted display device can shoot the motion capture field during the movement, thereby obtaining a calibration plate image including the calibration plate, wherein the head-mounted display device includes at least one camera.
[0053] That is to say, each calibration plate image obtained in the embodiment of the present application is captured by a camera of the head-mounted display device during the movement of the head-mounted display device. All calibration plate images obtained in the embodiment of the present application can come from one or more calibration plate images captured by one camera, or from multiple calibration plate images captured by different cameras, and there is no limitation here.
[0054] A calibration plate is a flat plate with an array of spaced patterns, and the identical patterns within the plate are called a checkerboard. Calibration plates can be used in applications such as machine vision, image measurement, photogrammetry, and 3D reconstruction to correct lens distortion, determine the conversion relationship between physical dimensions and pixels, and determine the relationship between the 3D geometric position of a point on a spatial object's surface and its corresponding point in the image.
[0055] As shown in Figures 3a-3d, which are schematic diagrams of calibration plate images provided in embodiments of the present application, as the head-mounted display (HMD) moves, the camera on the HMD can capture the calibration plate in the motion capture field at different times and angles, generating multiple calibration plate images.
[0056] It should be noted that in the process of determining the calibration plate image, the placement, posture, angle, etc. of each calibration plate in the motion capture site remain unchanged, that is, when the head-mounted display device moves, all calibration plates in the motion capture site remain in their original state.
[0057] Step S22: Determine at least one corner point from at least one calibration plate image, and determine the projection coordinates of each corner point from the first coordinate in the calibration plate coordinate system to the image coordinate system.
[0058] For each corner point, the projection of the first coordinate of the corner point in the calibration plate coordinate system into the image coordinate system is essentially the conversion (or projection) of the first coordinate of the corner point in the calibration plate coordinate system into the coordinate system of the image. Furthermore, the projection of the first coordinate of the corner point in the calibration plate coordinate system into the image coordinate system is not necessarily the same as the second coordinate of the corner point in the image coordinate system. This is determined by the parameters used when performing the coordinate transformation on the first coordinate of the corner point.
[0059] In some feasible implementations, after determining at least one calibration plate image, at least one corner point may be determined from the at least one calibration plate image.
[0060] For example, after obtaining a calibration plate image based on step S21, at least one corner point can be determined from the calibration plate image. After obtaining multiple calibration plate images based on step S21, one or more corner points can be determined from any one or more calibration plate images.
[0061] For each calibration plate image, if one or more corner points need to be determined from the calibration plate image, at least one corner point in the calibration plate image can be determined based on a checkerboard detection algorithm, an Apriltag detection algorithm, a QR code detection algorithm, or other existing detection algorithms and calibration tools.
[0062] See Figure 4, which is a schematic diagram of a calibration plate provided in an embodiment of the present application. As shown in Figure 4, each black block in the calibration plate can be referred to as a checkerboard grid or a tag. Furthermore, each black block can include other information items to assist in identifying the black block, such as special identifiers, patterns, or QR codes, without limitation.
[0063] Moreover, the size and shape of the black blocks (tags) in any calibration plate are exactly the same, and the four vertices of each black block are the corner points corresponding to the black block.
[0064] As an example, for each calibration plate image, the calibration plate image can be binarized using a local average adaptive thresholding method to obtain a first image. Image dilation is then performed on the first image to reduce the connection between black blocks (tags) to obtain a second image. Quadrilateral detection is then performed on the second image, and for each quadrilateral, the vertex of each quadrilateral is determined as a corner point.
[0065] As an example, for each calibration plate image, each black block (tag) in the calibration plate image is a QR code. Based on the QR code detection algorithm, at least one QR code in the calibration plate image can be detected, and then the vertex of each QR code is determined as a corner point.
[0066] It should be noted that the above method of determining corner points in the calibration plate image is only an example, and the specific method can be determined based on the actual application scenario requirements and is not limited here.
[0067] In some feasible implementations, for each corner point, when determining the first coordinate of the corner point in the calibration plate coordinate system, the calibration plate coordinate system may be determined first.
[0068] Among them, the calibration plate coordinate system corresponding to the calibration plate in each calibration plate image is consistent, and the calibration plate coordinate system can be determined based on the right-hand coordinate system or other methods. The specific determination can be based on the actual application scenario requirements and is not limited here.
[0069] Taking the right-hand coordinate system as an example, see Figure 5, which is a schematic diagram of a scenario for determining the calibration plate coordinate system provided by an embodiment of the present application. As shown in Figure 5, for each calibration plate in the calibration plate image, the lower left corner of the black block in the lower left corner of the calibration plate can be determined as the origin of the calibration plate coordinate system, the straight line at the lower edge of the black blocks in the last row of the calibration plate can be determined as the x-axis, and the rightward direction of the origin is determined as the positive direction of the x-axis; the straight line at the left edge of the black blocks in the leftmost column of the calibration plate can be determined as the y-axis, and the upward direction of the origin is determined as the positive direction of the y-axis; the straight line passing through the origin and perpendicular to the calibration plate can be determined as the z-axis, and the direction perpendicular to the calibration plate outward is the positive direction of the z-axis.
[0070] Based on this, the calibration plate coordinate system corresponding to the calibration plate in the calibration plate image can be determined.
[0071] Furthermore, for each corner point in any calibration plate image, the position of the corner point in the corresponding calibration plate can be determined first. The position of the corner point in the corresponding calibration plate is used to indicate the relative position of the corner point in the black block (tag) where it is located (such as the upper left corner, lower left corner, upper right corner or lower right corner), and is used to indicate the black block (tag) in the x-axis direction and the black block (tag) in the y-axis direction where the calibration plate is located.
[0072] At the same time, the side length of each checkerboard in the calibration plate image where the corner point is located and the interval between any two checkerboards can also be determined, wherein the checkerboards in each calibration plate image have the same size and the interval between any two checkerboards are the same.
[0073] Based on this, for each corner point, the straight-line distance from the corner point to the x-axis of the calibration plate coordinate system and the straight-line distance from the corner point to the y-axis of the calibration plate coordinate system can be determined based on the position of the corner point in the corresponding calibration plate, the side length of each checkerboard (tag) in the calibration plate image where the corner point is located, and the interval between any two checkerboards (tags). Then, according to the straight-line distance from the corner point to the x-axis of the calibration plate coordinate system and the straight-line distance to the y-axis of the calibration plate coordinate system, the first coordinate of the corner point in the calibration plate coordinate system can be determined.
[0074] As an example, for each corner point, if the tag of the calibration plate where the corner point is located is the b-th tag in the x-axis direction and the a-th tag in the y-axis direction, the side length of each tag is s, and the interval between any two tags is g:
[0075] When the corner point is located at the lower left corner of the tag, the coordinates of the corner point in the calibration plate coordinate system are:
[0076] When the corner point is located at the upper left corner of the tag, the coordinates of the corner point in the calibration plate coordinate system are:
[0077] When the corner point is located at the upper right corner of the tag, the coordinates of the corner point in the calibration plate coordinate system are:
[0078] When the corner point is located at the lower right corner of the tag, the coordinates of the corner point in the calibration plate coordinate system are:
[0079] Since the side lengths and spacing between the checkerboard squares are fixed, the first coordinates of the corner points in the calibration plate coordinate system determined based on the above implementation method can effectively eliminate the positioning deviation caused by inaccurate image positioning compared to traditional image positioning algorithms, making the calculation results of the first coordinates of each corner point in the calibration plate coordinate system more accurate.
[0080] In some feasible implementations, for each corner point, when determining the projection coordinates of the first coordinate of the corner point in the calibration plate coordinate system to the image coordinate system, the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point can be determined based on the first coordinate of the corner point in the calibration plate coordinate system, that is, the first coordinate of the corner point in the calibration plate coordinate system is first converted into the third coordinate in the camera coordinate system corresponding to the camera that photographed the corner point.
[0081] For any camera, the camera coordinate system corresponding to the camera is a three-dimensional rectangular coordinate system established with the focus center of the camera as the origin and the optical axis as the Z axis.
[0082] Among them, for each corner point, the first coordinate of the corner point in the calibration plate coordinate system can be converted into a three-dimensional homogeneous coordinate, and then the three-dimensional homogeneous coordinate is converted into the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point.
[0083] Referring to Figure 6, which is a first schematic diagram of coordinate system correspondences provided in an embodiment of the present application, Figure 6 illustrates the correspondence between a camera coordinate system corresponding to a camera and a calibration plate coordinate system corresponding to a calibration plate image. For corner point A1 on the calibration plate, after determining the first coordinate of corner point A1 in the calibration plate coordinate system, the third coordinate of corner point A1 in the camera coordinate system can be determined based on the first coordinate of corner point A1 in the calibration plate coordinate system, i.e., the spatial position of corner point A1 in the camera coordinate system can be determined.
[0084] The camera coordinate system in FIG6 is the camera coordinate system corresponding to the camera that shoots the corner point A1, and the calibration plate coordinate system in FIG6 is the calibration plate coordinate system corresponding to the calibration plate where the corner point A1 is located.
[0085] Furthermore, the projection coordinates of the first coordinate of the corner point into the image coordinate system may be determined based on the camera intrinsic parameters and the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point.
[0086] That is, based on the camera intrinsic parameters corresponding to the camera that photographed the corner point, the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point is converted into coordinates in the image coordinate system, and the converted coordinates in the image coordinate system are determined as the projection coordinates of the first coordinate of the corner point to the image coordinate system.
[0087] As an example, if the first coordinate of the j-th corner point on the calibration plate in the calibration plate image i in the calibration plate coordinate system is P ij , convert the first coordinate into a three-dimensional homogeneous coordinate After that, the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point is The projection coordinates of the first coordinate of the corner point into the image coordinate system are determined as
[0088] in, f x , f y , c x , c y is the camera internal parameter, f x , f y Represents the focal length of the camera in the x and y directions, c x , c y Represents the optical center of the camera in the x and y directions respectively.
[0089] Among them, the image coordinate system corresponding to each calibration plate image is consistent, and when determining the image coordinate system, the image coordinate system can be constructed with the upper left corner, upper right corner, lower left corner, lower right corner or image center of the calibration plate image as the origin. The specific origin can be determined based on the actual application scenario requirements and is not restricted here.
[0090] As an example, see Figure 7, which is a schematic diagram of a scenario for determining an image coordinate system according to an embodiment of the present application. As shown in Figure 7, for each calibration plate image, the lower left corner of the calibration plate image can be determined as the origin of the image coordinate system, the straight line along the bottom edge of the calibration plate image can be determined as the x-axis, and the direction to the right of the origin can be determined as the positive direction of the x-axis; the straight line along the leftmost edge of the calibration plate image can be determined as the y-axis, and the direction upward from the origin can be determined as the positive direction of the y-axis.
[0091] Based on this, the calibration plate coordinate system corresponding to the calibration plate image can be determined.
[0092] Furthermore, for each corner point in any calibration plate image, when determining the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point based on the first coordinate of the corner point in the calibration plate coordinate system, the second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located can be first determined based on the motion capture system when the calibration plate image where the corner point is located is photographed.
[0093] Among them, the motion capture system can capture the motion capture object on the head-mounted display device moving in the motion capture field, so any reference coordinate system can be selected for the environment to describe the position of each object in the motion capture field, and the reference coordinate system can be called the world coordinate system.
[0094] The head-mounted display (HMD) includes at least one motion capture object, and an object coordinate system representing the relative position of each motion capture object can be constructed based on each motion capture object. Furthermore, each motion capture object is rigidly connected to the HMD, meaning that the relative position of each motion capture object to the HMD remains unchanged during movement of the HMD.
[0095] The motion capture object may be a fluorescent object of any material, such as a fluorescent ball, or an object with a reflective effect, and there is no limitation here.
[0096] When determining the object coordinate system, any position in the space where each motion capture object is located can be used as the origin to construct a three-dimensional space coordinate system, and the origin can be used as the object coordinate system where each motion capture object is located.
[0097] For example, see Figure 8, which is a schematic diagram of a scenario for determining an object coordinate system according to an embodiment of the present application. When a head-mounted display includes multiple motion capture objects (fluorescent balls), a three-dimensional space coordinate system can be constructed with the position of any one of the fluorescent balls as the origin to obtain the final object coordinate system.
[0098] Among them, for each calibration plate image, the second transformation matrix from the world coordinate system corresponding to the motion capture system when the calibration plate image is captured to the object coordinate system where the motion capture object is located is used to represent the transformation method of the coordinates of each motion capture object in the world coordinate system to the coordinates in the object coordinate system when the calibration plate image is captured.
[0099] Among them, for each calibration plate image, when determining the second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located, the posture information of the motion capture object when the calibration plate image is captured can be determined based on the motion capture system. The posture information can be used to reflect the transformation method of the coordinates of each motion capture object in the object coordinate system to the coordinates in the world coordinate system, thereby determining the posture information of the motion capture object when the calibration plate image is captured based on the motion capture system, and determining the second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located when the calibration plate image is captured.
[0100] Among them, the motion capture system can capture the moving picture of the motion capture object in the motion capture field, and then analyze the moving picture of the motion capture object to obtain the position information of the motion capture object when each calibration plate image is taken.
[0101] As an example, for a calibration plate image i, the pose information of the motion capture object when the calibration plate image is captured can be expressed as Base represents the world coordinate system, and marker represents the object coordinate system. When the calibration plate image is captured, the second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located can be expressed as
[0102] See Figure 9, which is a second schematic diagram of coordinate system correspondences provided in an embodiment of the present application. Figure 9 illustrates the correspondence between the world coordinate system corresponding to the motion capture system and the object coordinate system corresponding to the motion capture object. After constructing the object coordinate system based on the motion capture object on the head-mounted display device, the world coordinate system corresponding to the motion capture system can be constructed in the space where the head-mounted display device resides.
[0103] Among them, based on the second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located, a transformation method between the coordinates in the world coordinate system and the coordinates in the object coordinate system of any position in the space where the head-mounted display device is located can be realized.
[0104] For example, for the position A2 in space, after determining the coordinates of A2 in the world coordinate system, its coordinates in the world coordinate system can be converted into the coordinates of A2 in the object coordinate system based on the second transformation matrix. After determining the coordinates of A2 in the object coordinate system, its coordinates in the object coordinate system can also be converted into the coordinates of A2 in the world coordinate system based on the second transformation matrix.
[0105] Furthermore, for each corner point, after determining the second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located, the third transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the camera that captures the corner point can be determined.
[0106] Among them, for each corner point, the third transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the camera that shoots the corner point can be used to represent the transformation method of the coordinates of the motion capture object in the object coordinate system to the coordinates in the camera coordinate system corresponding to the camera that shoots the corner point.
[0107] Referring to Figure 10, which is a third schematic diagram of the coordinate system correspondence provided by an embodiment of the present application, Figure 10 illustrates the correspondence between the object coordinate system corresponding to the motion capture object and the camera coordinate system corresponding to a camera.
[0108] Among them, the camera and the marker object are located in the same space. Based on the third transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to a certain camera, the transformation method between the coordinates of any position in the space where the camera and the marker object are located in the object coordinate system and the coordinates in the camera coordinate system can be determined.
[0109] For example, for the position A3 in space, after determining the coordinates of A3 in the camera coordinate system, its coordinates in the camera coordinate system can be converted into the coordinates of A3 in the object coordinate system based on the third transformation matrix. After determining the coordinates of A3 in the object coordinate system, its coordinates in the object coordinate system can also be converted into the coordinates of A3 in the camera coordinate system based on the third transformation matrix.
[0110] As an example, for each corner point, the third transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the camera k that captured the calibration plate image i where the corner point is located can be expressed as
[0111] Among them, the third transformation matrix is an unknown quantity.
[0112] Furthermore, when determining the third transformation matrix, a fourth transformation matrix from the calibration plate coordinate system to the world coordinate system needs to be determined. The fourth transformation matrix can be used to represent the transformation method between the coordinates of the calibration plate coordinate system and the world coordinate system.
[0113] Referring to Figure 11, Figure 11 is a fourth schematic diagram of the coordinate system correspondence provided by an embodiment of the present application. Figure 11 shows the correspondence between the calibration plate coordinate system and the world coordinate system.
[0114] For any calibration plate image, a three-dimensional space coordinate system can be constructed in the space where the calibration plate image is located as the world coordinate system. After determining the calibration plate coordinate system corresponding to the calibration plate image, for any corner point in the calibration plate image, based on the fourth transformation matrix from the calibration plate coordinate system to the world coordinate system, the coordinates of the corner point in the calibration plate coordinate system can be converted into its coordinates in the world coordinate system, or the coordinates of the corner point in the world coordinate system can be converted into its coordinates in the calibration plate coordinate system.
[0115] As an example, the fourth transformation matrix from the calibration plate coordinate system to the world coordinate system can be expressed as Among them, the fourth transformation matrix is an unknown quantity.
[0116] For each corner point, based on the second transformation matrix from the world coordinate system to the object coordinate system where the motion capture object is located when the calibration plate image where the corner point is located is captured, the third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera that captures the corner point, and the fourth transformation matrix from the calibration plate coordinate system to the world coordinate system, the third coordinate of the corner point in the camera coordinate system corresponding to the camera that captures the corner point can be determined.
[0117] As an example, for the jth corner point on the calibration plate in the calibration plate image i, the third coordinate of the corner point in the camera coordinate system corresponding to the camera that captured the corner point is It can be determined based on the following:
[0118] in, is the three-dimensional homogeneous coordinate corresponding to the first coordinate of the corner point in the calibration plate coordinate system.
[0119] Since the second matrix and the third matrix are unknown quantities, the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographs the corner point is also an unknown quantity.
[0120] in, Represents the transformation matrix from the A coordinate system to the B coordinate system, Represents the rotation matrix from the A coordinate system to the B coordinate system, Represents the translation vector from coordinate system A to coordinate system B. Coordinate system A and coordinate system B can be any of the world coordinate system, object coordinate system, camera coordinate system, and calibration plate coordinate system, and coordinate system A and coordinate system B are different.
[0121] Based on the above implementation, for each corner point, given the first coordinate of the corner point in the calibration plate coordinate system corresponding to the camera that captured the corner point, multiple unknown quantities (a second transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera that captured the corner point, and a third transformation matrix from the calibration plate coordinate system to the world coordinate system) are constructed. Based on the determined known quantity (the first transformation matrix from the world coordinate system to the object coordinate system), the first coordinate of the corner point can be converted to the coordinate of the corner point in the image coordinate system, thereby obtaining the projected coordinates in the image coordinate system represented by the above unknown quantities. Assuming that the projected coordinates of the first coordinate of each corner point into the image coordinate system are unknown quantities, this provides a data basis for subsequent adjustment of the pose estimation parameters of the head-mounted display device.
[0122] Step S23: determine the second coordinate of each corner point in the image coordinate system, and the offset distance between the projection coordinate of each corner point and the second coordinate; based on the offset distance corresponding to each corner point, determine the first transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the first camera.
[0123] In some feasible implementations, the first camera is any camera on the head-mounted display device, which can be specifically determined based on the actual application scenario requirements and is not limited here.
[0124] The first transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the first camera can be used to represent the coordinate transformation method from the object coordinate system to the camera coordinate system corresponding to the first camera.
[0125] In some feasible embodiments, for each corner point, after determining the projection coordinate of the corner point from the first coordinate in the calibration plate coordinate system to the image coordinate system, the distance between the projection coordinate and the second coordinate of the corner point in the image coordinate system can be determined as the offset distance between the projection coordinate of the corner point and the second coordinate in the image coordinate system.
[0126] Among them, for each calibration plate image, the lower left corner of the calibration plate image can be determined as the coordinate origin of the image coordinate system, the origin to the right is determined as the x-axis, and the origin upward is determined as the y-axis, thereby determining the image coordinate system, and further determining the second coordinate of the corner point in the image coordinate system.
[0127] Among them, for each corner point, step S22 shows that the projection coordinates of the first coordinate of the corner point in the calibration plate coordinate system to the image coordinate system need to be determined based on the third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera that shoots the corner point, and the fourth transformation matrix from the calibration plate coordinate system to the world coordinate system. Therefore, when the third transformation matrix and the fourth transformation matrix are unknown quantities, the projection coordinates of the first coordinate of the corner point in the calibration plate coordinate system to the image coordinate system are also unknown quantities, and the offset distance between the projection coordinates of the corner point and the second coordinate in the image coordinate system is also an unknown quantity.
[0128] Based on this, when determining the first transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the first camera, the projection optimization function can be determined based on the offset distance of each corner point. The projection optimization function is used to characterize the sum of the squares of the offset distances between the projection coordinates of each corner point and the second coordinate in the image coordinate system.
[0129] Similarly, when the offset distance between the projection coordinates of each corner point and the second coordinate in the image coordinate system is also an unknown quantity, the projection optimization function is also an unknown quantity.
[0130] As an example, the projection optimization function E determined based on the offset distance corresponding to each corner point can be expressed as:
[0131] Where K represents the number of cameras, k is the index of the camera that takes each calibration plate image, M is the number of calibration plate images, i is the index of the calibration plate image, and N i is the number of corner points in the i-th calibration plate image, and j is the index of the corner point in each calibration plate image.
[0132] in, It represents the second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located when the calibration plate image i is captured.
[0133] in, It represents the third transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to camera k. G represents the third transformation matrix and is an unknown quantity in the above formula.
[0134] in, Represents the fourth transformation matrix from the calibration plate coordinate system to the world coordinate system, which is an unknown quantity in the above formula.
[0135] Among them, u ij Represents the second coordinate of corner point j in the calibration plate image i in the image coordinate system.
[0136] in, Represents the first coordinate P of the corner point j in the calibration plate image i in the calibration plate coordinate system ij The corresponding three-dimensional homogeneous coordinates.
[0137] Among them, ‖ ‖ represents the offset distance between the projection coordinate of each corner point in the image coordinate system and the second coordinate in the image coordinate system.
[0138] For the projection optimization function E, the projection optimization function can be solved by the nonlinear least squares optimization algorithm, that is, the third transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to each camera is obtained when the function value of the projection optimization function E is minimized.
[0139] At this time, the third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the first camera when the function value of the projection optimization function is minimized can be determined as the first transformation matrix from the object coordinate system to the camera coordinate system corresponding to the first camera.
[0140] For example, if camera d is the first camera, then the first transformation matrix from the object coordinate system to the camera coordinate system corresponding to the first camera d is Wherein, d is greater than or equal to 1 and less than or equal to K.
[0141] The projection optimization function, determined based on the offset distances corresponding to each corner point, can include only a few unknowns, including the third transformation matrix from the object coordinate system to the camera coordinate system corresponding to each camera, and the fourth transformation matrix from the calibration plate coordinate system to the world coordinate system. This effectively reduces the complexity of the projection optimization function. Furthermore, with fewer unknowns, the computational effort required for the least squares method can be effectively reduced, which helps improve the precision and accuracy of the least squares method. This ensures that the first transformation matrix from the object coordinate system to the camera coordinate system corresponding to the first camera more closely matches the actual transformation between the object coordinate system and the camera coordinate system, thereby providing more accurate data support for subsequent data processing and analysis based on the first transformation matrix.
[0142] In some feasible implementations, for each corner point, when determining the third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera that photographed the corner point, it can be determined whether the camera that photographed the corner point is the first camera.
[0143] If the camera photographing the corner point is the first camera, the preset transformation matrix is determined as a third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera photographing the corner point.
[0144] The preset transformation matrix is an unknown quantity, that is, a third transformation matrix used to represent the object coordinate system to the camera coordinate system of the first camera.
[0145] If the camera that captures the corner point is not the first camera, a fifth transformation matrix from the camera coordinate system corresponding to the first camera to the camera coordinate system corresponding to the camera that captures the corner point can be determined. Then, based on the fifth transformation matrix from the camera coordinate system corresponding to the first camera to the camera coordinate system corresponding to the camera that captures the corner point and the above-mentioned preset matrix, a third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera that captures the corner point can be determined.
[0146] Among them, for each corner point, the fifth transformation matrix from the camera coordinates corresponding to the first camera to the camera coordinate system corresponding to the camera that photographed the corner point is used to represent the coordinate transformation method from the camera coordinate system corresponding to the first camera to the camera coordinate system corresponding to the camera that photographed the corner point.
[0147] Referring to Figure 12, Figure 12 is a fifth schematic diagram of the coordinate system correspondence provided by an embodiment of the present application. Figure 12 shows the correspondence between different camera coordinate systems.
[0148] Among them, each camera on the head-mounted display device corresponds to an independent camera coordinate system. For any two cameras, such as camera 1 and camera 2 in Figure 12, camera coordinate system C1 can be constructed based on camera 1, and camera coordinate system C2 can be constructed based on camera 2. Based on the fifth transformation matrix from camera coordinate system C1 to camera coordinate system C2, the conversion method between the coordinates of any position in the space where cameras 1 and camera 2 are located in camera coordinate system C1 and the coordinates in camera coordinate system C2 can be determined.
[0149] For example, for any position, after determining the coordinates of the position in the camera coordinate system C1, its coordinates in the camera coordinate system C1 can be converted into coordinates in the camera coordinate system C2 based on the fifth transformation matrix. After determining its coordinates in the camera coordinate system C2, its coordinates in the camera coordinate system C2 can also be converted into coordinates in the camera coordinate system C1 based on the fifth transformation matrix.
[0150] As an example, for each corner point, if the third transformation matrix (i.e., the preset transformation matrix) from the object coordinate system to the camera coordinate system corresponding to the first camera w is The fifth transformation matrix from the camera coordinate system corresponding to the first camera w to the camera coordinate system corresponding to the camera k that captured the corner point is Then the third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera k that captured the corner point is Wherein, w is less than or equal to K and greater than or equal to 1, k is the number of cameras, and k is not equal to w.
[0151] Based on this, when the fifth transformation matrix from the target coordinates corresponding to the first camera to the camera coordinate system corresponding to each other camera is known, the projection optimization function can be transformed into:
[0152] At this time, the unknown quantities in the projection optimization function only include and For the projection optimization function E, the projection optimization function can be solved by a nonlinear least squares optimization algorithm, that is, the third transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the first camera is obtained when the function value of the projection optimization function E is minimized.
[0153] When the fifth transformation matrix from the first coordinate system corresponding to the first camera to the camera coordinate system corresponding to each other camera is known, the projection optimization function can be deformed based on each fifth transformation matrix to further reduce the unknown quantities in the projection optimization function, thereby further reducing the difficulty of solving the projection optimization function and improving the accuracy of solving the projection optimization function.
[0154] Step S24: Based on the first transformation matrix and the first motion trajectory of the motion capture object in the world coordinate system when the head-mounted display device moves within the preset time interval, determine the second motion trajectory of the first camera in the world coordinate system within the preset time interval, and adjust the pose estimation parameters of the head-mounted display device based on the second motion trajectory.
[0155] In some feasible implementations, after determining the first transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the target object, the head-mounted display device can be moved in the motion capture site within a preset time interval, and the first motion trajectory of the motion capture object on the head-mounted display device in the world coordinate system can be determined based on the motion capture system.
[0156] Among them, the first motion trajectory of the motion capture object on the head-mounted display device in the world coordinate system can be directly determined based on the relevant data captured by the motion capture system, which will not be explained here.
[0157] Among them, when the head display device moves within a preset time interval, the camera no longer needs to shoot the calibration plate.
[0158] Since the first transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the target object is determined, the first motion trajectory of the motion capture object in the world coordinate system when the head-mounted display device moves within a preset time interval can be converted into the second motion trajectory of the camera in the world coordinate system within the preset time interval based on the first transformation matrix.
[0159] In some feasible implementations, the pose estimation parameters of the head-mounted display device are used to determine the pose information and position information of each camera, thereby determining the offset distance and rotation method of each camera at each moment compared to the previous moment, thereby determining the movement state of each camera. Based on the movement state of each camera, the head-mounted display device can provide the user with an image that matches the camera's movement state through the head-mounted display device, further enabling human-computer interaction.
[0160] Based on this, after determining the second motion trajectory of the first camera in the world coordinate system, if the head-mounted display device moves according to the preset trajectory within a preset time interval, the second motion trajectory of the first camera in the world coordinate system can be compared with the preset trajectory of the first camera in the world coordinate system to determine the first trajectory error of the second motion trajectory of the first camera in the preset time interval to the preset trajectory in the world coordinate system.
[0161] Furthermore, based on the first trajectory error, the pose estimation parameters of the head-mounted display device can be adjusted so that the motion trajectory of the first camera estimated by the head-mounted display device is closer to the preset motion trajectory of the first camera, thereby improving the display effect of the head-mounted display device.
[0162] Optionally, when the head-mounted display device moves within a preset time interval, the head-mounted display device determines the pose information and position information of the first camera at each moment in the preset time interval based on the pose estimation parameters, and then determines the third motion trajectory of the first camera within the preset time interval based on the pose information and position information of the first camera at each moment in the preset time interval, that is, the six-degree-of-freedom trajectory of the first camera within the preset time interval.
[0163] Among them, the third motion trajectory of the first camera within the preset time interval determined by the head display device is the motion trajectory of the first camera in the world coordinate system estimated based on sensors, relevant algorithms, etc.
[0164] Based on this, the second motion trajectory of the first camera in the world coordinate system within the preset time interval can be regarded as the actual motion trajectory of the first camera. Therefore, the second motion trajectory can be compared with the third motion trajectory of the first camera determined by the head-mounted display device to determine the trajectory error between the second motion trajectory and the third motion trajectory.
[0165] Furthermore, based on the trajectory errors of the second motion trajectory and the third motion trajectory, the pose estimation parameters of the head-mounted display device can be adjusted so that the motion trajectory of the first camera estimated by the head-mounted display device is closer to the actual motion trajectory of the first camera, thereby improving the display effect of the head-mounted display device.
[0166] In the embodiment of the present application, after determining the projected coordinates of each corner point in the calibration plate image from the calibration plate coordinate system to the image coordinate system, a first transformation matrix from the object coordinate system to the camera coordinate system corresponding to the first camera on the head-mounted display device can be determined based on the offset between the projected coordinates of each corner point and the coordinates of that corner point in the image coordinate system. This not only avoids the influence of errors caused by the recovered motion trajectory of the first camera when determining the first transformation matrix based on the recovered motion trajectory, but also effectively improves the efficiency of determining the first transformation matrix.
[0167] Furthermore, through the first transformation matrix, the motion trajectory of the motion capture object on the head-mounted display device within a preset time interval can be converted into the actual motion trajectory of the first camera within the preset time interval, so that the posture estimation parameters of the head-mounted display device can be accurately adjusted based on the actual motion trajectory of the first camera, which is conducive to improving the head-mounted display device's estimation accuracy of the six degrees of freedom of the first camera and improving the display effect of the head-mounted display device.
[0168] The various transformation matrices, coordinates, and motion trajectories determined in the embodiments of the present application can be stored in a designated storage space. The designated storage space can be a database, cloud storage, or blockchain, and the specific storage space can be determined based on the actual application scenario requirements and is not limited here.
[0169] In short, a database can be thought of as an electronic filing cabinet—a place where electronic files are stored. It can be a relational database (SQL database) or a non-relational database (NoSQL database), without limitation. In this application, it can be used to store various transformation matrices, coordinates, and motion trajectories. Blockchain is a novel application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a string of data blocks generated through cryptographic methods. In the embodiments of this application, each data block in the blockchain can store various transformation matrices, coordinates, and motion trajectories. Cloud storage is a new concept that extends and develops from the concept of cloud computing. It refers to the use of cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (also called storage nodes) on a network through application software or application interfaces to work together to store various transformation matrices, coordinates, and motion trajectories.
[0170] All computing processes involved in the embodiments of the present application can be implemented based on cloud computing technology in the field of cloud technology to improve computing efficiency.
[0171] Cloud technology refers to a managed technology that unifies hardware, software, and network resources within a wide or local area network (WAN) to enable data computing, storage, processing, and sharing. Cloud computing is a computing model that integrates traditional computer and network technologies, including grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing. Cloud computing distributes computing tasks across a resource pool consisting of a large number of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network that provides these resources is called a "cloud." The resources in the cloud are infinitely scalable and can be accessed at any time, used on demand, and expanded at any time, with a pay-per-use policy.
[0172] The data processing method provided in the embodiments of the present application may include any of the following methods:
[0173] (1): Acquire at least one calibration plate image determined by the head-mounted display device during the movement of the head-mounted display device in the motion capture field, each calibration plate image is captured by a camera of the head-mounted display device, and the head-mounted display device includes at least one camera; determine at least one corner point from the at least one calibration plate image, and determine the projection coordinates of each corner point from the first coordinate in the calibration plate coordinate system to the image coordinate system; determine the second coordinate of each corner point in the image coordinate system, and the offset distance between the projection coordinate and the second coordinate of each corner point; based on the offset distance corresponding to each corner point, determine a first transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the first camera, the first camera being any camera included in the head-mounted display device, and the motion capture object being rigidly connected to the head-mounted display device; based on the first transformation matrix and the first motion trajectory of the motion capture object in the world coordinate system when the head-mounted display device moves within a preset time interval, determine a second motion trajectory of the first camera in the world coordinate system within the preset time interval, and adjust the posture estimation parameters of the head-mounted display device based on the second motion trajectory.
[0174] (2): The data processing method according to (1), wherein the adjusting of the pose estimation parameters of the head-mounted display device based on the second motion trajectory comprises: obtaining a third motion trajectory of the first camera within the preset time interval, the third motion trajectory being determined by the head-mounted display device based on the pose estimation parameters; determining a trajectory error between the third motion trajectory and the second motion trajectory, and adjusting the pose estimation parameters based on the trajectory error between the third motion trajectory and the second motion trajectory.
[0175] (3): The data processing method according to (1), wherein the adjusting of the posture estimation parameters of the head-mounted display device based on the second motion trajectory comprises: obtaining a preset trajectory of the first camera within the preset time interval; determining a trajectory error between the preset trajectory and the second motion trajectory, and adjusting the posture estimation parameters based on the trajectory error between the preset trajectory and the second motion trajectory.
[0176] (4): A data processing method according to any one of (1) to (3), wherein, for each corner point, the projection coordinate of the first coordinate of the corner point in the calibration plate coordinate system to the image coordinate system is determined, including: based on the first coordinate of the corner point in the calibration plate coordinate system, determining the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point; based on the camera intrinsic parameter and the third coordinate, determining the projection coordinate of the first coordinate of the corner point to the image coordinate system.
[0177] (5): The data processing method according to (4), wherein, for each corner point, the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point is determined based on the first coordinate of the corner point in the calibration plate coordinate system, including: determining based on the motion capture system that the calibration plate image where the corner point is located is photographed, a second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located; determining a third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera that photographed the corner point, and a fourth transformation matrix from the calibration plate coordinate system to the world coordinate system; determining the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point based on the second transformation matrix, the third transformation matrix, the fourth transformation matrix and the first coordinate of the corner point in the calibration plate coordinate system; wherein the third transformation matrix, the fourth transformation matrix and the third coordinate are unknown quantities.
[0178] (6): The data processing method according to (5), wherein, for each corner point, determining the third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera that photographs the corner point comprises: in response to the camera that photographs the corner point being the first camera, determining the preset transformation matrix as the third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera that photographs the corner point; in response to the camera that photographs the corner point not being the first camera, determining the fifth transformation matrix from the camera coordinate system corresponding to the first camera to the camera coordinate system corresponding to the camera that photographs the corner point, and determining the third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera that photographs the corner point based on the fifth transformation matrix and the preset transformation matrix; wherein, the preset transformation matrix is an unknown quantity.
[0179] (7): The data processing method according to any one of (5) to (6), wherein the first transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the first camera is determined based on the offset distance corresponding to each of the corner points, including: determining a projection optimization function based on the offset distance corresponding to each of the corner points, the projection optimization function being used to characterize the sum of the squares of the offset distances corresponding to each of the corner points; and determining the third transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the first camera when the function value of the projection optimization function is minimum as the first transformation matrix from the object coordinate system to the camera coordinate system corresponding to the first camera.
[0180] (8) A data processing method according to any one of (5) to (7), wherein, for each corner point, the second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located when the calibration plate image where the corner point is located is photographed based on the motion capture system, includes: the posture information of the motion capture object when the calibration plate image where the corner point is located is photographed based on the motion capture system; and the second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located when the calibration plate image where the corner point is located is photographed based on the posture information of the motion capture object.
[0181] (9): The data processing method according to (8), wherein the method of determining the position information of the motion capture object when the calibration plate image where the corner point is located is photographed based on the motion capture system comprises: capturing the moving picture of the motion capture object in the motion capture field based on the motion capture system, and obtaining the position information of the motion capture object when the calibration plate image where the corner point is located is photographed based on the moving picture of the motion capture object.
[0182] (10): The data processing method according to any one of (4) to (9), wherein the camera intrinsic parameters include focal length parameters and optical center parameters.
[0183] (11): A data processing method according to any one of (1) to (10), wherein, for each corner point, determining the first coordinate of the corner point in the calibration plate coordinate system comprises: determining the position of the corner point in the corresponding calibration plate, the side length of each checkerboard in the calibration plate image where the corner point is located, and the interval between any two checkerboards; and determining the first coordinate of the corner point in the calibration plate coordinate system based on the position of the corner point in the corresponding calibration plate, the side length of each checkerboard in the calibration plate image where the corner point is located, and the interval between any two checkerboards.
[0184] (12): The data processing method according to (11), wherein the method of determining the first coordinate of the corner point in the calibration plate coordinate system based on the position of the corner point in the corresponding calibration plate, the side length of each checkerboard in the calibration plate image where the corner point is located, and the interval between any two checkerboards, comprises: determining the straight-line distance from the corner point to the x-axis of the calibration plate coordinate system and the straight-line distance to the y-axis of the calibration plate coordinate system based on the position of the corner point in the corresponding calibration plate, the side length of each checkerboard in the calibration plate image where the corner point is located, and the interval between any two checkerboards; and determining the first coordinate of the corner point in the calibration plate coordinate system based on the straight-line distance from the corner point to the x-axis of the calibration plate coordinate system and the straight-line distance from the corner point to the y-axis of the calibration plate coordinate system.
[0185] (13): The data processing method according to any one of (1) to (12), wherein, before determining the first coordinate of the corner point in the calibration plate coordinate system, it also includes: determining the calibration plate coordinate system in the calibration plate image where the corner point is located.
[0186] (14): The data processing method according to any one of (1) to (13), wherein determining at least one corner point from at least one calibration plate image comprises: for each calibration plate image, binarizing the calibration plate image based on a local average adaptive thresholding method to obtain a first image, and performing image dilation processing on the first image to obtain a second image; performing quadrilateral detection on the second image, and determining the vertex of each quadrilateral in the second image as a corner point.
[0187] (15): The data processing method according to any one of (1) to (13), wherein determining at least one corner point from at least one calibration plate image comprises: for each calibration plate image, if each checkerboard in the calibration plate image is a QR code, detecting at least one QR code in the calibration plate image based on a QR code detection algorithm, and determining the vertex of each QR code in the calibration plate image as a corner point.
[0188] (16): A data processing method according to any one of (1) to (15), wherein determining the offset distance between the projection coordinates and the second coordinate of each corner point comprises: determining the distance between the projection coordinates of each corner point and the second coordinate of each corner point in the image coordinate system as the offset distance between the projection coordinates and the second coordinate of each corner point.
[0189] It should be noted that when the relevant data involved in the data processing method provided in the embodiments of this application are applied to specific products or technologies, the permission or consent of the relevant objects must be obtained, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0190] See Figure 13, which is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. The data processing device provided in an embodiment of the present application includes:
[0191] An image determination module 131 is configured to obtain at least one calibration plate image determined by the head-mounted display device during movement of the head-mounted display device in the motion capture field, wherein each calibration plate image is captured by a camera of the head-mounted display device, and the head-mounted display device includes at least one camera;
[0192] A coordinate determination module 132 is configured to determine at least one corner point from at least one calibration plate image, and to determine the projection coordinates of each corner point from a first coordinate in the calibration plate coordinate system to a corresponding image coordinate system;
[0193] a matrix determination module 133 configured to determine a second coordinate of each corner point in the image coordinate system, and an offset distance between the projected coordinate and the second coordinate of each corner point, and to determine a first transformation matrix from an object coordinate system of the motion capture object to a camera coordinate system corresponding to a first camera based on the offset distance corresponding to each corner point, wherein the first camera is any one of the cameras included in the head-mounted display device, and the motion capture object is rigidly connected to the head-mounted display device;
[0194] The parameter adjustment module 134 is configured to determine a second motion trajectory of the first camera in the world coordinate system within the preset time interval based on the first transformation matrix and the first motion trajectory of the motion capture object in the world coordinate system when the head-mounted display device moves within the preset time interval, and adjust the pose estimation parameters of the head-mounted display device based on the second motion trajectory.
[0195] Optionally, when the parameter adjustment module 134 adjusts the pose estimation parameters of the head-mounted display device based on the second motion trajectory, it is used to: obtain a third motion trajectory of the first camera within the preset time interval, where the third motion trajectory is determined by the head-mounted display device based on the pose estimation parameters; determine a trajectory error between the third motion trajectory and the second motion trajectory, and adjust the pose estimation parameters based on the trajectory error.
[0196] Optionally, when the parameter adjustment module 134 adjusts the pose estimation parameters of the head-mounted display device based on the second motion trajectory, it is used to: obtain a preset trajectory of the first camera within the preset time interval; determine a trajectory error between the preset trajectory and the second motion trajectory, and adjust the pose estimation parameters based on the trajectory error between the preset trajectory and the second motion trajectory.
[0197] Optionally, for each of the above-mentioned corner points, when the above-mentioned coordinate determination module 132 determines the projection coordinates of the first coordinate of the corner point in the calibration plate coordinate system to the image coordinate system, it is used to: determine the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point based on the first coordinate of the corner point in the calibration plate coordinate system; and determine the projection coordinates of the first coordinate of the corner point to the image coordinate system based on the camera intrinsic parameters and the above-mentioned third coordinate.
[0198] Optionally, for each of the above-mentioned corner points, when the above-mentioned coordinate determination module 132 determines the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point based on the first coordinate of the corner point in the calibration plate coordinate system, it is used to: determine based on the motion capture system that when the calibration plate image where the corner point is located is photographed, the second transformation matrix from the world coordinate system corresponding to the above-mentioned motion capture system to the object coordinate system where the above-mentioned motion capture object is located; determine the third transformation matrix from the above-mentioned object coordinate system to the camera coordinate system corresponding to the camera that photographed the corner point, and the fourth transformation matrix from the calibration plate coordinate system to the above-mentioned world coordinate system; determine the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point based on the above-mentioned second transformation matrix, the above-mentioned third transformation matrix, the above-mentioned fourth transformation matrix and the first coordinate of the corner point in the above-mentioned calibration plate coordinate system; wherein the above-mentioned third transformation matrix, the above-mentioned fourth transformation matrix and the above-mentioned third coordinate are unknown quantities.
[0199] Optionally, for each of the above-mentioned corner points, when the above-mentioned coordinate determination module 132 determines the third transformation matrix from the above-mentioned object coordinate system to the camera coordinate system corresponding to the camera that photographs the corner point, it is used to: in response to the camera photographing the corner point being the first camera, determine the preset transformation matrix as the third transformation matrix from the above-mentioned object coordinate system to the camera coordinate system corresponding to the camera photographing the corner point; in response to the camera photographing the corner point not being the above-mentioned first camera, determine the fifth transformation matrix from the camera coordinate system corresponding to the above-mentioned first camera to the camera coordinate system corresponding to the camera photographing the corner point, and determine the third transformation matrix from the above-mentioned object coordinate system to the camera coordinate system corresponding to the camera photographing the corner point based on the above-mentioned fifth transformation matrix and the above-mentioned preset transformation matrix; wherein, the above-mentioned preset transformation matrix is an unknown quantity.
[0200] Optionally, when the matrix determination module 133 determines the first transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the first camera based on the offset distances corresponding to the corner points, it is used to: determine a projection optimization function based on the offset distances corresponding to the corner points, where the projection optimization function is used to characterize the sum of the squares of the offset distances corresponding to the corner points; and determine the third transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the first camera when the function value of the projection optimization function is minimum as the first transformation matrix from the object coordinate system to the camera coordinate system corresponding to the first camera.
[0201] Optionally, for each of the above-mentioned corner points, the above-mentioned coordinate determination module 132 is used to: determine the posture information of the motion capture object when the calibration plate image where the corner point is located is photographed based on the motion capture system, and determine the second transformation matrix from the world coordinate system corresponding to the above-mentioned motion capture system to the object coordinate system where the motion capture object is located when the calibration plate image where the corner point is located is photographed based on the motion capture system; determine the second transformation matrix from the world coordinate system corresponding to the above-mentioned motion capture system to the object coordinate system where the motion capture object is located when the calibration plate image where the corner point is located is photographed based on the posture information of the above-mentioned motion capture object.
[0202] Optionally, when the coordinate determination module 132 determines the posture information of the motion capture object when the calibration plate image where the corner point is located is photographed based on the motion capture system, it is used to: capture the moving picture of the motion capture object in the motion capture field based on the motion capture system, and analyze the moving picture of the motion capture object to obtain the posture information of the motion capture object when the calibration plate image where the corner point is located is photographed.
[0203] Optionally, the camera intrinsic parameters include focal length parameters and optical center parameters.
[0204] Optionally, for each of the above-mentioned corner points, when the above-mentioned coordinate determination module 132 determines the first coordinate of the corner point in the calibration plate coordinate system, it is used to: determine the position of the corner point in the corresponding calibration plate, the side length of each chessboard in the calibration plate image where the corner point is located, and the interval between any two chessboards; based on the position of the corner point in the corresponding calibration plate, the side length of each chessboard in the calibration plate image where the corner point is located, and the interval between any two chessboards, determine the first coordinate of the corner point in the calibration plate coordinate system.
[0205] Optionally, when the coordinate determination module 132 determines the first coordinate of the corner point in the calibration plate coordinate system based on the position of the corner point in the corresponding calibration plate, the side length of each checkerboard in the calibration plate image where the corner point is located, and the interval between any two checkerboards, it is used to: determine the straight-line distance from the corner point to the x-axis of the calibration plate coordinate system and the straight-line distance to the y-axis of the calibration plate coordinate system based on the position of the corner point in the corresponding calibration plate, the side length of each checkerboard in the calibration plate image where the corner point is located, and the interval between any two checkerboards; determine the first coordinate of the corner point in the calibration plate coordinate system according to the straight-line distance from the corner point to the x-axis of the calibration plate coordinate system and the straight-line distance from the corner point to the y-axis of the calibration plate coordinate system.
[0206] Optionally, before determining the first coordinate of the corner point in the calibration plate coordinate system, the coordinate determining module 132 is further configured to: determine the calibration plate coordinate system in the calibration plate image where the corner point is located.
[0207] Optionally, when the coordinate determination module 132 determines at least one corner point from at least one calibration plate image, it is used to: for each calibration plate image, binarize the calibration plate image based on a local average adaptive thresholding method to obtain a first image, and perform image dilation on the first image to obtain a second image; perform quadrilateral detection on the second image, and determine the vertex of each quadrilateral in the second image as a corner point.
[0208] Optionally, when the coordinate determination module 132 determines at least one corner point from at least one calibration plate image, it is used to: for each calibration plate image, if each checkerboard in the calibration plate image is a QR code, then detect at least one QR code in the calibration plate image based on the QR code detection algorithm, and determine the vertex of each QR code in the calibration plate image as a corner point.
[0209] Optionally, when the above-mentioned matrix determination module 133 determines the offset distance between the projection coordinates and the second coordinate of each corner point, it is used to: determine the distance between the projection coordinates of each corner point and the second coordinate of each corner point in the image coordinate system as the offset distance between the projection coordinates and the second coordinate of each corner point.
[0210] In a specific implementation, the above-mentioned data processing device can execute the implementation methods provided by the various steps in Figure 2 through its built-in functional modules. For details, please refer to the implementation methods provided by the above-mentioned steps, which will not be repeated here.
[0211] Referring to Figure 14, Figure 14 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in Figure 14, the electronic device 1400 in this embodiment may include: a processor 1401, a network interface 1404 and a memory 1405. In addition, the electronic device 1400 may further include: an object interface 1403, and at least one communication bus 1402. Wherein, the communication bus 1402 is used to realize the connection and communication between these components. Wherein, the object interface 1403 may include a display screen (Display), a keyboard (Keyboard), and the optional object interface 1403 may also include a standard wired interface and a wireless interface. The network interface 1404 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1405 may be a high-speed RAM memory or a non-volatile memory (NVM), such as at least one disk storage. The memory 1405 may optionally be at least one storage device located away from the aforementioned processor 1401. As shown in Figure 14, the memory 1405 as a computer-readable storage medium may include an operating system, a network communication module, an object interface module and a device control application.
[0212] In the electronic device 1400 shown in FIG14 , the network interface 1404 can provide network communication functions; the object interface 1403 is mainly used to provide an input interface for the object; and the processor 1401 can be used to call the device control application stored in the memory 1405 to achieve:
[0213] The method includes obtaining at least one calibration plate image determined by the head-mounted display device during movement in a motion capture environment, each calibration plate image being captured by a camera of the head-mounted display device, the head-mounted display device including at least one camera; determining at least one corner point from the at least one calibration plate image, and determining a projection coordinate of each corner point from a first coordinate in the calibration plate coordinate system to an image coordinate system; determining a second coordinate in the image coordinate system for each corner point, and an offset distance between the projection coordinate and the second coordinate for each corner point; and determining a first transformation matrix from an object coordinate system where a motion capture object is located to a camera coordinate system corresponding to a first camera based on the offset distance corresponding to each corner point, wherein the first camera is any camera included in the head-mounted display device, and the motion capture object is rigidly connected to the head-mounted display device; and determining a second motion trajectory of the first camera in the world coordinate system within the preset time interval based on the first transformation matrix and a first motion trajectory of the motion capture object in the world coordinate system when the head-mounted display device moves within a preset time interval, and adjusting pose estimation parameters of the head-mounted display device based on the second motion trajectory.
[0214] Optionally, the processor 1401 is configured to: obtain a third motion trajectory of the first camera within the preset time interval, where the third motion trajectory is determined by the head-mounted display device based on posture estimation parameters; determine a trajectory error between the third motion trajectory and the second motion trajectory, and adjust the posture estimation parameters based on the trajectory error between the third motion trajectory and the second motion trajectory.
[0215] Optionally, the processor 1401 is configured to: obtain a preset trajectory of the first camera within the preset time interval;
[0216] Determine a trajectory error between the preset trajectory and the second motion trajectory, and adjust the pose estimation parameters based on the trajectory error between the preset trajectory and the second motion trajectory.
[0217] Optionally, for each of the above-mentioned corner points, the above-mentioned processor 1401 is used to: determine the third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point based on the first coordinate of the corner point in the calibration plate coordinate system; and determine the projection coordinate of the first coordinate of the corner point to the image coordinate system based on the camera intrinsic parameter and the above-mentioned third coordinate.
[0218] Optionally, for each of the above-mentioned corner points, the above-mentioned processor 1401 is used to: determine, based on the motion capture system, when the calibration plate image where the corner point is located is captured, the second transformation matrix from the world coordinate system corresponding to the above-mentioned motion capture system to the object coordinate system where the above-mentioned motion capture object is located; determine the third transformation matrix from the above-mentioned object coordinate system to the camera coordinate system corresponding to the camera that captures the corner point, and the fourth transformation matrix from the calibration plate coordinate system to the above-mentioned world coordinate system; based on the above-mentioned second transformation matrix, the above-mentioned third transformation matrix, the above-mentioned fourth transformation matrix and the first coordinate of the corner point in the above-mentioned calibration plate coordinate system, determine the third coordinate of the corner point in the camera coordinate system corresponding to the camera that captures the corner point; wherein the above-mentioned third transformation matrix, the above-mentioned fourth transformation matrix and the above-mentioned third coordinate are unknown quantities.
[0219] Optionally, for each of the above-mentioned corner points, the above-mentioned processor 1401 is used to: in response to the camera that captures the corner point being the first camera, determine the preset transformation matrix as the third transformation matrix from the above-mentioned object coordinate system to the camera coordinate system corresponding to the camera that captures the corner point; in response to the camera that captures the corner point not being the above-mentioned first camera, determine the fifth transformation matrix from the camera coordinate system corresponding to the above-mentioned first camera to the camera coordinate system corresponding to the camera that captures the corner point, and determine the third transformation matrix from the above-mentioned object coordinate system to the camera coordinate system corresponding to the camera that captures the corner point based on the above-mentioned fifth transformation matrix and the above-mentioned preset transformation matrix; wherein the above-mentioned preset transformation matrix is an unknown quantity.
[0220] Optionally, the processor 1401 is used to: determine a projection optimization function based on the offset distance corresponding to each of the corner points, where the projection optimization function is used to characterize the sum of the squares of the offset distances corresponding to each of the corner points; and determine the third transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the first camera when the function value of the projection optimization function is minimum as the first transformation matrix from the object coordinate system to the camera coordinate system corresponding to the first camera.
[0221] Optionally, for each of the above-mentioned corner points, the above-mentioned processor 1401 is used to: determine, based on the motion capture system, the posture information of the above-mentioned motion capture object when the calibration plate image where the corner point is located is photographed; and determine, based on the posture information of the above-mentioned motion capture object, the second transformation matrix from the world coordinate system corresponding to the above-mentioned motion capture system to the object coordinate system where the above-mentioned motion capture object is located when the calibration plate image where the corner point is located is photographed.
[0222] Optionally, the above-mentioned processor 1401 is used to: capture the moving picture of the motion capture object in the motion capture site based on the motion capture system, and analyze the moving picture of the motion capture object to obtain the posture information of the motion capture object when the calibration plate image where the corner point is located is captured.
[0223] Optionally, the camera intrinsic parameters include focal length parameters and optical center parameters.
[0224] Optionally, for each of the above-mentioned corner points, the above-mentioned processor 1401 is used to: determine the position of the corner point in the corresponding calibration plate, the side length of each chessboard in the calibration plate image where the corner point is located, and the interval between any two chessboards; based on the position of the corner point in the corresponding calibration plate, the side length of each chessboard in the calibration plate image where the corner point is located, and the interval between any two chessboards, determine the first coordinate of the corner point in the calibration plate coordinate system.
[0225] Optionally, the above-mentioned processor 1401 is used to: determine the straight-line distance from the corner point to the x-axis of the calibration plate coordinate system and the straight-line distance from the corner point to the y-axis of the calibration plate coordinate system based on the position of the corner point in the corresponding calibration plate, the side length of each checkerboard in the calibration plate image where the corner point is located, and the interval between any two checkerboards; determine the first coordinate of the corner point in the calibration plate coordinate system according to the straight-line distance from the corner point to the x-axis of the calibration plate coordinate system and the straight-line distance from the corner point to the y-axis of the calibration plate coordinate system.
[0226] Optionally, the processor 1401 is configured to determine a calibration plate coordinate system in the calibration plate image where the corner point is located.
[0227] Optionally, the above-mentioned processor 1401 is used to: for each of the calibration plate images, binarize the calibration plate image based on the local average adaptive thresholding method to obtain a first image, and perform image dilation processing on the first image to obtain a second image; perform quadrilateral detection on the second image, and determine the vertex of each quadrilateral in the second image as a corner point.
[0228] Optionally, the above-mentioned processor 1401 is used to: for each of the calibration plate images, if each checkerboard in the calibration plate image is a QR code, detect at least one QR code in the calibration plate image based on the QR code detection algorithm, and determine the vertex of each QR code in the calibration plate image as a corner point.
[0229] Optionally, the processor 1401 is configured to determine the distance between the projection coordinates of each corner point and the second coordinate of each corner point in the image coordinate system as an offset distance between the projection coordinates and the second coordinate of each corner point.
[0230] It should be understood that in some feasible embodiments, the processor 1401 may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store device type information.
[0231] In a specific implementation, the electronic device 1400 can execute the implementation methods provided in the steps of FIG. 2 through its built-in functional modules. For details, please refer to the implementation methods provided in the steps, which will not be repeated here.
[0232] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program and is executed by a processor to implement the method provided in each step of Figure 2. For details, please refer to the implementation methods provided in the above steps, which will not be repeated here.
[0233] The above-mentioned computer-readable storage medium can be the internal storage unit of the data processing device or electronic device provided in any of the aforementioned embodiments, such as the hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk equipped on the electronic device, a smart memory card (SMC), a secure digital (SD) card, a flash card, etc. The above-mentioned computer-readable storage medium can also include a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. Further, the computer-readable storage medium can also include both the internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0234] An embodiment of the present application provides a computer program product, which includes a computer program. The computer program is used by a processor to execute the method provided by each step in Figure 2.
[0235] The terms "first," "second," and the like in the claims, specification, and drawings of this application are used to distinguish between different objects, not to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or electronic device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or electronic device. Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The presence of such a phrase in various locations in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive with other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments. The term "and / or," as used in this specification and the appended claims, refers to any and all possible combinations of one or more of the associated listed items, including, but not limited to, those combinations.
[0236] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the above description generally describes the components and steps of each example according to their functions. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0237] The above disclosure is only a preferred embodiment of the present application and cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A data processing method, characterized in that: The method comprises: Acquire at least one calibration plate image determined by the head-mounted display device during movement of the head-mounted display device in the motion capture field, wherein each of the calibration plate images is captured by a camera of the head-mounted display device, and the head-mounted display device includes at least one camera; Determine at least one corner point from at least one of the calibration plate images, and determine the projection coordinates of each corner point from the first coordinate in the calibration plate coordinate system to the image coordinate system; Determine a second coordinate of each corner point in the image coordinate system, and an offset distance between the projection coordinate of each corner point and the second coordinate, and determine a first transformation matrix from an object coordinate system where the motion capture object is located to a camera coordinate system corresponding to a first camera based on the offset distance corresponding to each corner point, wherein the first camera is any one of the cameras included in the head display device, and the motion capture object is rigidly connected to the head display device; Based on the first transformation matrix and a first motion trajectory of the motion capture object in a world coordinate system when the head-mounted display device moves within a preset time interval, a second motion trajectory of the first camera in the world coordinate system within the preset time interval is determined, and based on the second motion trajectory, the posture estimation parameters of the head-mounted display device are adjusted.
2. The method according to claim 1, characterized in that The adjusting the posture estimation parameters of the head display device based on the second motion trajectory includes: Acquire a third motion trajectory of the first camera within the preset time interval, where the third motion trajectory is determined by the head display device based on a posture estimation parameter; Determine a trajectory error between the third motion trajectory and the second motion trajectory, and adjust the posture estimation parameters based on the trajectory error between the third motion trajectory and the second motion trajectory.
3. The method according to claim 1, characterized in that The adjusting the posture estimation parameters of the head display device based on the second motion trajectory includes: Acquire a preset trajectory of the first camera within the preset time interval; Determine a trajectory error between the preset trajectory and the second motion trajectory, and adjust the posture estimation parameters based on the trajectory error between the preset trajectory and the second motion trajectory.
4. The method according to claim 1, characterized in that: For each corner point, determining the projection coordinates of the corner point from the first coordinate of the calibration plate coordinate system to the image coordinate system includes: Based on the first coordinate of the corner point in the calibration plate coordinate system, determine the third coordinate of the corner point in the camera coordinate system corresponding to the camera photographing the corner point; Based on the camera intrinsic parameters and the third coordinate, the projection coordinates of the first coordinate of the corner point to the image coordinate system are determined.
5. The method according to claim 4, characterized in that For each of the corner points, determining, based on the first coordinate of the corner point in the calibration plate coordinate system, a third coordinate of the corner point in the camera coordinate system corresponding to the camera photographing the corner point includes: When the calibration plate image where the corner point is located is determined based on the motion capture system, a second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located; Determine a third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera that photographs the corner point, and a fourth transformation matrix from the calibration plate coordinate system to the world coordinate system; Determine, based on the second transformation matrix, the third transformation matrix, the fourth transformation matrix, and the first coordinate of the corner point in the calibration plate coordinate system, a third coordinate of the corner point in the camera coordinate system corresponding to the camera that photographed the corner point; Among them, the third transformation matrix, the fourth transformation matrix and the third coordinate are unknown quantities.
6. The method according to claim 5, characterized in that For each corner point, determining a third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera photographing the corner point includes: In response to the camera photographing the corner point being the first camera, determining the preset transformation matrix as a third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera photographing the corner point; In response to the camera photographing the corner point not being the first camera, determining a fifth transformation matrix from a camera coordinate system corresponding to the first camera to a camera coordinate system corresponding to the camera photographing the corner point, and determining a third transformation matrix from the object coordinate system to the camera coordinate system corresponding to the camera photographing the corner point based on the fifth transformation matrix and the preset transformation matrix; Among them, the preset transformation matrix is an unknown quantity.
7. The method according to claim 5, characterized in that The step of determining a first transformation matrix from an object coordinate system where the motion capture object is located to a camera coordinate system corresponding to the first camera based on the offset distances corresponding to the corner points includes: Determine a projection optimization function based on the offset distances corresponding to the corner points, wherein the projection optimization function is used to characterize the sum of squares of the offset distances corresponding to the corner points; The third transformation matrix from the object coordinate system where the motion capture object is located to the camera coordinate system corresponding to the first camera when the function value of the projection optimization function is minimum is determined as the first transformation matrix from the object coordinate system to the camera coordinate system corresponding to the first camera.
8. The method according to claim 5, characterized in that For each corner point, when the calibration plate image where the corner point is located is captured based on the motion capture system, the second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located includes: Determine, based on the motion capture system, the position and posture information of the motion capture object when the calibration plate image where the corner point is located is captured; A second transformation matrix from the world coordinate system corresponding to the motion capture system to the object coordinate system where the motion capture object is located is determined based on the position and posture information of the motion capture object when the calibration plate image where the corner point is located is captured.
9. The method according to claim 8, characterized in that The position information of the motion capture object when the calibration plate image where the corner point is located is determined based on the motion capture system includes: The motion capture system captures the moving picture of the motion capture object in the motion capture field, and analyzes the moving picture of the motion capture object to obtain the position and posture information of the motion capture object when the calibration plate image where the corner point is located is photographed.
10. The method according to claim 4, characterized in that The camera internal parameters include focal length parameters and optical center parameters.
11. The method according to claim 1, characterized in that: For each corner point, determining a first coordinate of the corner point in the calibration plate coordinate system includes: Determine the position of the corner point in the corresponding calibration plate, the side length of each chessboard grid in the calibration plate image where the corner point is located, and the interval between any two chessboard grids; Based on the position of the corner point in the corresponding calibration plate, the side length of each chessboard in the calibration plate image where the corner point is located, and the interval between any two chessboards, the first coordinate of the corner point in the calibration plate coordinate system is determined.
12. The method according to claim 11, characterized in that The determining of the first coordinate of the corner point in the calibration plate coordinate system based on the position of the corner point in the corresponding calibration plate, the side length of each chessboard in the calibration plate image where the corner point is located, and the interval between any two chessboards, comprises: Based on the position of the corner point in the corresponding calibration plate, the side length of each chessboard in the calibration plate image where the corner point is located, and the interval between any two chessboards, determine the straight-line distance from the corner point to the x-axis of the calibration plate coordinate system and the straight-line distance from the corner point to the y-axis of the calibration plate coordinate system; The first coordinate of the corner point in the calibration plate coordinate system is determined according to the straight-line distance from the corner point to the x-axis of the calibration plate coordinate system and the straight-line distance from the corner point to the y-axis of the calibration plate coordinate system.
13. The method according to claim 11, characterized in that Before determining the first coordinate of the corner point in the calibration plate coordinate system, the method further includes: Determine the calibration plate coordinate system in the calibration plate image where the corner point is located.
14. The method according to claim 1, characterized in that Determining at least one corner point from at least one calibration plate image comprises: For each of the calibration plate images, binarizing the calibration plate image based on a local average adaptive thresholding method to obtain a first image, and dilating the first image to obtain a second image; Quadrilateral detection is performed on the second image, and the vertex of each quadrilateral in the second image is determined as a corner point.
15. The method according to claim 1, characterized in that Determining at least one corner point from at least one calibration plate image comprises: For each of the calibration plate images, if each checkerboard in the calibration plate image is a two-dimensional code, at least one two-dimensional code in the calibration plate image is detected based on a two-dimensional code detection algorithm, and the vertex of each two-dimensional code in the calibration plate image is determined as a corner point.
16. The method according to claim 1, characterized in that Determining the offset distance between the projection coordinates and the second coordinates of each corner point comprises: The distance between the projection coordinates of each corner point and the second coordinate of each corner point in the image coordinate system is determined as an offset distance between the projection coordinates and the second coordinate of each corner point.
17. A data processing device, characterized in that: The device comprises: An image determination module, configured to obtain at least one calibration plate image determined by the head-mounted display device during movement of the head-mounted display device in the motion capture field, wherein each of the calibration plate images is captured by a camera of the head-mounted display device, and the head-mounted display device includes at least one camera; A coordinate determination module, used to determine at least one corner point from at least one of the calibration plate images, and determine the projection coordinates of each corner point from the first coordinate of the calibration plate coordinate system to the image coordinate system; a matrix determination module, configured to determine a second coordinate of each corner point in the image coordinate system and an offset distance between the projection coordinate of each corner point and the second coordinate, and determine a first transformation matrix from an object coordinate system where the motion capture object is located to a camera coordinate system corresponding to a first camera based on the offset distance corresponding to each corner point, wherein the first camera is any one of the cameras included in the head display device, and the motion capture object is rigidly connected to the head display device; A parameter adjustment module is used to determine a second motion trajectory of the first camera in the world coordinate system within the preset time interval based on the first transformation matrix and the first motion trajectory of the motion capture object in the world coordinate system when the head display device moves within the preset time interval, and adjust the posture estimation parameters of the head display device based on the second motion trajectory.
18. An electronic device, characterized in that: comprising a processor and a memory, wherein the processor and the memory are connected to each other; The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 16 when calling the computer program.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 16.
20. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.
