Method and device for determining the position and posture of a tracked object during image tracking
By utilizing the relative relationship between the camera equipment and the environmental space and the object feature information, and converting it into the relative relationship between the tracking object and the camera equipment, the problem of insufficient training samples of the deep learning model and loss of pose information in image tracking is solved, and efficient positioning is achieved. The posture is determined.
Patent Information
- Application Number
- CN202011284180.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-17
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-11-17
AI Technical Summary
In existing image tracking technology, deep learning models require a large number of training samples and convolution pooling results in the loss of pose information. It is difficult to determine the pose of the tracking object in image tracking without deep learning.
The first point cloud information is obtained by using the relative relationship between the camera device and the environmental space, and combined with the object feature information about the relative relationship between the tracking object and the environmental space, it is converted into the relative relationship between the tracking object and the camera device, thereby determining the pose of the tracking object.
The pose of the tracked object can be efficiently determined without the need for a deep learning model, simplifying the pose determination process, improving processing efficiency and reducing dependence on training samples.
Smart Images

Figure CN112396654B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular, to a method and device for determining the position and posture of a tracked object during an image tracking process. Background Art
[0002] Image tracking technology locates the object captured by the camera through image recognition, infrared, ultrasonic, etc. Image tracking technology is widely used in the field of computer vision, such as virtual reality (VR) and augmented reality (AR).
[0003] At present, image tracking technology is combined with deep learning to achieve image tracking, which mainly uses online learning and neural network models. Both online learning and neural network models are applied to image tracking after training. In the image tracking process, each frame of the image is input into the trained online learning model or neural network model, and then the online learning model or neural network model outputs the position and posture information of the tracked object.
[0004] However, there are some problems with image tracking using deep learning. For example, the deep learning model applied to image tracking needs to be trained, and model training requires a large number of training samples. It is currently difficult to provide a large number of training samples, especially for online learning models. In addition, due to the convolution pooling effect of the neural network model, the position information of the last layer output is lost, and the pose information mainly contains position information. In view of this, how to determine the pose of the tracked object in image tracking without applying deep learning is an urgent problem to be solved. Summary of the invention
[0005] In view of the above, the present disclosure provides a method and device for determining the position and posture of a tracked object during image tracking. In the scheme for determining the position and posture provided by the present disclosure, the first point cloud information is based on the relative relationship between the camera device and the environmental space, and the object feature information of the tracked object is based on the relative relationship between the tracked object and the environmental space. The first point cloud information of the current frame image is used to convert the relative relationship between the tracked object and the environmental space represented by the object feature information into the relative relationship between the tracked object and the camera device, thereby determining the position and posture of the tracked object. By using the first point cloud information to convert the relative relationship of the tracked object, it is convenient to determine the position and posture of the tracked object.
[0006] According to one aspect of the present disclosure, a method for determining the posture of a tracked object during image tracking is provided, comprising: acquiring a current frame image and first point cloud information corresponding to the current frame image, wherein the first point cloud information is based on the relative relationship between a camera device and an environmental space; and when the tracked object is static, determining the posture of the tracked object in the current frame image relative to the camera device according to the first point cloud information and object feature information of the tracked object, wherein the object feature information is based on the relative relationship between the tracked object and the environmental space.
[0007] Optionally, in an example of the above aspect, it also includes: determining the state of the tracked object according to the first point cloud information, the object feature information of the tracked object and the point cloud information of the previous frame image, the state including static and dynamic.
[0008] Optionally, in an example of the above aspect, determining the state of the tracked object according to the first point cloud information, the object feature information of the tracked object and the point cloud information of the previous frame image includes: determining a first matching feature point set of the tracked object in the current frame image according to the first point cloud information and the object feature information of the tracked object; determining the state of the tracked object according to the first matching feature point set and a second matching feature point set of the previous frame image, wherein the second matching feature point set includes a second matching feature point pair obtained according to the point cloud information of the previous frame image and the object feature information; and when the tracked object is static, determining the position and posture of the tracked object in the current frame image relative to the camera device according to the first point cloud information and the object feature information includes: when the tracked object is static, using the first matching feature point set to determine the position and posture of the tracked object in the current frame image relative to the camera device.
[0009] Optionally, in an example of the above aspect, it also includes: when the tracking object list does not include the tracking object, determining the number of matching point pairs in the first matching feature point set, or determining the number of matching point pairs between the feature information extracted from the current frame image and the object feature information, wherein the tracking object list is used to record the tracking objects to be tracked during the image tracking process; and when the determined number is greater than a number threshold, determining the state of the tracking object according to the determined matching point pairs; and determining the state of the tracking object according to the first matching feature point set and the second matching feature point set of the previous frame image includes: when the tracking object list includes the tracking object, determining the state of the tracking object according to the first matching feature point set and the second matching feature point set of the previous frame image.
[0010] Optionally, in an example of the above aspect, the second matching feature point set of the previous frame image is determined based on the tracked object in the previous frame image being in a static state.
[0011] Optionally, in an example of the above aspect, the first point cloud information is obtained based on the current frame image and the static corresponding historical frame image.
[0012] Optionally, in an example of the above aspect, it also includes: when specified conditions are met, performing feature extraction on the current frame image; matching the extracted feature information with the object feature information to obtain a matching point pair for the tracked object; and determining the posture of the tracked object in the current frame image relative to the camera device based on the obtained matching point pair.
[0013] Optionally, in an example of the above aspect, determining the position and posture of the tracked object in the current frame image relative to the camera device based on the obtained matching point pairs includes: when the number of obtained matching point pairs is greater than a specified threshold, determining the position and posture of the tracked object in the current frame image relative to the camera device based on the obtained matching point pairs.
[0014] Optionally, in an example of the above aspect, the specified condition includes any one of the following conditions: the current frame image is the first frame image; there is currently no tracked object; determining the pose using the first point cloud information fails; and the tracked object is dynamic.
[0015] Optionally, in an example of the above aspect, matching the extracted feature information with the object feature information to obtain a matching point pair for the tracked object includes: matching the extracted feature information with the object feature information based on the posture of the tracked object in the previous frame image to obtain a matching point pair for the tracked object.
[0016] Optionally, in an example of the above aspect, point cloud information of each frame image is extracted using a SLAM algorithm.
[0017] According to another aspect of the present disclosure, a device for determining the posture of a tracked object during image tracking is also provided, including: a point cloud acquisition unit, configured to acquire a current frame image and first point cloud information corresponding to the current frame image, wherein the first point cloud information is based on the relative relationship between a camera device and an environmental space; and a posture determination unit, configured to determine the posture of the tracked object in the current frame image relative to the camera device according to the first point cloud information and object feature information of the tracked object when the tracked object is static, wherein the object feature information is based on the relative relationship between the tracked object and the environmental space.
[0018] Optionally, in an example of the above aspect, it also includes: a state determination unit, configured to determine the state of the tracked object based on the first point cloud information, the object feature information of the tracked object and the point cloud information of the previous frame image, the state including static and dynamic.
[0019] Optionally, in an example of the above aspect, the state determination unit is configured to: determine a first matching feature point set of the tracked object in the current frame image based on the first point cloud information and the object feature information of the tracked object; determine the state of the tracked object based on the first matching feature point set and a second matching feature point set of a previous frame image, wherein the second matching feature point set includes a second matching feature point pair obtained based on the point cloud information of the previous frame image and the object feature information; and the posture determination unit is configured to use the first matching feature point set to determine the posture of the tracked object in the current frame image relative to the camera device when the tracked object is static.
[0020] Optionally, in an example of the above aspect, it also includes: a matching point pair determination unit, configured to determine the number of matching point pairs in the first matching feature point set when the tracking object list does not include the tracking object, or determine the number of matching point pairs of the feature information extracted from the current frame image and the object feature information, wherein the tracking object list is used to record the tracking objects to be tracked during the image tracking process; and the state determination unit is also configured to: determine the state of the tracking object according to the determined matching point pairs when the determined number is greater than a number threshold; and determine the state of the tracking object according to the first matching feature point set and the second matching feature point set of the previous frame image when the tracking object list includes the tracking object.
[0021] Optionally, in an example of the above aspect, it also includes: a feature extraction unit, configured to extract features from the current frame image when specified conditions are met; a feature matching unit, configured to match the extracted feature information with the object feature information to obtain a matching point pair for the tracked object; and the posture determination unit, configured to determine the posture of the tracked object in the current frame image relative to the camera device based on the obtained matching point pair.
[0022] Optionally, in an example of the above aspect, the posture determination unit is configured to: when the number of obtained matching point pairs is greater than a specified threshold, determine the posture of the tracked object in the current frame image relative to the camera device based on the obtained matching point pairs.
[0023] Optionally, in an example of the above aspect, the feature matching unit is configured to: match the extracted feature information with the object feature information based on the posture of the tracked object in the previous frame image to obtain a matching point pair of the tracked object.
[0024] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory, wherein the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one processor executes the method for determining the posture of a tracked object during image tracking as described above.
[0025] According to another aspect of the present disclosure, a machine-readable storage medium is provided, which stores executable instructions. When the instructions are executed, the machine executes the method for determining the position and posture of a tracked object in an image tracking process as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] A further understanding of the nature and advantages of the present disclosure may be achieved by referring to the following drawings.In the accompanying drawings, similar components or features may have the same reference numeral.
[0027] Figure 1 A flowchart of an example of a method for determining the position and posture of a tracked object during image tracking according to an embodiment of the present disclosure is shown.
[0028] Figure 2 A schematic diagram showing an example of the relative relationship among an environment space, a camera device, and a tracking object according to the present disclosure.
[0029] Figure 3 A schematic diagram is shown of an example of obtaining first point cloud information based on multiple frame images according to the present disclosure.
[0030] Figure 4 A flowchart of another example of a method for determining the position and pose of a tracked object during image tracking according to an embodiment of the present disclosure is shown.
[0031] Figure 5 A flowchart showing an example of a method for determining a state of a tracked object according to an embodiment of the present disclosure is shown.
[0032] Figure 6 A flowchart of an example of a method for determining a pose based on extracted feature information and object feature information according to an embodiment of the present disclosure is shown.
[0033] Figure 7 A block diagram showing an example of a device for determining the position and posture of a tracked object during image tracking according to an embodiment of the present disclosure is shown.
[0034] Figure 8 A block diagram of an electronic device implementing a method for determining a position and posture of a tracked object during image tracking according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0035] The subject matter described herein will be discussed below with reference to example implementations. It should be understood that the discussion of these implementations is only to enable those skilled in the art to better understand and implement the subject matter described herein, and is not a limitation of the scope of protection, applicability or examples set forth in the claims. The functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the present disclosure. Various examples may omit, replace or add various processes or components as needed. In addition, the features described relative to some examples may also be combined in other examples.
[0036] As used herein, the term "including" and its variations represent open terms, meaning "including but not limited to". The term "based on" means "based at least in part on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other definitions may be included below, whether explicit or implicit. Unless the context clearly indicates otherwise, the definition of a term is consistent throughout the specification.
[0037] Image tracking technology locates objects captured by a camera through image recognition, infrared, ultrasonic, etc. Image tracking technology is widely used in the field of computer vision, such as virtual reality and augmented reality.
[0038] At present, image tracking technology is combined with deep learning to achieve image tracking, which mainly uses online learning and neural network models. Both online learning and neural network models are applied to image tracking after training. In the image tracking process, each frame of the image is input into the trained online learning model or neural network model, and then the online learning model or neural network model outputs the position and posture information of the tracked object.
[0039] However, there are some problems with image tracking using deep learning. For example, the deep learning model applied to image tracking needs to be trained, and model training requires a large number of training samples. It is currently difficult to provide a large number of training samples, especially for online learning models. In addition, due to the convolution pooling effect of the neural network model, the position information of the last layer output is lost, and the pose information mainly contains position information. In view of this, how to determine the pose of the tracked object in image tracking without applying deep learning is an urgent problem to be solved.
[0040] In view of the above, the present disclosure provides a method and device for determining the position and posture of a tracked object during image tracking. In the scheme for determining the position and posture provided by the present disclosure, the first point cloud information is based on the relative relationship between the camera device and the environmental space, and the object feature information of the tracked object is based on the relative relationship between the tracked object and the environmental space. The first point cloud information of the current frame image is used to convert the relative relationship between the tracked object and the environmental space represented by the object feature information into the relative relationship between the tracked object and the camera device, thereby determining the position and posture of the tracked object. By using the first point cloud information to convert the relative relationship of the tracked object, it is convenient to determine the position and posture of the tracked object.
[0041] The method and device for determining the position and posture of a tracked object during image tracking according to the present disclosure will be described in detail below with reference to the accompanying drawings.
[0042] Figure 1 A flowchart of an example 100 of a method for determining the position and pose of a tracked object during image tracking according to an embodiment of the present disclosure is shown.
[0043] The method provided by the present disclosure can be applied to a device for performing image tracking operations, such as a virtual reality device, an augmented reality device, etc. The device for performing the method of the present disclosure can obtain continuous frame images, such as a video to be displayed, an image of a real scene collected in real time, etc.
[0044] like Figure 1 As shown, at 110, the current frame image and first point cloud information corresponding to the current frame image may be obtained.
[0045] In the present disclosure, the first point cloud information may be based on the relative relationship between the camera device and the environmental space. The camera device may be a device for capturing frame images, and the camera device transmits the captured frame images to a device for executing the method of the present disclosure, or the camera device may have the ability to execute the method of the present disclosure. The environmental space may be represented by a world coordinate system, and the camera device is in the environmental space. The first point cloud information may include point cloud information for multiple feature points in the current frame image, and the point cloud information for each feature point may include the three-dimensional coordinates of the feature point corresponding to the projection in the environmental space, as well as the pixel coordinates in the current frame image, the descriptor, and the point cloud's unique identification ID (pixel point ID) in space, etc.
[0046] The three-dimensional coordinates in the first point cloud information are the three-dimensional coordinates in the first coordinate system with the camera device as the origin, and the three-dimensional coordinates corresponding to the feature points extracted from the image are the three-dimensional coordinates of the projection points corresponding to the feature points in the current frame image projected into the environment space.
[0047] The descriptor is used to describe the local information of each feature point at the corresponding position of the image. The descriptor can be used to distinguish each feature point. For example, if the descriptors of two feature points are close in distance in the vector space, it can be determined that the two feature points are similar or identical.
[0048] In one example, the first point cloud information can be obtained using a SLAM (simultaneous localization and mapping) algorithm. Correspondingly, the point cloud information of each frame image can also be obtained using a SLAM algorithm. The present disclosure takes the first point cloud information as an example for explanation.
[0049] The multiple feature points included in the first point cloud information may be all or part of the pixel points in the current frame image. When the multiple feature points included in the first point cloud information are part of the pixel points in the current frame image, the part of the pixel points may be representative points in the current frame image. These partial feature points may remain unchanged when the viewing angle of the camera device changes slightly.
[0050] In the case where the first point cloud information is only for some pixels in the current frame image, the amount of data for image processing of the current frame image is reduced, so that the corresponding first point cloud information can be extracted from the current frame image more efficiently. In addition, the subsequent operation of determining the posture is also based on the first point cloud information, and the first point cloud information including only some pixels reduces the amount of data for subsequent processing, thereby improving the data processing efficiency of determining the posture.
[0051] In one example, the first point cloud information can be obtained by a point cloud extraction device performing data processing on a current frame image. The point cloud extraction device and a device for executing the method disclosed herein (hereinafter referred to as an execution device) can be two different devices, and the point cloud extraction device is communicatively connected to the execution device. After acquiring the current frame image, the execution device can send the current frame image to the point cloud extraction device. The point cloud extraction device performs data processing on the current frame image to obtain the first point cloud information, and feeds the first point cloud information back to the execution device, so that the execution device can acquire the first point cloud information corresponding to the current frame image.
[0052] For example, the execution device is an augmented reality device, the point cloud extraction device is a mobile phone, and the augmented reality device is connected to the mobile phone. The augmented reality device is used to generate a frame image and send the generated current frame image to the mobile phone. The mobile phone can perform data processing on the current frame image to extract the corresponding first point cloud information, and feed the first point cloud information back to the augmented reality device.
[0053] In this example, the point cloud extraction device for extracting the first point cloud information and the execution device are two different devices, and the two devices can run in parallel, which reduces the amount of data processing of the execution device, thereby reducing the load pressure of the execution device. In addition, the operations of the execution device to acquire frame images and determine the position and posture can be performed in parallel with the operations of the point cloud extraction device to extract point cloud information, thereby improving the processing efficiency of image tracking.
[0054] In another example, the first point cloud information may be obtained by the execution device performing data processing on the current frame image. Specifically, the execution device obtains the current frame image and processes the current frame image to obtain the corresponding first point cloud information, and then the operation of determining the position and posture of the tracked object disclosed in the present invention may be performed.
[0055] Then, at 120 , when the tracked object is static, a position and posture may be determined according to the first point cloud information and the object feature information of the tracked object.
[0056] In the present disclosure, the tracking object may be specified, and each frame image may include one or more tracking objects.
[0057] The tracking object in a static state is based on the environment space as a reference. The tracking object in a static state can be that the tracking object remains motionless in the environment space. For example, there is a chair in the current environment space, and the chair will not move without external force, so it can be considered that the chair is in a static state. The state of the tracking object in a static state can be for a time period. When the tracking object does not move within a period of time, it can be determined that the tracking object is in a static state within the time period. The tracking object in a static state can be determined, for example, based on the data detected by the IMU sensor (inertial measurement unit) set in the tracking object.
[0058] In the present disclosure, the object feature information of the tracked object may include multiple feature information, and the multiple feature information may be combined to characterize the corresponding tracked object. The object feature information is based on the relative relationship between the tracked object and the environmental space, and the object feature information of each tracked object may include the pixel coordinates and descriptors of each feature point of the tracked object in the image. The feature pixel coordinates and descriptors in the object feature information are all based on the environmental space as a reference. Among them, the method of extracting object feature information from the image can adopt freak feature extraction, orb feature extraction, etc.
[0059] In the present disclosure, the object feature information of the tracked object can be used as the standard feature information of the tracked object. For example, when a set of feature information matches the object feature information of a tracked object, it can be determined that the set of feature information represents the tracked object.
[0060] In one example, the object feature information of the tracked object may be pre-stored. Specifically, each tracked object may be predetermined. After each tracked object is determined, data processing may be performed on the image including the determined tracked object, such as feature extraction, to obtain object feature information for the tracked object, and then the obtained object feature information is stored in a preset offline feature database. The offline feature database is used to store the object feature information of each tracked object. The object feature information in the offline feature database may be used as reference feature information for identifying the tracked object during the image tracking process.
[0061] In an example of the present disclosure, the first point cloud information can be matched with the object feature information of the tracked object to obtain matched point cloud information and object feature information, and the matched point cloud information and object feature information correspond one-to-one to characterize the same feature of the tracked object. For example, the tracked object is a table, and the object feature information corresponding to the feature point on a corner of the table matches the point cloud information.
[0062] Then, the matched point cloud information and object feature information are calculated according to the ICP (Iterative Closest Point) calculation method to obtain the pose. In the ICP calculation method, a linear method (such as SVD) can be used for solution, and a nonlinear optimization method can also be used for solution.
[0063] In the present disclosure, the position and posture of the tracked object is based on the relative relationship between the tracked object and the camera device. According to the first point cloud information based on the relative relationship between the camera device and the environment space and the object feature information based on the relative relationship between the tracked object and the environment space, the position and posture based on the relative relationship between the tracked object and the camera device can be determined.
[0064] Figure 2 FIG. 2 is a schematic diagram showing an example 200 of the relative relationship between the environment space, the camera device, and the tracking object of the present disclosure. Figure 2 As shown, the object feature information based on the relative relationship between the tracked object and the environmental space can be represented as line 1, the first point cloud information based on the relative relationship between the camera device and the environmental space can be represented as line 2, and then line 3 can be obtained based on line 1 and line 2, and line 3 can represent the relative relationship between the tracked object and the camera device. Therefore, the obtained line 3 can represent the posture.
[0065] In the present disclosure, by introducing the first point cloud information based on the relative relationship between the camera device and the environment space, the object feature information of the tracked object is converted into a relative relationship, and the posture based on the relative relationship between the tracked object and the camera device is obtained. The posture is obtained by conversion using complex calculations, thereby simplifying the posture determination process and improving the posture determination efficiency.
[0066] In an example of the present disclosure, the first point cloud information of the current frame image may be obtained based on the current frame image and a historical frame image corresponding to the same static state as the current frame image.
[0067] When the tracking object is in a continuous static state, the static state at this time can be expressed as a static state, which continuously maintains a static tracking object unchanged in the environment space. When the tracking object starts to move, the current static state ends, and then when the tracking object is not moving in the environment space again, the next static state of the tracking object begins.
[0068] The tracking object is in a static state, which is a continuous and uninterrupted process. In this example, the historical frame image corresponding to the static state and the current frame image belong to the same static state. For example, the tracking object is in a static state from 8:00 to 9:00, and the tracking object starts to move at 9:00. The current frame image may be the last frame image when the tracking object is in a static state. In addition, there are 300 frames of historical frame images before the last frame image and in the time period from 8:00 to 9:00. Then, the 300 frames of historical frame images are continuous with the current frame image and belong to the same static state.
[0069] In one example, the first point cloud information can be obtained based on the current frame image and all historical frame images corresponding to the static state. In another example, the first point cloud information can also be obtained based on the current frame image and part of the historical frame images corresponding to the static state. In this example, part of the historical frame images can be randomly selected from all the historical frame images, or can be selected according to specified rules. The specified rules can include selecting at intervals of a specified number of frames, continuous selection, etc. For example, when selecting part of the historical frame images by using an interval of a specified number of frames, it can be selected at intervals of one frame in all the historical frame images. When continuous selection is used, historical frame images of a specified number of frames continuous with the current frame image can be used as the selected part of the historical frame images.
[0070] Figure 3 FIG. 1 is a schematic diagram showing an example of obtaining first point cloud information based on a current frame image and a historical frame image according to an embodiment of the present disclosure. Figure 3 As shown, D1, D2, ..., D n Represents the spatial points in the environment space, P1, P2, ..., P m Represents a frame image, where P m Indicates the current frame image, P1, P2, ..., P m-1 Represents a historical frame image. The line between D and P represents that the spatial point D is in the frame image P. For example, the line between D1 and P1 represents that the spatial point D1 is in the frame image P1.
[0071] Take space point D i And the point in the frame image P j The projected pixel point U in i For example, space point D i The coordinates are [X i , Y i , Z i ] T , its projected pixel point U i The coordinates of i , v i ] T , then the space point D i With the pixel U i The relationship can be expressed as follows:
[0072]
[0073] The above formula is transformed into matrix form: i U i =KTD i , where s i Represents a spatial point D i The depth of the camera, K represents the intrinsic parameter matrix of the camera, the pose is expressed as the rotation parameter R and the translation parameter t, and the corresponding Lie group is T.
[0074] Since the above formula contains the noise of the observed spatial point, there is an error in the formula. The difference between the spatial point and the projected pixel point is used to represent the error, that is, the reprojection error, which can be expressed as:
[0075]
[0076] Among them, T * represents the reprojection error, k represents the total number of spatial points projected onto the frame image, and each summation element represents the error of a pixel point projected onto a frame image. The above formula includes the error of each spatial point projected onto each frame image, for example, Figure 3 The error of projecting the spatial point D1 to P1, P2 and P3. In the initial value of the above formula, a spatial point D i The projection pixel point U i There is a certain distance between the actual projection point and the distance is the error. The error can be reduced by adjusting the camera's position R and t. When the error is minimized, the more accurate the projected pixel points are, the more accurate the camera position is. Of course, in the adjustment process, it is necessary to comprehensively consider the errors of the projections of multiple spatial points on each frame image, and the ultimate goal is to minimize the overall error. In this example, the error adjustment is aimed at multiple frames including the current frame image and the historical frame image, that is, the information of multiple frames is integrated to adjust the error to a minimum to obtain more accurate three-dimensional coordinates of the spatial point and the corresponding projected pixel coordinates, thereby improving the accuracy of the first point cloud information.
[0077] The minimization calculation for the above formula may be performed using a gradient descent method, a Gauss-Newton method, a Newton method, a LM (Levenberg-Marquardt) algorithm, or the like.
[0078] Through the above examples, the first point cloud information of each frame image is obtained based on the frame image and the historical frame image. Such first point cloud information is obtained by comprehensive superposition of image information including the static tracking object, thereby making the first point cloud information more accurate.
[0079] Figure 4 A flowchart of another example 400 of a method for determining the pose of a tracked object during image tracking according to an embodiment of the present disclosure is shown.
[0080] like Figure 4 As shown, at 410, the current frame image and the first point cloud information corresponding to the current frame image can be obtained. The operation of 410 can refer to the above Figure 1 The operation of 110 is shown.
[0081] Then, at 420, it can be determined whether the tracked object is in a static state according to the first point cloud information, the object feature information of the tracked object, and the point cloud information of the previous frame image. In one example, the state of the tracked object can be determined, and the state of the tracked object can include static and dynamic. When it is determined that the tracked object is in a static state, the operation of 430 is performed. When it is determined that the tracked object is in a dynamic state, the operation of 440 can be performed.
[0082] When it is determined that the tracked object is static, it can be determined that the first point cloud information of the current frame image includes a valid point cloud and includes a sufficient number of valid point clouds. Based on this, at 430, the position and posture of the tracked object in the current frame image relative to the camera device is determined according to the first point cloud information and the object feature information of the tracked object. The operation of 430 can refer to the above Figure 1 The operation of 120 is shown.
[0083] At 440 , a pose may be determined based on the extracted feature information and the object feature information.
[0084] For the above 420 operations, the following is combined Figure 5 Provide specific instructions. Figure 5 A flowchart of an example 500 of a method for determining a state of a tracked object according to an embodiment of the present disclosure is shown.
[0085] like Figure 5 As shown, at 421, a first matching feature point set of the tracked object in the current frame image can be determined according to the first point cloud information and the object feature information of the tracked object.
[0086] Specifically, the first point cloud information can be matched with the object feature information of the tracked object to obtain matching point cloud information and object feature information. Each pair of matched point cloud information and object feature information can form a matching point pair, and each matching point pair represents a feature point of the tracked object.
[0087] All matching point pairs obtained by matching the first point cloud information and the object feature information may constitute a first matching feature point set, and the feature points represented by all matching point pairs in the first matching feature point set may be used to represent the tracked object.
[0088] In one example, the first point cloud information may include a pixel point ID. Each matching point pair obtained from the first point cloud information and the object feature information corresponds one-to-one to the pixel point ID. Based on this, the set of pixel point IDs corresponding to each matching point pair can be determined as the first matching feature point set.
[0089] Then, at 425, the state of the tracked object is determined according to the first matching feature point set and the second matching feature point set of the previous frame image. The state of the tracked object may include static and dynamic, and both static and dynamic in the present disclosure are states relative to the environment space.
[0090] The second matching feature point set may include second matching feature point pairs obtained based on the point cloud information and object feature information of the previous frame image, and each second matching feature point pair is composed of matching point cloud information and object feature information. In one example, the second matching feature point pairs correspond one-to-one to the pixel point IDs in the point cloud information, and the second matching feature point set may include the pixel point IDs corresponding to each second matching feature point pair.
[0091] In one example, the second matching feature point set of the previous frame image may be determined based on the fact that the tracked object in the previous frame image is in a static state. In this example, the tracked object in the continuous multiple frames of images before the previous frame image may also be in a static state.
[0092] For the image tracking process of the previous frame image, the position and posture of the tracked object in the previous frame image of the previous frame image (i.e., the previous previous frame image) can be determined, and the matching feature point set corresponding to the object feature information of the previous previous frame image and the tracked object can be obtained. Then, the state of the tracked object in the previous frame image is calculated using the matching feature point set corresponding to the point cloud information of the previous frame image and the object feature information of the tracked object.
[0093] In addition, when the tracked object in the previous frame image is static, the position and posture of the tracked object can also be obtained by performing ICP calculation based on the point cloud information and object feature information of the previous frame image. When the tracked object is static, the point cloud information for the tracked object in the previous frame image includes a sufficient number of valid point cloud information to characterize the tracked object, so that a sufficient number of valid point clouds can be used in the position and posture calculation, thereby improving the accuracy of the position and posture calculation.
[0094] In this example, the tracked object in the previous frame image is static, so when performing image tracking processing on the current frame image, the tracked object continues to be static, so that the point cloud information for the current frame image can be obtained based on the multiple frames of images corresponding to the static tracked object, so that the amount of point cloud information obtained is larger and more accurate. Furthermore, the tracked object in the multiple frames of images before the previous frame image is also static, thereby further improving the amount and accuracy of the point cloud information of the current frame image.
[0095] In another example, the second matching feature point set of the previous frame image may be determined based on the tracked object in the previous frame image being in a dynamic state.
[0096] Specifically, when the tracked object in the previous frame image is in motion, feature extraction can be performed on the previous frame image, and the extracted feature information can be matched with the object feature information of the tracked object. When the number of matched feature points reaches a specified threshold, it can be determined that the tracked object has been successfully identified, and then the pose is obtained using the matching point pairs consisting of the extracted feature information and the object feature information. In this way, after the pose is successfully calculated, the point cloud information of the previous frame image can be matched with the object feature information, and the number of matched feature points can be compared with a specified number threshold. When the number of matched feature points is greater than the specified number threshold, it can be indicated that there is a sufficient number of valid point cloud information in the point cloud information of the previous frame image to characterize the tracked object.
[0097] After obtaining the first matching feature point set and the second matching feature point set of the previous frame image, the first matching feature point set and the second matching feature point set are subjected to intersection processing, that is, the feature points represented by the first matching feature point set are compared with the feature points represented by the second matching feature point set, and if they are the same feature points after comparison, there is an intersection. The more the number of intersections, the closer the tracking object in the current frame image is to the tracking object in the previous frame image, and the closer the tracking object is, the greater the probability that the tracking object is static.
[0098] Then, the number of intersections is compared with a first threshold. When the number of intersections is greater than the first threshold, it can be determined that the tracked object is in a static state. When the number of intersections is not greater than the first threshold, it can be determined that the tracked object is in a dynamic state.
[0099] In this example, when it is determined that the tracked object is static, the first matching feature point set may be used to determine the position and posture of the tracked object in the current frame image relative to the camera device.
[0100] Through the above example, the first matching feature point set obtained from the first point cloud information and the object feature information can characterize the feature point pair of the tracked object, and then the second matching feature point set of the previous frame image is compared with the first matching feature point set to determine whether the tracked object is in a static state. And the pose calculation operation is performed only when it is static, ensuring that there are a sufficient number of valid point clouds in the point cloud information used to perform the pose calculation, thereby ensuring that there are a sufficient number of point clouds to calculate the pose, and improving the accuracy of the pose calculation.
[0101] In one example, a tracking object list may be set, and the tracking object list is used to record the tracking objects to be tracked during the image tracking process. The tracking objects in the tracking object list may be recorded by the user, or may be recorded by determining the position and posture of the tracking object in each frame image. When the tracking object whose posture is determined by the frame image is not recorded in the tracking object list, the tracking object may be recorded in the tracking object list. For example, for the first frame image, the tracking object is not recorded in the tracking object list at this time. After determining the position and posture of the tracking object A in the first frame image, the tracking object may be recorded in the tracking object list.
[0102] When the tracking object whose posture is determined by the frame image has been recorded in the tracking object list, the tracking object whose posture is determined can be retained in the tracking object list. For example, when performing image tracking processing on a frame image, the tracking object list records the tracking object A to be tracked, and the posture of the tracking object A in the frame image can be determined, so that the tracking object A can continue to be recorded in the tracking object list. If the posture calculation of the tracking object A in the frame image fails, the tracking object A can be removed from the tracking object list.
[0103] For each frame of image, when performing image tracking processing on the frame of image, it can be checked first whether there is a tracking object in the tracking object list, and then different methods can be used to determine the position and posture of the tracking object according to whether there is a tracking object in the tracking object list.
[0104] Specifically, after determining the first matching feature point set of the tracking object in the current frame image, it is possible to check whether the tracking object is included in the tracking object list. When the tracking object is included in the tracking object list, the status of the tracking object can be determined based on the first matching feature point set and the second matching feature point set of the previous frame image.
[0105] When the tracked object is not included in the tracked object list, the number of matching point pairs can be determined in the first matching feature point set, and the matching point pairs in the first matching feature point set are matching point pairs consisting of the matched first point cloud information and the object feature information. The number of matching point pairs of the feature information extracted from the current frame image and the object feature information can also be determined, and the matching point pairs are composed of the matched feature information and the object feature information.
[0106] For any of the above-determined numbers of matching point pairs, it can be determined whether the determined number is greater than a specified number threshold. If it is greater, the state of the tracked object can be determined according to the determined matching point pairs. Specifically, when the determined matching point pairs are matching point pairs of the first matching feature point set, the state of the tracked object can be determined according to the matching point pairs of the first matching feature point set; when the determined matching point pairs are matching point pairs of feature information and object feature information, the state of the tracked object can be determined according to the matching point pairs of feature information and object feature information. If it is determined that the determined number is not greater than the number threshold, it can be considered that the tracking of the tracked object has failed. If the number of matching point pairs in the first matching feature point set is not greater than the number threshold, it can be indicated that the first point cloud information of the tracked object in the current frame image includes fewer valid point clouds, resulting in the inability to calculate the pose based on a limited number of valid point clouds or the calculated pose accuracy is not high. If the number of matching point pairs of the extracted feature information and the object feature information is not greater than the number threshold, it can be indicated that the recognition has failed, and the tracking operation cannot be continued.
[0107] In the above example, the currently tracked tracking object can be displayed through the set tracking object list. For the tracking object recorded in the tracking object list, the operation of determining the state of the tracking object can be directly executed, thereby simplifying the image tracking process and improving the processing efficiency of image tracking.
[0108] For the above 440 operations, the following is combined Figure 6 Provide specific instructions. Figure 6 A flowchart of an example 600 of a method for determining a pose according to extracted feature information and object feature information according to an embodiment of the present disclosure is shown.
[0109] For the above example 600, it can be executed when a specified condition is met, and the specified condition can be that the tracked object is in a dynamic state. In addition, the specified condition can also include any one of the following conditions: the current frame image is the first frame image, there is no tracked object currently, and the position and posture determination using the first point cloud information fails.
[0110] In this example, the first frame image may be an image in which no frame image existed before, or an image in which the tracked object is in a different state from the tracked object in the previous continuous frame image. The image tracking process for the first frame image cannot refer to the position and posture of the tracked object in the previous frame image. For example, the first frame image may be the first image captured after the image capturing device is started, or it may be the first image of the tracked object captured when the tracked object is in a continuous static state. When the current frame image is the first frame image, the operation of this example 600 may be performed on the current frame image to determine the position and posture for the current frame image.
[0111] The current non-existence of the tracking object may include the loss of the tracking object or the failure to identify the tracking object, wherein the loss of the tracking object may include the failure to calculate the position and posture of the tracking object, the loss of the position and posture calculation result of the tracking object, etc. When a tracking object list is set, it can be checked whether the tracking object is recorded in the tracking object list. If the tracking object is not recorded in the tracking object list, it can be determined that the tracking object does not exist currently.
[0112] Failure to determine the pose using the first point cloud information may include failure to calculate the pose using the first point cloud information and the object feature information, a large error in the determined pose, etc. When the pose fails to be determined using the first point cloud information, the operation of example 600 may be performed on the current frame image to determine the pose, that is, the pose is determined based on the extracted feature information. The amount of feature information extracted from the image is greater than the amount of the first point cloud information, so the probability of successfully determining the pose using a greater amount of feature information is also increased accordingly.
[0113] like Figure 6 As shown, at 441, feature extraction may be performed on the current frame image to obtain feature information of the current frame image.
[0114] Then, at 443, the extracted feature information is matched with the object feature information to obtain a matching point pair for the tracked object in the current frame image.
[0115] In one example, the extracted feature information is matched with the object feature information based on the position and posture of the tracked object in the previous frame image to obtain a matching point pair of the tracked object.
[0116] Specifically, the position and posture of the tracked object in the previous frame image (hereinafter referred to as the initial position and posture) can be obtained, and then the tracked object with the initial position and posture is projected, and the feature points of the tracked object in the current frame image are extracted based on the projected tracked object with the initial position and posture.
[0117] Specifically, for each pixel of the tracked object with the initial posture, the feature point corresponding to the pixel is matched in the designated area near the pixel. The feature point corresponding to the pixel points to the same position of the tracked object as the pixel. For example, the feature point in the current frame image corresponding to the pixel pointing to the nose tip of the tracked object in the previous frame image also points to the nose tip of the tracked object. The designated area of a pixel can be the surrounding area centered on the pixel. For example, the designated area can be a circular area with the pixel as the center and 3 pixels as the radius.
[0118] After determining the feature points of the tracked object from the current frame image, the feature information of the determined feature points can be obtained from the extracted feature information. At this time, the feature information obtained is only the feature information of the feature points of the tracked object. The obtained feature information is then matched with the object feature information to obtain a matching point pair for the tracked object.
[0119] Through the above example, since the tracked object does not move or moves very little between two adjacent frames of images, the corresponding feature points can be found in a smaller specified area based on the pixel points of the tracked object in the previous frame of image, so that the feature information matched with the object feature information only includes the feature information of the feature points of the tracked object, which reduces the matching amount of feature information and improves the matching efficiency.
[0120] In one example, the number of obtained matching point pairs is compared with a specified number threshold, which can be used to evaluate whether the tracked object is successfully identified. When the number of matching point pairs is not greater than the number threshold, it can be determined that the identification fails; when the number of matching point pairs is greater than the number threshold, it can be determined that the identification of the tracked object is successful. When the identification is successful, the following 445 operations can be performed to determine the position and posture.
[0121] At 445 , the position and posture of the tracked object in the current frame image relative to the camera device is determined based on the obtained matching point pairs.
[0122] In one example of the present disclosure, after the posture is determined, the determined posture can be verified by using the reprojection error. Specifically, the feature points of the tracked object are projected according to the determined posture to obtain the corresponding position information, which is two-dimensional information, and then the obtained position information is compared with the information of the pixel points of the tracked object in the current frame image. When the comparison error is within the allowable range, it can be determined that the posture calculation for the tracked object is correct, otherwise it can be determined that the posture calculation for the tracked object is incorrect.
[0123] Through this example, for each frame of image, after the pose is determined, it can be checked based on the reprojection error to improve the accuracy of the pose.
[0124] In one embodiment of the present disclosure, the object feature information of the object to be tracked is stored in a preset offline feature database.
[0125] First, the object to be tracked is determined, and object feature information of the object is obtained from an offline feature database.
[0126] For the previous frame image, when the previous frame image satisfies at least one of the conditions of the first frame image, the absence of the tracked object, the failure to determine the posture using the point cloud information, and the tracked object being in motion, feature extraction can be performed on the previous frame image to extract feature information of the previous frame image, and then the extracted feature information and the object features of the tracked object are matched to obtain matching point pairs of the tracked object. If the number of matching point pairs is greater than a specified threshold, the posture of the tracked object in the previous frame image can be determined based on the obtained matching point pairs.
[0127] Then, the point cloud information of the previous frame image is obtained, and the point cloud information of the previous frame image is matched with the object features of the tracked object to obtain second matching feature point pairs. When the number of second matching feature point pairs is greater than a threshold, the obtained second matching feature point pairs are used as the second matching feature point set for the previous frame image.
[0128] Next, the next frame image is obtained. For the next frame image, it is first determined whether the tracking object list includes the tracking object. When the tracking object is included, the point cloud information corresponding to the next frame image is obtained, and the first matching feature point set of the tracking object in the previous frame image is determined based on the point cloud information corresponding to the next frame image and the object feature information of the tracking object. The feature points represented by the first matching feature point set are compared with the feature points represented by the second matching feature point set. When the number of intersections obtained through the comparison is greater than the first threshold, it can be determined that the tracking object is static. When the number of intersections is not greater than the first threshold, it can be determined that the tracking object is dynamic.
[0129] When the tracked object is static, the first matching feature point set is used to determine the position and posture of the tracked object in the current frame image relative to the camera device. When the tracked object is dynamic, feature extraction can be performed on the current frame image, and the extracted feature information can be matched with the object feature information to obtain matching point pairs for the tracked object, and the position and posture of the tracked object in the current frame image relative to the camera device can be determined based on the obtained matching point pairs.
[0130] Figure 7 A block diagram showing an example of a device for determining the position and pose of a tracked object during image tracking (hereinafter referred to as a position and pose determining device 700 ) according to an embodiment of the present disclosure.
[0131] like Figure 7 As shown, the posture determination device 700 may include a point cloud acquisition unit 710 and a posture determination unit 720 .
[0132] The point cloud acquisition unit 710 may be configured to acquire the current frame image and first point cloud information corresponding to the current frame image, wherein the first point cloud information is based on the relative relationship between the camera device and the environment space. The operation of the point cloud acquisition unit 710 may refer to the above reference. Figure 1 The operation of block 110 is described.
[0133] The posture determination unit 720 may be configured to determine the posture of the tracked object in the current frame image relative to the camera device according to the first point cloud information and the object feature information of the tracked object when the tracked object is static, wherein the object feature information is based on the relative relationship between the tracked object and the environment space. The operation of the posture determination unit 720 may refer to the above reference Figure 1 The operation of block 120 is described.
[0134] In one example, the posture determination device 700 may further include a state determination unit, which may be configured to determine the state of the tracked object based on the first point cloud information, object feature information of the tracked object, and point cloud information of the previous frame image, the state including static and dynamic.
[0135] In one example, the state determination unit may be configured to: determine a first matching feature point set of the tracked object in the current frame image based on the first point cloud information and the object feature information of the tracked object; and determine the state of the tracked object based on the first matching feature point set and the second matching feature point set of the previous frame image, wherein the second matching feature point set includes a second matching feature point pair obtained based on the point cloud information and the object feature information of the previous frame image. The posture determination unit may be configured to use the first matching feature point set to determine the posture of the tracked object in the current frame image relative to the camera device when the tracked object is static. The operation of the state determination unit may refer to the above reference. Figure 4 The operation of block 420 is described, Figure 5 The operations of blocks 421 and 425 are described.
[0136] In one example, the posture determination device 700 may further include a matching point pair determination unit, which may be configured to determine the number of matching point pairs in the first matching feature point set when the tracking object list does not include the tracking object, or determine the number of matching point pairs of feature information extracted from the current frame image and object feature information, wherein the tracking object list is used to record the tracking object to be tracked during the image tracking process. The state determination unit may also be configured to: determine the state of the tracking object according to the determined matching point pairs when the determined number is greater than a number threshold, and determine the state of the tracking object according to the first matching feature point set and the second matching feature point set of the previous frame image when the tracking object list includes the tracking object.
[0137] In one example, the posture determination device 700 may further include a feature extraction unit and a feature matching unit. The feature extraction unit may be configured to extract features from the current frame image when a specified condition is met, and the feature matching unit may be configured to match the extracted feature information with the object feature information to obtain a matching point pair for the tracked object. The posture determination unit may also be configured to determine the posture of the tracked object in the current frame image relative to the camera device based on the obtained matching point pair. The operation of the feature extraction unit may refer to the above reference. Figure 6 The operation of block 441 described above and the operation of the feature matching unit can refer to the above reference Figure 6 The operation of block 443 is described.
[0138] In one example, the posture determination unit may be configured to: when the number of obtained matching point pairs is greater than a specified threshold, determine the posture of the tracked object in the current frame image relative to the camera device according to the obtained matching point pairs.
[0139] In an example, the feature matching unit may be configured to match the extracted feature information with the object feature information based on the position and posture of the tracked object in the previous frame image to obtain a matching point pair of the tracked object.
[0140] Reference above Figures 1 to 7 , an embodiment of a method and an apparatus for determining the position and posture of a tracked object during image tracking according to an embodiment of the present disclosure is described.
[0141] The device for determining the position and posture of the tracking object during the image tracking process disclosed in the present invention can be implemented by hardware, or by software, or by a combination of hardware and software. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the device in which it is located reading the corresponding computer program instructions in the memory into the memory and running them. In the present disclosure, the device for determining the position and posture of the tracking object during the image tracking process can be implemented, for example, by using an electronic device.
[0142] Figure 8 A block diagram of an electronic device 800 implementing a method for determining a position and posture of a tracked object during image tracking according to an embodiment of the present disclosure is shown.
[0143] like Figure 8 As shown, the electronic device 800 may include at least one processor 810, a memory (e.g., a non-volatile memory) 820, a memory 830, and a communication interface 840, and the at least one processor 810, the memory 820, the memory 830, and the communication interface 840 are connected together via a bus 850. The at least one processor 810 executes at least one computer-readable instruction stored or encoded in the memory (i.e., the above-mentioned element implemented in the form of software).
[0144] In one embodiment, computer executable instructions are stored in a memory, which when executed enable at least one processor 810 to: obtain a current frame image and first point cloud information corresponding to the current frame image, wherein the first point cloud information is based on the relative relationship between the camera device and the environmental space; and when the tracked object is static, determine the position of the tracked object in the current frame image relative to the camera device according to the first point cloud information and object feature information of the tracked object, wherein the object feature information is based on the relative relationship between the tracked object and the environmental space.
[0145] It should be understood that the computer executable instructions stored in the memory, when executed, cause at least one processor 810 to perform the above combined operations in various embodiments of the present disclosure. Figure 1-7 Describes the various operations and functions.
[0146] According to one embodiment, a program product such as a machine-readable medium is provided. The machine-readable medium may have instructions (i.e., the above-mentioned elements implemented in the form of software), which, when executed by a machine, causes the machine to perform the above-mentioned combination of various embodiments of the present disclosure. Figure 1-7 Describes the various operations and functions.
[0147] Specifically, a system or device equipped with a readable storage medium can be provided, on which software program codes that implement the functions of any of the above-mentioned embodiments are stored, and a computer or processor of the system or device can read and execute instructions stored in the readable storage medium.
[0148] In this case, the program code itself read from the machine-readable medium can realize the function of any one of the above-mentioned embodiments, and thus the machine-readable code and the machine-readable storage medium storing the machine-readable code constitute a part of the present invention.
[0149] The computer program code required for the operation of each part of this specification can be written in any one or more programming languages, including object-oriented programming languages, such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB, NET and Python, conventional procedural programming languages such as C language, Visual Basic 2003, Perl, COBOL 2002, PHP and ABAP, dynamic programming languages such as Python, Ruby and Groovy, or other programming languages. The program code can be run on the user's computer, or run on the user's computer as an independent software package, or run partly on the user's computer and another part on the remote computer, or all on the remote computer or server. In the latter case, the remote computer can be connected to the user's computer through any network form, such as a local area network (LAN) or a wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service, such as software as a service (SaaS).
[0150] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or a cloud via a communication network.
[0151] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0152] Not all steps and units in the above-mentioned processes and system structure diagrams are necessary, and some steps or units can be ignored according to actual needs. The execution order of each step is not fixed and can be determined according to needs. The device structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some units may be implemented by the same physical entity, or some units may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.
[0153] The term "exemplary" as used throughout this specification means "serving as an example, instance, or illustration" and does not imply "preferred" or "advantageous" over other embodiments. The detailed description includes specific details for the purpose of providing an understanding of the described techniques. However, the techniques may be implemented without these specific details. In some instances, in order to avoid obscuring the concepts of the described embodiments, well-known structures and devices are shown in block diagram form.
[0154] The optional implementation modes of the embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the embodiments of the present disclosure are not limited to the specific details in the above implementation modes; within the technical concept of the embodiments of the present disclosure, a variety of simple modifications can be made to the technical solutions of the embodiments of the present disclosure, and these simple modifications all fall within the protection scope of the embodiments of the present disclosure.
[0155] The above description of the present disclosure is provided to enable any person of ordinary skill in the art to implement or use the present disclosure. Various modifications to the present disclosure will be apparent to those of ordinary skill in the art, and the general principles defined herein may be applied to other variations without departing from the scope of protection of the present disclosure. Therefore, the present disclosure is not limited to the examples and designs described herein, but is consistent with the widest range of principles and novel features disclosed herein.
Claims
1. A method for determining the position and posture of a tracked object during image tracking, comprising: Acquire a current frame image and first point cloud information corresponding to the current frame image, wherein the first point cloud information is based on the relative relationship between the camera device and the environment space, and includes point cloud information for multiple feature points in the current frame image, and the point cloud information for each feature point includes the three-dimensional coordinates of the feature point corresponding to the projection in the environment space and the pixel coordinates in the current frame image, a descriptor, and a unique identification ID of the point cloud in space; and When the tracked object is in a static state, determining the position and posture of the tracked object in the current frame image relative to the camera device according to the first point cloud information and the object feature information of the tracked object, Among them, the object feature information is based on the relative relationship between the tracked object and the environmental space; the tracked object is static, which means that the tracked object is static relative to the environmental space, and the object feature information of the tracked object includes pixel coordinates and descriptors of each feature point of the tracked object in the image, and the feature pixel coordinates and descriptors in the object feature information are all based on the environmental space as a reference.
2. The method of claim 1, further comprising: The state of the tracked object is determined according to the first point cloud information, the object feature information of the tracked object and the point cloud information of the previous frame image, wherein the state includes being static relative to the environment space and being dynamic relative to the environment space.
3. The method of claim 2, wherein: Determining the state of the tracked object according to the first point cloud information, the object feature information of the tracked object, and the point cloud information of the previous frame image includes: Determine a first matching feature point set of the tracked object in the current frame image according to the first point cloud information and the object feature information of the tracked object; determining the state of the tracked object according to the first matching feature point set and a second matching feature point set of a previous frame image, wherein the second matching feature point set includes a second matching feature point pair obtained according to the point cloud information of the previous frame image and the object feature information; and When the tracked object is static, determining the position and posture of the tracked object in the current frame image relative to the camera device according to the first point cloud information and the object feature information includes: When the tracked object is static, the first matching feature point set is used to determine the position and posture of the tracked object in the current frame image relative to the camera device.
4. The method of claim 3, further comprising: When the tracking object list does not include the tracking object, determining the number of matching point pairs in the first matching feature point set, or determining the number of matching point pairs between the feature information extracted from the current frame image and the object feature information, wherein the tracking object list is used to record the tracking object to be tracked during the image tracking process; and When the determined number is greater than a number threshold, determining the state of the tracked object according to the determined matching point pairs; and Determining the state of the tracked object according to the first matching feature point set and the second matching feature point set of the previous frame image includes: When the tracked object list includes the tracked object, the state of the tracked object is determined according to the first matching feature point set and the second matching feature point set of the previous frame image.
5. The method of claim 3, wherein: The second matching feature point set of the previous frame image is determined based on the fact that the tracked object in the previous frame image is in a static state.
6. The method of claim 1, wherein: The first point cloud information is obtained based on the current frame image and the static corresponding historical frame image.
7. The method of claim 1, further comprising: When a specified condition is met, performing feature extraction on the current frame image; Matching the extracted feature information with the object feature information to obtain a matching point pair for the tracked object; as well as The position and posture of the tracked object in the current frame image relative to the camera device is determined according to the obtained matching point pairs.
8. The method of claim 7, wherein: Determining the position and posture of the tracked object in the current frame image relative to the camera device according to the obtained matching point pair includes: When the number of the obtained matching point pairs is greater than a specified threshold, the position and posture of the tracked object in the current frame image relative to the camera device is determined according to the obtained matching point pairs.
9. The method of claim 7, wherein: The specified conditions include any one of the following conditions: The current frame image is the first frame image; There is currently no tracking object; Failure to determine the position and posture using the first point cloud information; and The tracking object is dynamic.
10. The method of claim 7, wherein: Matching the extracted feature information with the object feature information to obtain a matching point pair for the tracked object includes: The extracted feature information is matched with the object feature information based on the position and posture of the tracked object in the previous frame image to obtain a matching point pair of the tracked object.
11. The method of claim 1, wherein: The point cloud information of each frame image is extracted using the SLAM algorithm.
12. A device for determining the position and posture of a tracked object during image tracking, comprising: a point cloud acquisition unit, configured to acquire a current frame image and first point cloud information corresponding to the current frame image, wherein the first point cloud information is based on a relative relationship between a camera device and an environmental space, the first point cloud information includes point cloud information for a plurality of feature points in the current frame image, and the point cloud information for each feature point includes a three-dimensional coordinate corresponding to the feature point projected in the environmental space and a pixel coordinate in the current frame image, a descriptor, and a unique identification ID of the point cloud in space; and A posture determination unit is configured to determine the posture of the tracked object in the current frame image relative to the camera device according to the first point cloud information and the object feature information of the tracked object when the tracked object is in a static state, Among them, the object feature information is based on the relative relationship between the tracked object and the environmental space; the tracked object is static, which means that the tracked object is static relative to the environmental space, and the object feature information of the tracked object includes pixel coordinates and descriptors of each feature point of the tracked object in the image, and the feature pixel coordinates and descriptors in the object feature information are all based on the environmental space as a reference.
13. The apparatus of claim 12, further comprising: A state determination unit is configured to determine the state of the tracked object based on the first point cloud information, the object feature information of the tracked object and the point cloud information of the previous frame image, wherein the state includes being static relative to the environment space and being dynamic relative to the environment space.
14. The device of claim 13, wherein: The state determination unit is configured to: Determine a first matching feature point set of the tracked object in the current frame image according to the first point cloud information and the object feature information of the tracked object; as well as Determining the state of the tracked object according to the first matching feature point set and a second matching feature point set of a previous frame image, wherein the second matching feature point set includes a second matching feature point pair obtained according to the point cloud information of the previous frame image and the object feature information; as well as The posture determination unit is configured to use the first matching feature point set to determine the posture of the tracked object in the current frame image relative to the camera device when the tracked object is static.
15. The apparatus of claim 14, further comprising: a matching point pair determining unit, configured to determine the number of matching point pairs in the first matching feature point set, or determine the number of matching point pairs between feature information extracted from the current frame image and feature information of the object when the tracking object list does not include the tracking object, wherein the tracking object list is used to record the tracking object to be tracked during the image tracking process; and The state determination unit is further configured to: When the determined number is greater than a number threshold, determining the state of the tracked object according to the determined matching point pairs; and When the tracked object list includes the tracked object, the state of the tracked object is determined according to the first matching feature point set and the second matching feature point set of the previous frame image.
16. The apparatus of claim 12, further comprising: A feature extraction unit, configured to extract features from the current frame image when a specified condition is met; a feature matching unit configured to match the extracted feature information with the object feature information to obtain a matching point pair for the tracked object; as well as The posture determination unit is configured to determine the posture of the tracked object in the current frame image relative to the camera device according to the obtained matching point pairs.
17. The device of claim 16, wherein: The posture determination unit is configured as follows: When the number of the obtained matching point pairs is greater than a specified threshold, the position and posture of the tracked object in the current frame image relative to the camera device is determined according to the obtained matching point pairs.
18. The device of claim 16, wherein: The feature matching unit is configured as follows: The extracted feature information is matched with the object feature information based on the position and posture of the tracked object in the previous frame image to obtain a matching point pair of the tracked object.
19. An electronic device comprising: at least one processor, and A memory coupled to the at least one processor, the memory storing instructions, which, when executed by the at least one processor, cause the at least one processor to perform the method according to any one of claims 1 to 11.
20. A machine-readable storage medium storing executable instructions, which, when executed, cause the machine to perform the method according to any one of claims 1 to 11.
