Pose acquisition method and device, electronic equipment and storage medium

文档序号:7029 发布日期:2021-09-17 浏览:44次 中文

1. A pose acquisition method is characterized by comprising:

acquiring a plurality of sampling points positioned on a search line segment in a shot image; the search line segment passes through a projection contour point of a target object in the shot image, and the projection contour point is located on the projection contour of the target object;

acquiring attribute information of the sampling points and acquiring reference weights of the sampling points; wherein the attribute information represents a likelihood that the sample point belongs to the target object;

constructing an objective function based on the attribute information and the reference weight of the sampling point;

and obtaining the pose parameters of the target object in the shot image based on the target function.

2. The method of claim 1, wherein obtaining the reference weights for the sample points comprises:

searching target points in the plurality of sampling points on the search line segment to obtain a search result; wherein the target point is used for representing an object contour point of the target object;

respectively acquiring the weight information of the plurality of sampling points on the search line segment based on the search result; wherein the weight information includes at least one of a first weight and a second weight, the first weight being related to a predicted probability value of the target point, the predicted probability value representing a likelihood of the sampling point being the object contour point, and the second weight being related to a first distance of the target point to the sampling point;

and obtaining the reference weight of the sampling point based on the weight information.

3. The method of claim 2, wherein the attribute information comprises: the sample points belong to a first probability value of the target object; searching a target point in the plurality of sampling points on the search line segment to obtain a search result, wherein the searching comprises the following steps:

for each search line segment, respectively taking the plurality of sampling points as current points, taking the current points as candidate points under the condition that the reference probability difference of the current points meets a first condition, and selecting the candidate points with the prediction cost values meeting a second condition as the target points;

the reference probability difference value of the current point is the difference between the first probability values of two sampling points having a preset position relation with the current point, the prediction cost value comprises at least one of a first cost value and a second cost value, the first cost value is related to the prediction probability value of the candidate point, and the second cost value is related to a second distance from the candidate point to the projection contour point on the search line segment.

4. The method of claim 3, wherein before said selecting a candidate point with a predicted cost value satisfying a second condition as the target point, the method further comprises:

and filtering the candidate points with the prediction probability value meeting a third condition.

5. The method of claim 3, wherein the predetermined positional relationship is adjacent to the current point;

and/or, the second condition comprises that the predicted cost value is minimal;

and/or the first cost value is negatively correlated with the predictive probability value of the candidate point and the second cost value is positively correlated with the second distance.

6. The method of claim 2, wherein the weight information comprises the first weight; the obtaining of the weight information of the plurality of sampling points on the search line segment based on the search result includes:

determining a first weight of the sampling point based on a predicted probability value of the target point when the search result comprises that the target point is searched, wherein the first weight is positively correlated with the predicted probability value of the target point;

and/or, in the case that the search result includes that the target point is not searched, determining the first weight as a first numerical value; wherein the first numerical value is a lower limit value of the first weight in a case where the search result includes that the target point is searched.

7. The method of claim 2, wherein the weight information comprises the second weight; the obtaining of the weight information of the plurality of sampling points on the search line segment based on the search result includes:

determining a second weight of the sampling point based on the first distance corresponding to the sampling point if the search result includes searching to the target point, wherein the second weight is negatively correlated to the first distance;

and/or, in the case that the search result includes that the target point is not searched, determining the second weight as a second numerical value; wherein the second numerical value is an upper limit value of the second weight in a case where the search result includes that the target point is searched.

8. The method according to any one of claims 2 to 7, wherein the weight information includes a first weight and a second weight, and the first weight and the second weight are positively correlated with the reference weight.

9. The method of claim 1, wherein the attribute information comprises: a first probability value and a first confidence level that the sample point belongs to the target object, and a second probability value and a second confidence level that the sample point does not belong to the target object; constructing an objective function based on the attribute information and the reference weight of the sampling point, including:

acquiring a first product of the first reliability and the first probability value and a second product of the second reliability and the second probability value, and obtaining a joint probability value of the sampling point based on the sum of the first product and the second product;

and obtaining a target function based on the weighting result of the reference weight of each sampling point to the joint probability value.

10. The method of claim 9, wherein the first confidence level and the second confidence level are negative correlations, and wherein the first confidence level of the sample points is negative correlation with the directional euclidean distance of the corresponding projected contour point to the sample point on the same search line segment as the sample point.

11. The method according to claim 10, wherein the captured image includes a foreground region and a background region divided based on the projection profile; prior to said obtaining a first product of said first confidence level and said first probability value and a second product of said second confidence level and said second probability value, said method further comprises:

filtering the sampling points under the condition that the directional Euclidean distance of the sampling points is larger than a first distance value and the sampling points belong to the foreground region;

and/or filtering the sampling point under the condition that the directional Euclidean distance of the sampling point is smaller than a second distance value and the sampling point belongs to the background area.

12. The method according to any one of claims 1 to 11, characterized in that the projection profile is projected with a reference pose of the target object; before acquiring a plurality of sampling points located on a search line segment in the shot image, the method comprises the following steps:

down-sampling the shot image to obtain pyramid images with a plurality of resolutions;

according to the resolution ratio from small to large, the pyramid images are sequentially selected as the current shot image, and the step of acquiring a plurality of sampling points on a search line segment in the shot image and the subsequent steps are executed on the current shot image; the reference pose adopted in the current execution is the pose parameter obtained by the last execution, and the pose parameter obtained by the last execution is used as the final pose parameter of the target object in the shot image.

13. The method according to any one of claims 1 to 12, characterized in that the projection profile is projected using a reference pose of the target object, the reference pose being pose parameters of the target object in a reference image, and the reference image being captured before the captured image; the obtaining of the pose parameter of the target object in the shot image based on the objective function includes:

solving the objective function to obtain an updating parameter of the reference pose;

and optimizing the reference pose by using the updated parameters to obtain the pose parameters.

14. A pose acquisition apparatus characterized by comprising:

the projection sampling module is used for acquiring a plurality of sampling points positioned on the search line segment in the shot image; the search line segment passes through a projection contour point of a target object in the shot image, and the projection contour point is located on the projection contour of the target object;

the information extraction module is used for acquiring the attribute information of the sampling point and acquiring the reference weight of the sampling point; wherein the attribute information represents a likelihood that the sample point belongs to the target object;

the function building module is used for building an objective function based on the attribute information and the reference weight of the sampling point;

and the pose solving module is used for obtaining the pose parameters of the target object in the shot image based on the target function.

15. An electronic device characterized by comprising a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the pose acquisition method according to any one of claims 1 to 13.

16. A computer-readable storage medium having stored thereon program instructions that, when executed by a processor, implement the pose acquisition method of any one of claims 1 to 13.

Background

With the development of information technology, pose parameters have been widely applied in a variety of scenes such as augmented reality systems, robot hand-eye calibration, interactive games, human-computer interaction, and the like. For example, in an augmented reality system, virtual objects can be rendered and superimposed onto real objects in a video image according to pose parameters to achieve a virtual-real fusion effect with spatial and geometric consistency.

At present, in an actual scene, due to interference factors such as local shielding and similar colors, the accuracy of pose parameters is often seriously affected. In view of this, how to improve the accuracy of the pose parameters becomes an urgent problem to be solved.

Disclosure of Invention

The application provides a pose acquisition method and device, electronic equipment and a storage medium.

The application provides a pose acquisition method in a first aspect, including: acquiring a plurality of sampling points positioned on a search line segment in a shot image; the search line segment passes through a projection contour point of a target object in the shot image, and the projection contour point is located on the projection contour of the target object; acquiring attribute information of a sampling point and acquiring a reference weight of the sampling point; wherein the attribute information represents a possibility that the sampling point belongs to the target object; constructing an objective function based on the attribute information and the reference weight of the sampling point; and obtaining the pose parameters of the target object in the shot image based on the target function.

Therefore, a plurality of sampling points on a search line segment in a shot image are obtained, the search line segment passes through a projection contour point of a target object in the shot image, the projection contour point is positioned on the projection contour of the target object, attribute information of the sampling points is obtained based on the projection contour point, reference weights of the sampling points are obtained, the attribute information represents the possibility that the sampling points belong to the target object, an objective function is constructed based on the attribute information and the reference weights of the sampling points, a pose parameter of the target object in the shot image is obtained based on the objective function, the objective function is constructed based on the attribute information and the reference weights of the sampling points, on one hand, the possibility that the sampling points belong to the target pose is referred to by the attribute information, on the other hand, the reference value of the sampling points in the subsequent parameter solving process is referred by the reference weights, and then the influence of interference factors on pose solving can be relieved as much as possible, and the accuracy of pose parameters can be improved.

Wherein, obtaining the reference weight of the sampling point comprises: searching a target point in a plurality of sampling points on the search line segment to obtain a search result; the target point is used for representing an object contour point of the target object; respectively acquiring weight information of a plurality of sampling points on a search line segment based on the search result; wherein the weight information includes at least one of a first weight and a second weight, the first weight is related to a predicted probability value of the target point, the predicted probability value represents a possibility that the sampling point is the object contour point, and the second weight is related to a first distance from the target point to the sampling point; and obtaining the reference weight of the sampling point based on the weight information.

Therefore, the target point is searched in the plurality of sampling points on the search line segment to obtain a search result, the target point is used for representing the object contour point of the target object, the weight information of the plurality of sampling points on the search line segment is respectively obtained based on the search result, the weight information comprises at least one of a first weight and a second weight, the first weight is related to a predicted probability value of the target point, the predicted probability value represents the possibility that the sampling point is used as the object contour point, and the second weight is related to a first distance from the target point to the sampling point, so that the first weight and the second weight can represent the reference values of the sampling points from different angles, the reference weight of the sampling point is obtained based on the weight information, and the reference value of the reference weight in the subsequent pose parameter solving process can be improved.

Wherein the attribute information includes: the sampling point belongs to a first probability value of the target object; searching a target point in a plurality of sampling points on the search line segment to obtain a search result, wherein the search result comprises the following steps: and for each search line segment, respectively taking a plurality of sampling points as current points, taking the current points as candidate points under the condition that the reference probability difference of the current points meets a first condition, and selecting the candidate points with the prediction cost values meeting a second condition as target points. The reference probability difference value of the current point is the difference between first probability values of two sampling points with a preset position relation with the current point, the prediction cost value comprises at least one of a first generation value and a second generation value, the first generation value is related to the prediction probability value of the candidate point, and the second generation value is related to a second distance from the candidate point to a projection contour point on the search line segment.

Therefore, the attribute information includes first probability values that the sampling points belong to a target object, for each search line segment, the sampling points are respectively used as current points, the current points are used as candidate points under the condition that the reference probability difference of the current points meets a first condition, candidate points with a prediction cost value meeting a second condition are selected as target points, the reference probability difference of the current points is the difference of the first probability values of two sampling points with a preset position relation with the current points, the prediction cost value includes at least one of a first generation value and a second generation value, the first generation value is related to the prediction probability value of the candidate points, the second generation value is related to the second distance from the candidate points to the projection contour points on the search line segment, namely the first generation value and the second generation value respectively represent the cost of the candidate points as the contour points of the object at different angles, so that the candidate points are obtained by rough selection through the reference probability difference, and then, the target point is obtained based on the predicted cost value, so that the efficiency and the precision of screening the target point can be improved.

Before selecting a candidate point with a prediction cost value meeting a second condition as a target point, the method further comprises the following steps: and filtering candidate points with the prediction probability value meeting the third condition.

Therefore, before the target point is obtained by fine selection from the candidate points, the candidate points with the prediction probability values meeting the third condition are filtered, and the prediction probability values represent the possibility that the sampling points are taken as the object contour points, so that the method is favorable for further improving the screening efficiency of the target point.

Wherein the preset position relationship is adjacent to the current point; and/or, the second condition comprises a predicted cost value minimum; and/or the first generation value is negatively correlated with the predictive probability value of the candidate point, and the second generation value is positively correlated with the second distance.

Therefore, the preset position relation is set to be adjacent to the current point, so that the sudden change condition of the first probability value of each sampling point can be evaluated accurately, and the accuracy of the candidate point is improved; the second condition is set to include the minimum predicted cost value, so that the influence of interference factors on the selected target point can be further relieved as much as possible, and the accuracy of the pose parameters is improved; and the accuracy of the first generation value and the second generation value can be favorably improved by setting the first generation value to be negatively correlated with the prediction probability value of the candidate point and positively correlating the second generation value with the second distance.

Wherein the weight information includes a first weight; respectively acquiring the weight information of a plurality of sampling points on the search line segment based on the search result, wherein the weight information comprises the following steps: determining a first weight of the sampling point based on the predicted probability value of the target point under the condition that the searching result comprises that the target point is searched, wherein the first weight is positively correlated with the predicted probability value of the target point; and/or determining the first weight as a first numerical value under the condition that the search result comprises that the target point is not searched; the first value is a lower limit value of the first weight when the search result includes the searched target point.

Therefore, the weight information comprises the first weight, and under the condition that the search result comprises the searched target point, the first weight of the sampling point is determined based on the predicted probability value of the target point, the first weight is positively correlated with the predicted probability value of the target point, under the condition that the search result comprises the searched target point, the first weight is determined to be the first value, the first value is the lower limit value of the first weight under the condition that the search result comprises the searched target point, the first weight of each sampling point on the search line segment can be determined by taking the whole search line segment as a dimension, and the efficiency of obtaining the first weight is improved.

Wherein the weight information includes a second weight; respectively acquiring the weight information of a plurality of sampling points on the search line segment based on the search result, wherein the weight information comprises the following steps: determining a second weight of the sampling point based on a first distance corresponding to the sampling point under the condition that the searching result comprises that the target point is searched, wherein the second weight is inversely related to the first distance; and/or determining the second weight as a second numerical value under the condition that the search result comprises that the target point is not searched; wherein the second value is an upper limit value of the second weight in a case where the search result includes the searched target point.

Therefore, the weight information comprises the second weight, the second weight of the sampling point is determined based on the first distance corresponding to the sampling point under the condition that the search result comprises the searched target point, the second weight is in negative correlation with the first distance, the second weight is determined as the second numerical value under the condition that the search result comprises the searched target point, the second numerical value is the upper limit value of the second weight under the condition that the target point is searched, the second weight of each sampling point on the search line segment can be determined by taking the whole search line segment as a dimension, and the efficiency of obtaining the second weight is improved.

The weight information comprises a first weight and a second weight, and the first weight and the second weight are positively correlated with the reference weight.

Therefore, the weight information is set to simultaneously comprise the first weight and the second weight, and the first weight, the second weight and the reference weight are in positive correlation, so that the reference value of the sampling point in the subsequent pose parameter solving process can be represented from two different dimensions of the first weight and the second weight simultaneously, and the reference value of the reference weight is favorably improved.

Wherein the attribute information includes: the sampling point belongs to a first probability value and a first credibility of the target object, and the sampling point does not belong to a second probability value and a second credibility of the target object; constructing an objective function based on the attribute information and the reference weight of the sampling point, wherein the method comprises the following steps: acquiring a first product of the first reliability and the first probability value and a second product of the second reliability and the second probability value, and acquiring a joint probability value of the sampling point based on the sum of the first product and the second product; and obtaining a target function based on the weighting result of the reference weight of each sampling point to the joint probability value.

Therefore, the attribute information comprises a first probability value and a first reliability of the sampling point belonging to the target object, and a second probability value and a second reliability of the sampling point not belonging to the target object, on the basis, a first product of the first reliability and the first probability value and a second product of the second reliability and the second probability value are obtained, and a joint probability value of the sampling point is obtained based on the sum of the first product and the second product, so that the joint probability value of the sampling point can be represented from two angles of the sampling point belonging to the target object and the sampling point not belonging to the target object, and the target function is constructed and obtained through the weighting result of the reference weight of each sampling point to the joint probability value, the accuracy of the target function can be improved, and the accuracy of the reference pose is improved.

The first reliability and the second reliability are in a negative correlation relationship, the first reliability of the sampling point and the directional Euclidean distance from the corresponding projection contour point to the sampling point are in a negative correlation relationship, and the corresponding projection contour point and the sampling point are located on the same search line segment.

Therefore, the first reliability and the second reliability are in a negative correlation relationship, the first reliability of the sampling point and the directional euclidean distance from the corresponding projection contour point to the sampling point are in a negative correlation relationship, the corresponding projection contour point and the sampling point are located on the same search line segment, that is, the smaller the directional euclidean distance is, the higher the first reliability that the sampling point belongs to the target object is, and the lower the second reliability that the sampling point does not belong to the target object is, which can be beneficial to alleviating the influence of interference factors such as local shielding as much as possible.

The shot image comprises a foreground area and a background area which are divided based on a projection contour; prior to obtaining a first product of the first confidence level and the first probability value and a second product of the second confidence level and the second probability value, the method further comprises: filtering the sampling points under the condition that the directed Euclidean distance of the sampling points is greater than a first distance value and the sampling points belong to the foreground region; and/or filtering the sampling point under the condition that the directed Euclidean distance of the sampling point is smaller than the second distance value and the sampling point belongs to the background area.

Therefore, the shot image comprises a foreground region and a background region which are divided based on the projection profile, before the joint probability value is calculated, sampling points with the directional Euclidean distance larger than the first distance value and belonging to the foreground region are detected firstly, namely the sampling points are regarded as interference points and are filtered, the influence of the interference points on the subsequent pose solving parameters is favorably reduced as much as possible, and the sampling points with the directional Euclidean distance smaller than the second distance value and belonging to the background region are detected firstly, namely the sampling points are regarded as the interference points and are filtered, so that the influence of the interference points on the subsequent pose solving parameters is favorably reduced as much as possible.

The projection contour is obtained by projecting by using a reference pose of the target object; before acquiring a plurality of sampling points positioned on a search line segment in a shot image, the method comprises the following steps: down-sampling the shot image to obtain pyramid images with a plurality of resolutions; sequentially selecting pyramid images as a current shot image according to the resolution ratio from small to large, and executing a step of acquiring a plurality of sampling points positioned on a search line segment in the shot image and subsequent steps on the current shot image; the reference pose adopted by the current execution is the pose parameter obtained by the last execution, and the pose parameter obtained by the last execution is used as the final pose parameter of the target object in the shot image.

Therefore, the projection contour is obtained by projecting the reference pose of the target object, so that before projection sampling, the shot image is down-sampled to obtain pyramid images with a plurality of resolutions, the pyramid images are sequentially selected as the current shot image according to the resolution from small to large, the step of acquiring a plurality of sampling points on a search line segment in the shot image and the subsequent steps are executed on the current shot image, the reference pose adopted in the current execution is the pose parameter obtained in the last execution, and the pose parameter obtained in the last execution is used as the final pose parameter of the target object in the shot image, so that the pose estimation can be performed from coarse to fine in the process of acquiring the pose parameter, and the efficiency and the accuracy of acquiring the pose parameter can be improved.

The projection contour is obtained by projecting by using a reference pose of the target object; obtaining pose parameters of a target object in a shot image based on an objective function, comprising: solving the objective function to obtain an update parameter of the reference pose; and optimizing the reference pose by using the updated parameters to obtain pose parameters.

Therefore, the projection contour is obtained by projecting the reference pose of the target object, the reference pose is the pose parameter of the target object in the reference image, the reference image is obtained by shooting before the image is shot, the objective function is solved to obtain the updated parameter of the reference pose, the reference pose is optimized by using the updated parameter to obtain the pose parameter, and the continuous tracking of the pose parameter is accurately carried out in the shooting process of the target object.

The second aspect of the present application provides a pose acquisition apparatus, including: the system comprises a projection sampling module, an information acquisition module, a function construction module and a pose solving module, wherein the projection sampling module is used for acquiring a plurality of sampling points positioned on a search line segment in a shot image; the search line segment passes through a projection contour point of a target object in the shot image, and the projection contour point is located on the projection contour of the target object; the information extraction module is used for acquiring attribute information of the sampling point and acquiring the reference weight of the sampling point; wherein the attribute information represents a possibility that the sampling point belongs to the target object; the function building module is used for building a target function based on the attribute information and the reference weight of the sampling point; and the pose solving module is used for obtaining pose parameters of the target object in the shot image based on the target function.

A third aspect of the present application provides an electronic device, which includes a memory and a processor coupled to each other, where the processor is configured to execute program instructions stored in the memory to implement the pose acquisition method in the first aspect.

A fourth aspect of the present application provides a computer-readable storage medium on which program instructions are stored, the program instructions, when executed by a processor, implementing the pose acquisition method in the first aspect described above.

According to the scheme, a plurality of sampling points which are positioned on a search line segment in a shot image are obtained, the search line segment passes through a projection contour point of a target object in the shot image, the projection contour point is positioned on the projection contour of the target object, attribute information of the sampling points is obtained based on the projection contour point, reference weights of the sampling points are obtained, the attribute information represents the possibility that the sampling points belong to the target object, an objective function is constructed based on the attribute information and the reference weights of the sampling points, the pose parameters of the target object in the shot image are obtained based on the objective function, the objective function is constructed based on the attribute information and the reference weights of the sampling points, so that on one hand, the possibility that the sampling points belong to the target object can be referred to by the attribute information, on the other hand, the reference values of the sampling points in the subsequent pose parameter solving process can be referred by the reference weights, and then the influence of interference factors on pose solving can be relieved as much as possible, and the accuracy of pose parameters can be improved.

Drawings

Fig. 1 is a schematic flowchart of an embodiment of a pose acquisition method according to the present application;

FIG. 2 is a schematic diagram of one embodiment of a contour mask;

FIG. 3 is a schematic diagram of one embodiment of a projection profile and a search line segment;

FIG. 4a is a schematic diagram of an embodiment of capturing an image;

FIG. 4b is a schematic diagram of another embodiment of a mask image;

FIG. 4c is a diagram of one embodiment of a search line segment;

FIG. 5a is a schematic view of another embodiment of capturing an image;

FIG. 5b is a schematic diagram of one embodiment of a layout area;

FIG. 5c is a schematic view of another embodiment of a localized area;

FIG. 6 is a flowchart illustrating an embodiment of step S12 in FIG. 1;

FIG. 7a is a bundle image of the search line segment of FIG. 3;

FIG. 7b is a cluster image of the first probability values of the respective sample points on the search line segment of FIG. 3;

fig. 8 is a schematic flowchart of another embodiment of the pose acquisition method according to the present application;

fig. 9 is a schematic frame diagram of an embodiment of the present pose acquisition apparatus;

FIG. 10 is a block diagram of an embodiment of an electronic device of the present application;

FIG. 11 is a block diagram of an embodiment of a computer-readable storage medium of the present application.

Detailed Description

The following describes in detail the embodiments of the present application with reference to the drawings attached hereto.

In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present application.

The terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. Further, the term "plurality" herein means two or more than two.

Referring to fig. 1, fig. 1 is a schematic flowchart of an embodiment of a pose acquisition method according to the present application. Specifically, the method may include the steps of:

step S11: and acquiring a plurality of sampling points positioned on the search line segment in the shot image.

In the embodiment of the disclosure, the search line segment passes through the projection contour point of the target object in the shot image, and the projection contour point is located on the projection contour of the target object.

In one implementation scenario, the projection profile is projected using a reference pose of the target object, where the reference pose is a pose parameter of the target object in the reference image, and the reference image is captured before the image is captured. For example, in a real scene, video data can be shot for a target object, the video data can include multiple frames of images, and for the T-1 th frame of image, the steps in the embodiment of the present disclosure can be sampled to obtain the pose parameter T of the target object in the T-1 th frame of imaget-1When the pose parameter of the target object in the t frame image is acquiredCan be combined with Tt-1As a reference pose, and using the steps in the embodiment of the present disclosure to obtain a pose parameter T of the target object in the T-th frame imagetAnd so on, and no examples are given here.

In one implementation scenario, in order to improve the projection convenience, the target object may be three-dimensionally modeled in advance to obtain a three-dimensional model of the target object. It should be noted that the three-dimensional model may include vertices and edges connecting the vertices. The specific process of three-dimensional modeling may refer to the details of the related technology of three-dimensional modeling, and is not described herein again.

In one implementation scenario, for ease of description, the reference pose may be denoted as T, which may be represented as a 4 × 4 homogeneous matrix:

in the above-mentioned formula (1),representing a particular Euclidean group, R represents a rotation parameter, t represents a translation parameter, and R is(i.e., special orthogonal groups), t is a real matrix. On this basis, the three-dimensional point X on the target object can be projected into the shot image by using the camera internal parameter K and the reference pose T, and the pixel point X of the three-dimensional point X in the shot image corresponding to the three-dimensional point X is obtained:

in the above formula (2), pi (X) ═ X/Z, Y/Z]TRepresenting homogeneous coordinates of three-dimensional points X, i.e.It should be noted that the common coordinates of the three-dimensional point X are expressed asFurthermore, in the continuous tracking scenario as described above, the relative pose Δ T between frames can be represented by a six-dimensional twist vector (i.e., twistvector) using the lie algebra, i.e., p ═ w1 w2 w3 v1 v2 v3]。

In an implementation scenario, in order to facilitate subsequent determination of the correlation attribute of each pixel, a contour mask may be obtained based on a projection result of a target object, and each pixel in the contour mask corresponds to a pixel at the same position in a captured image. Referring to fig. 2, fig. 2 is a schematic diagram of an embodiment of an outline mask. As shown in fig. 2, after the target object is projected, a projection contour can be obtained, and the captured image is divided into foreground regions (i.e. foreground regions Ω in fig. 2) based on the projection contourf) And a background region (i.e., background region Ω in fig. 2)b). Further, a projected contour point m passing through the projected contour may be constructediSearch line segment li. The search line segment may specifically be located at a projection contour point m along the projection contouriNormal vector n of (A)iThe construction is carried out. On the basis, a plurality of sampling points can be extracted from the search line segment. For example, search line segment l may be extractediProjected contour point m oniAnd respectively located at the projected contour points miN (e.g., 7, 8, 9) pixel points on both sides as search line segment liA number of sample points above (i.e., solid dots in fig. 2). It should be noted that fig. 2 is only a projection profile that may exist in a practical application process, and does not limit a specific travel of the projection profile, and so on, and this is not exemplified here.

In one implementation scenario, referring to fig. 3 in combination, fig. 3 is a schematic diagram of an embodiment of a projection profile and a search line segment. As shown in fig. 3, in a real scene, a plurality of search line segments may be constructed based on respective projected contour points on the projected contour. Other captured images may be analogized, and are not exemplified here.

Step S12: and acquiring attribute information of the sampling point and acquiring a reference weight of the sampling point.

In the embodiment of the present disclosure, the attribute information indicates the possibility that the sampling point belongs to the target object. Specifically, the attribute information may include a first probability value and a first reliability that the sample point belongs to the target object, and a second probability value and a second reliability that the sample point does not belong to the target object. The first reliability may represent a degree of reliability of the first probability value, and the second reliability may represent a degree of reliability of the second probability value. In addition, if the sampling point belongs to the target object, the sampling point may be considered to belong to an actual foreground region in the captured image, and conversely, if the sampling point does not belong to the target object, the sampling point may be considered to belong to an actual background region in the captured image.

In one implementation scenario, for ease of description, line segment l is searchediThe upper jth sampling point can be denoted as xijSampling point xijMay be denoted as Pf(xij) Sampling point xijMay be denoted as Pb(xij). It should be noted that the first probability value and the second probability value may be determined by a local color histogram with continuous time, and a specific process for acquiring the first probability value and the second probability value may refer to specific technical details of the local color histogram with continuous time, which is not described herein again.

In one implementation scenario, the first confidence level and the second confidence level are in a negative correlation relationship, i.e., the higher the first confidence level, the lower the second confidence level, and vice versa, the lower the first confidence level, the higher the second confidence level. In addition, the first reliability of the sampling point and the directional Euclidean distance from the corresponding projection contour point to the sampling point are in a negative correlation relationship, and the corresponding projection contour point and the sampling point are located on the same search line segment. Please refer to FIG. 2 for searching line segment liFor example, the search line segment liThe first confidence of the last sampling point and the distance from the sampling point to the search line segment liUpper projection contour point miThe directional euclidean distance of the search line segment is negative-correlated, and the first confidence level of each sample point on other search line segments can be obtained by analogy, which is not illustrated.

In a specific implementation scenario, the directional euclidean distance from a sample point to a corresponding projected contour point may be obtained based on the first coordinate of the sample point, the second coordinate of the corresponding projected contour point, and the normal vector. Still search for line segment liUpper j th sampling point xijFor example, it has a Euclidean distance d (x)ij) Can be expressed as:

in the above formula (3), miRepresenting a search line segment liThe projected contour points of the image are projected,representing the projection profile at the projection profile point miThe transpose of the normal vector of (a).

In another specific implementation scenario, to smooth the first confidence level, the directed euclidean distance may be processed using a smoothly derivable step function (e.g., Heaviside function) to obtain the first confidence level. Still search for line segment liUpper j th sampling point xijFor example, its first confidence level He (d (x)ij) Can be expressed as:

in the above equation (4), s represents a smoothing factor, and the larger s is, the first reliability He (d (x)ij) With directed Euclidean distance d (x)ij) The more drastic the changes tend to be; conversely, the smaller s, the first confidence level He (d (x)ij) With directed Euclidean distance d (x)ij) The more gradual the change.

In yet another implementation scenario, the sum of the first confidence level and the second confidence level may be 1. Still search for line segment liUpper j th sampling pointxijFor example, when obtaining the sampling point xijFirst reliability He (d (x)ij) After (d (x)), 1-He (d (x)) may be addedij) As a sampling point x)ijA second confidence level of.

In one implementation scenario, for each search line segment, a target point may be searched for in a number of sampling points on the search line segment to obtain a search result, and the target point is used to represent an object contour point of a target object. On the basis, the weight information of a plurality of sampling points on the search line segment can be respectively obtained based on the search result, the weight information comprises at least one of a first weight and a second weight, the first weight is related to the predicted probability value of the target point, the predicted probability value represents the possibility that the sampling point is used as the object contour point, and the second weight is related to the first distance from the target point to the sampling point, so that the reference weight of the sampling point can be obtained based on the weight information. It should be noted that the searching process of the target point and the calculating process of the predicted probability value may refer to the related description in the following disclosed embodiments, which are not repeated herein. Further, the object contour point is an actual contour point of the target object in the captured image, and as shown in fig. 2, the line segment l is searchediUp sampling point siAnd also on the object profile (i.e. the object profile in fig. 2), the sampling point siAnd simultaneously, the actual contour points of the target object in the shot image are also obtained.

In a specific implementation scenario, the weight information may include a first weight, and in a case that the search result includes the searched target point, the first weight of the sample point may be determined based on the predicted probability value of the target point, and the first weight is positively correlated with the predicted probability value of the target point, and in a case that the search result includes the non-searched target point, the first weight may be determined as a first value, and the first value is a lower limit value of the first weight in a case that the search result includes the searched target point. Still search for line segment liUpper j th sampling point xijFor example, the first weight wc(xij) Can be expressed as:

in the above-mentioned formula (5),representing a search line segment liCapable of searching to a target point si,P(si| C) represents the target point siI.e. representing the target point siThe probability of a contour point of the object, target point siThe greater the predicted probability value of (a), the target point siThe higher the probability of being an object contour point, whereas the target point siThe smaller the predicted probability value of, the target point siThe lower the probability of being an object contour point. Furthermore, k1A negative constant is indicated for controlling the decay rate of the first weight with the predicted probability value, which may be set according to the application requirement, such as-1.25, and the like, and is not limited herein. When the target point s is as shown in equation (5)iWhen the predicted probability value of (1) is 1, the target point s is indicatediThe highest probability of being an object contour point, when the target point siHas the largest first weight (i.e., 1) when the target point s isiWhen the predicted probability value of (2) is 0, the target point s is indicatediThe lowest possible object contour point, the target point siWith the smallest first weight (i.e., exp (k))1) The first weight is a lower limit value of the first weight in the case that the search result includes the searched target point. It should be noted that if the target point s isiPredicting probability value P(s)iIf | C) is too small, the target point siSearch line segment liPossibly in an interfered state (e.g. in a partially blocked state, in a local area interfered by a similar color), the target point s is adjusted to be smalleriSearch line segment liThe first weight of each sampling point is added, so that the reference value of the sampling points in the subsequent pose parameter acquisition process can be reduced, the influence of interference factors on the pose parameters can be relieved as much as possible, and the precision of the pose parameters can be improved.

In another specific implementation scenario, the weight information may include a second weightThen, in a case where the search result includes the searched target point, a second weight of the sampling point may be determined based on a first distance corresponding to the sampling point, and the second weight is negatively correlated with the first distance, and in a case where the search result includes the non-searched target point, the second weight may be determined as a second numerical value, and the second numerical value is an upper limit value of the second weight in a case where the search result includes the searched target point. Still search for line segment liUpper j th sampling point xijFor example, the second weight wd(xij) Can be expressed as:

in the above-mentioned formula (6),representing a search line segment liCapable of searching to a target point si,D(xij,si) Representing a sample point xijCorresponding first distance, i.e. target point siTo sample point xijThe distance between them. Specifically, the first distance D (x)ij,si) May be based on sampling point xijFirst coordinate, target point siAnd the third coordinate of (2) and the sample point xijSearch line segment liLength N ofi(i.e., search line segment liThe number of included samples) is calculated, e.g. D (x)ij,si)=||xij-si||/Ni. Furthermore, k2A negative constant is indicated for controlling the decay rate of the second weight with the first distance, which may be set according to the application requirement, such as-3.5, and is not limited herein. When sampling point x, as shown in equation (6)ijAnd target point siA first distance D (x) between the two in the case of the same sampling pointij,si) A minimum (i.e. 0) is reached, at which point s is the target pointiHas the largest second weight (i.e., 1), and when sampling point xijAnd target point siRespectively in search line segment liTwo endsIn the case of (2), a first distance D (x) between the twoij,si) Reaches a maximum (i.e. 1) at which point s is the target pointiWith the smallest second weight (i.e., exp (k))2)). Note that the sampling point xijDistance target point siThe farther away, sample point xijThe easier it is to be in a disturbed state (e.g., disturbed by a complex background, disturbed by a similar color), the smaller the sampling point x isijCan lower the sampling point xijAnd the reference value in the subsequent pose parameter acquisition process is used for alleviating the influence of interference factors on the pose parameters as much as possible and improving the precision of the pose parameters.

In another specific implementation scenario, the weight information of the sample point may include both the first weight and the second weight, and in this case, the obtaining process of the first weight and the obtaining process of the second weight may refer to the obtaining manner of the first weight and the obtaining manner of the second weight, which is not described herein again. In addition, when the weight information includes both the first weight and the second weight, the first weight and the second weight are positively correlated with the reference weight. For example, the product of the first weight and the second weight may be used as the reference weight. Still search for line segment liUpper j th sampling point xijFor example, the first weight w may bec(xij) And a second weight wd(xij) The product of which is used as a sampling point xijReference weight w (x)ij). Other sampling points may be analogized, and are not exemplified here.

Step S13: and constructing an objective function based on the attribute information and the reference weight of the sampling point.

In one implementation scenario, as mentioned above, the attribute information of the sampling point may include: and obtaining a combined probability value of the sampling points based on the first product and the second product, and then carrying out weighted combination on the combined probability value based on the reference weight of each sampling point to obtain the target function.

In a specific implementation scenario, a logarithm may be taken of a sum of the first product and the second product to obtain a joint probability value, and the weighted results of the reference weights of the sampling points and the joint probability value are summed to obtain an objective function e (p):

in the above formula (7), He (d (x)ij) Represents a first degree of confidence, Pf(xij) Denotes a first probability value, 1-He (d (x)ij) Represents a second degree of confidence, Pb(xij) Representing a second probability value, w (x)ij) The reference weight and the specific obtaining process can be referred to the related description, and are not described herein again. Further, L represents a set of sample points on all search line segments.

In another specific implementation scenario, referring to fig. 2 in combination, the captured image includes a foreground region (i.e., the foreground region Ω in fig. 2) divided based on the projection profile (i.e., the projection profile in fig. 2)f) And a background region (i.e., background region Ω in fig. 2)b) Before constructing the objective function, the sampling points on the search line segment may be further verified. Taking the direction of the normal vector at the projection contour point as an example of pointing to a background region from a foreground region, when the directional euclidean distance of a sampling point is greater than a first distance value (e.g., 0), the sampling point can be considered to belong to the background region, if the sampling point actually belongs to the foreground region, the sampling point can be filtered, that is, filtered from the sampling point set L, for example, the lowermost search line segment in fig. 2, and the directional euclidean distances of two sampling points located at the leftmost side of the search line segment are both greater than the first distance value (e.g., 0), so that the two sampling points can be considered to belong to the background region, and actually the two sampling points belong to the foreground region, the two sampling points can be filtered; similarly, when the directional euclidean distance of a sample point is smaller than a second distance value (e.g., 0), the sample point may be considered to belong to the foreground region, and a number of sample points actually belong to the background region, which may be exceededFiltering, that is, filtering from the set L of sampling points, for example, in fig. 2, a line segment is searched at the upper left corner, and the two sampling points located at the rightmost side of the line segment have their directional euclidean distances both smaller than a second distance value (e.g., 0), so that the two sampling points can be considered to belong to the foreground region, and actually the two sampling points belong to the background region, and the two sampling points can be filtered.

Step S14: and obtaining the pose parameters of the target object in the shot image based on the target function.

In one implementation scenario, as described above, the projection profile is obtained by projecting a reference pose of the target object, the reference pose is a pose parameter of the target object in the reference image, and the reference image is captured before the image is captured, the objective function may be solved to obtain an updated parameter of the reference pose, and the updated parameter is used to optimize the reference pose to obtain a pose parameter of the target object in the captured image. Specifically, the reference image may be an image of a frame before the captured image, for example, the reference image may be a t-1 th frame image in the video data, and the captured image may be a t-th frame image in the video data, which may specifically refer to the foregoing related description, and details are not repeated herein.

In one particular implementation scenario, to facilitate minimizing the objective function using a non-linear algorithm, the objective function may be rewritten as a standard form of a non-linear weighted least squares problem:

F(xij,p)=-log[He(d(xij))Pf(xij)+(1-He(d(xij)))Pf(xij)]……(9)

in the above formula (8), ψ (x)ij)=1/F(xijP). On the basis, the optimization problem can be iteratively solved through a Gauss-Newton algorithm, and the Jacobian vector is defined as:

in the above-mentioned formula (12),representing a smoothed dirac delta function, which can be represented by a first confidence He (d (x)ij) Can be found in particular in the abovementioned formula (4). In addition to this, the present invention is,the derivation can be performed by the foregoing formula (2), and the specific derivation process can refer to the relevant details of the gauss-newton algorithm, which is not described herein again. Based on the jacobian vector and the gauss-newton algorithm, an update parameter Δ p can be derived:

in another specific implementation scenario, the update parameter Δ p is expressed by a lie algebra, and in order to facilitate optimization of the reference pose, Δ p may be converted into a euclidean transformation matrix Δ T, and the specific conversion process may refer to details of related technologies of a lie group and a lie algebra, which are not described herein again. On the basis, the pose parameter T' of the target object in the captured image can be expressed as:

T′=ΔT·T……(14)

in an implementation scenario, in the case that a plurality of target objects exist, if the plurality of target objects are not mutually occluded, the pose parameters of each target object in the captured image may be obtained by using the steps in the embodiment of the present disclosure. Conversely, if there is a block between multiple target objects, then it is possibleTo use the aforementioned mask image IsAnd depth image IdTo filter out samples that are in an interfered state (e.g., occluded).

In a specific implementation scenario, the depth image IdThe captured image may be rendered, and the specific rendering process is not described herein again. Depth image IdThe specific information may include depth values of each pixel point in the captured image.

In another specific implementation scenario, in the process of acquiring the pose parameter of the kth target object in the captured image, a background area corresponding to the kth target object may be searched firstProjection contour point m inside and with the search line segmentiAdjacent sample point xijAnd check Is(xij) Is equal to the index of another target object, and samples point xijDepth value of (I)d(xij) Projection contour point m smaller than search line segmentiDepth value of (I)d(mi) If yes, the sampling point x can be considered asijLocation search line segment liIn a disturbed state (e.g., occluded), the search line segment l may be filterediAnd (6) uploading all sampling points. Referring to fig. 4a to 4c, fig. 4a is a schematic diagram of an embodiment of a captured image, fig. 4b is a schematic diagram of another embodiment of a mask image, and fig. 4c is a schematic diagram of an embodiment of a search line segment. As shown in fig. 4a to 4c, two target objects, namely, a duck and a squirrel, exist in the shot image, and the duck is shielded by the squirrel, so that in the process of acquiring the pose parameters of the duck in the shot image, search line segments near the shielded projection outline can be filtered, so that negative influences on the acquired pose parameters caused by interference factors such as layout shielding and the like are linked as far as possible, and the accuracy of the pose parameters is improved.

In one implementation scenario, it is noted that the local color histogram is constructed based on local regions surrounding the object contour, and meanwhile, in order to enhance the time continuity, each local region corresponds toA model vertex. However, in the case where the three-dimensional model of the target object contains fewer vertices (e.g., less than 50 vertices), these local regions may not completely cover the object contour, thereby affecting the first probability value PfAnd a second probability value PbThe accuracy of (2). In view of this, in the case that the three-dimensional model of the target object contains less vertices than the preset threshold (e.g., 50), several (e.g., 4) vertices may be added to each edge of the three-dimensional model to increase the number of local areas, so as to enable the local areas to cover the object contour as much as possible. Referring to fig. 5a to 5c, fig. 5a is a schematic diagram of another embodiment of a captured image, fig. 5b is a schematic diagram of an embodiment of a layout area, and fig. 5c is a schematic diagram of another embodiment of a local area. As shown in fig. 5a to 5c, in the case where the number of vertices (shown as solid circles in the figure) is small (only 4 in fig. 5 b), the local area (shown as hollow circles in the figure) does not completely cover the object contour of the target object, and in this case, the local area can completely cover the object contour by adding vertices (e.g., up to 8) on each side.

In one implementation scenario, the pose parameters of the target object in the captured image may be obtained through multiple iterations (e.g., 7 iterations). In particular, in the first iteration process, the pose parameters of the target object in the reference image can be used as the reference position, and executing the steps in the embodiment of the disclosure to obtain the pose parameters of the target object in the shooting image during the first iteration, and the pose is taken as the reference pose of the second iteration, and the steps in the embodiment of the disclosure are executed again to obtain the pose parameters of the target object in the shooting image during the second iteration, and so on, in the ith iteration, the pose parameter obtained in the (i-1) th iteration is used as a reference pose, and executing the steps in the embodiment of the disclosure to obtain the pose parameters of the target object in the shooting image in the ith iteration until the last iteration, the pose parameter of the target object in the image shot in the last iteration can be directly used as the final pose parameter of the target object in the shot image.

According to the scheme, a plurality of sampling points which are positioned on a search line segment in a shot image are obtained, the search line segment passes through a projection contour point of a target object in the shot image, the projection contour point is positioned on the projection contour of the target object, attribute information of the sampling points is obtained based on the projection contour point, reference weights of the sampling points are obtained, the attribute information represents the possibility that the sampling points belong to the target object, an objective function is constructed based on the attribute information and the reference weights of the sampling points, the pose parameters of the target object in the shot image are obtained based on the objective function, the objective function is constructed based on the attribute information and the reference weights of the sampling points, so that on one hand, the possibility that the sampling points belong to the target object can be referred to by the attribute information, on the other hand, the reference values of the sampling points in the subsequent pose parameter solving process can be referred by the reference weights, and then the influence of interference factors on pose solving can be relieved as much as possible, and the accuracy of pose parameters can be improved.

Referring to fig. 6, fig. 6 is a schematic flowchart illustrating an embodiment of step S12 in fig. 1. Specifically, the method may include the steps of:

step S61: and searching a target point in a plurality of sampling points on the search line segment to obtain a search result.

In the embodiments of the present disclosure, the target points are used to represent object contour points of the target object. Please refer to FIG. 2, still search for the line segment liFor example, search line segment liUp sampling point siCan be used for representing object contour points, and the like in other cases, which are not exemplified herein.

In an implementation scenario, for each search line segment, a plurality of sampling points on the search line segment may be respectively used as current points, and when a reference probability difference of the current points satisfies a first condition, the current points may be used as candidate points, and candidate points whose prediction cost values satisfy a second condition are selected as target points. According to the mode, rough selection can be performed on the basis of the reference probability difference value, and then fine selection can be performed on the basis of the predicted cost value, so that the efficiency and the accuracy of target point screening can be improved.

In a specific implementation scenario, the reference probability difference of the current point may be a preset bit from the current pointThe difference between the first probability values of two sample points in a relationship (e.g., adjacent to the current point). To improve the convenience of accessing the first probability values of different sampling points, as shown in fig. 7a, all the search line segments in fig. 3 may be stacked in rows to construct a bundle image I of the search line segmentsbAnd as shown in FIG. 7b, stacking the first probability values of the sampling points on all the search line segments in FIG. 3 by rows, and constructing a cluster image I related to the first probability valuesp. As described in the foregoing disclosure, the search line segment includes 2 × N +1 sampling points, wherein the sampling point at the middle position is a projection contour point, one side of the projection contour point corresponds to the foreground region, and the other side of the projection contour point corresponds to the background region, so that the cluster image IbThe middle column corresponds to the projection profile, one side of the middle column corresponds to the foreground region, and the other side of the middle column corresponds to the background region.

In another specific implementation scenario, the first condition may include that the reference probability difference is greater than a preset threshold, and the bundle image I is obtained after constructionpThereafter, a preset convolution kernel (e.g., f [ -101 ]) may be utilized]) In a bundle image IpEach row is subjected to sliding convolution, and sampling points with convolution responses higher than a preset threshold epsilon (e.g., 0.3) are taken as candidate points.

In another specific implementation scenario, the candidate points may be object contour points, the candidate points may also be foreground interference points, and the candidate points may also be background interference points. To improve the classification accuracy, for the search line segment liUpper j th sampling point xijIn other words, the line segment l can be searchediSelecting a plurality of continuous sampling points from a section pointing to the background area to form a first sampling point set(e.g., x may be included)i,j-1,xi,j-2,xi,j-3) And searching for the line segment liSelecting a plurality of continuous sampling points at a section pointing to the foreground region to form a second sampling point set(e.g., x may be included)i,j+1,xi,j+2,xi,j+3). Therefore, under the condition that the sampling points are the object contour points, the first sampling point setShould theoretically belong to the background region, and the second set of sample pointsTheoretically belonging to the foreground region, so the probability value P (h) of the sampling point as the object contour pointij| C) may be expressed as:

in addition, in hijIn the case of candidate point, P (h)ijI C) is the prediction probability value of the candidate point as the object contour point; as described in the above-mentioned embodiments, at the candidate point hijCan be used as a target point siIn the case of (b), P (h)ij| C) can be written as P(s)iI.e., a predicted probability value that can be used as a target point and can be used as an object contour point.

Similarly, in the case where the sampling points are foreground noisy points, the first set of sampling pointsAnd a second set of sample pointsTheoretically all belong to the foreground region, so the probability value P (h) of the sampling point as the foreground interference pointijIf) can be expressed as:

in addition, in hijIn the case of candidate point, P (h)ijI F) is the waiting timeAnd selecting the point as the prediction probability value of the foreground interference point.

Similarly, where the sampling points are background interference points, a set of sampling pointsAnd a second set of sample pointsTheoretically, all the samples belong to the background area, so the probability value P (h) of the sampling point as the background interference pointij| B) may be expressed as:

in addition, in hijIn the case of candidate point, P (h)ijAnd | B) is the prediction probability value of the candidate point as the background interference point.

On the basis, the sampling point can be further defined as the normalized probability value P of the object contour pointc(hij):

In addition, in hijIn the case of a candidate point, Pc(hij) Namely the normalized probability value of the candidate points as the object contour points.

In a further specific implementation scenario, the predicted probability value P (h) of the candidate points is obtained as the object contour pointsijC) or the normalized probability value P of the candidate points as the object contour pointsc(hij) Thereafter, the prediction probability value P (h) may be further filteredij| C) candidate points satisfying the third condition. For example, the prediction probability value P (h) may be filteredijC) is less than the aforementioned probability value P (h)ijL F) and probability value P (h)ij| B) the candidate point of the maximum of the two, i.e. for candidate point hijIf P (h) is satisfiedij|C)<max(P(hij|B),P(hijIf), the candidate point h can be setijFiltering; alternatively, the probability value P (h) may be based on the prediction as previously describedij| C) to obtain a normalized probability value Pc(hij) And filtering the normalized probability value Pc(hij) Candidate points smaller than a preset threshold (e.g., 0.5) are not limited herein.

In yet another specific implementation scenario, the predicted cost value may include at least one of a first cost value and a second cost value, such as both the first cost value and the second cost value, only the first cost value, or only the second cost value. The first generation value may be related to the prediction probability value of the candidate point, for example, the first generation value may be negatively related to the prediction probability value of the candidate point, and for convenience of description, the first generation value may be denoted as Ed(hij) Then the first generation value Ed(hij) Can be expressed as:

candidate point h is shown in equation (19)ijPredicted probability value P (h) ofijThe larger | C), the first generation value E of the target pointd(hij) The smaller.

In addition, the second cost value is related to a second distance from the candidate point to the projected contour point on the search line segment, for example, the second cost value can be positively related to the second distance, and for convenience of description, the second cost value can be denoted as ES(hij) Then the second generation value ES(hij) Can be expressed as:

ES(hij)=||hij-mi||2……(20)

candidate point h is shown in equation (20)ijTo search line segment liProjected contour point m oniSecond distance hij-miThe larger | |, the second generation value E of the target pointS(hij) The larger.

To say thatIt is clear that, when the prediction cost value includes both the first generation value and the second generation value, the first generation value and the second generation value may be weighted as the prediction cost value E (h)ij):

E(hij)=Ed(hij)+λEs(hij,mi)……(21)

In the above formula (21), λ represents a weighting factor, which may be specifically set according to the actual application requirement, for example, may be set to 0.015, and is not limited herein. The second condition may specifically include that the prediction cost value is minimum, that is, in a case where the inter-frame motion of the target object or the camera is relatively mild, the second cost value imposes an additional penalty on the candidate points farther from the projection contour, so as to preferentially select the candidate points closer to the projection contour as the target point.

In the screening process, the line segment l is searchediIf the target point is not searched, then the search line segment l can be searchediCan markTo indicate for the search line segment liIn other words, the search result includes that the target point is not searched.

Step S62: and respectively acquiring the weight information of a plurality of sampling points on the search line segment based on the search result.

In an embodiment of the disclosure, the weight information includes at least one of a first weight and a second weight, the first weight is related to a predicted probability value of the target point, the predicted probability value represents a possibility that the sample point is the object contour point, and the second weight is related to a first distance from the target point to the sample point. Reference may be made to the related description in the foregoing embodiments, which are not repeated herein.

Step S63: and obtaining the reference weight of the sampling point based on the weight information.

Reference may be made to the related description in the foregoing embodiments, which are not repeated herein.

According to the scheme, the target point is searched in the plurality of sampling points on the search line segment to obtain the search result, the target point is used for representing the object contour point of the target object, the weight information of the plurality of sampling points on the search line segment is respectively obtained based on the search result, the weight information comprises at least one of the first weight and the second weight, the first weight is related to the predicted probability value of the target point, the predicted probability value represents the possibility that the sampling point is used as the object contour point, and the second weight is related to the first distance from the target point to the sampling point, so that the first weight and the second weight can represent the reference values of the sampling points from different angles, the reference weight of the sampling point is obtained based on the weight information, and the reference value of the reference weight in the subsequent pose parameter solving process can be improved.

Referring to fig. 8, fig. 8 is a schematic flowchart of another embodiment of the pose acquisition method according to the present application. The method specifically comprises the following steps:

step S801: and performing down-sampling on the shot image to obtain pyramid images with a plurality of resolutions.

For example, 2 may be used as a down-sampling magnification to down-sample the captured image, thereby obtaining a pyramid image of 1/4 resolution, a pyramid image of 1/2 resolution, and a pyramid image of the original resolution (i.e., the captured image itself). Other cases may be analogized, and no one example is given here.

Step S802: and sequentially selecting pyramid images as the current shot image according to the resolution ratio from small to large.

For example, a pyramid image with 1/4 resolution may be selected as the current captured image, the following steps are performed to obtain the pose parameters of the target object in the pyramid image with 1/4 resolution, and then a pyramid image with 1/2 resolution may be selected as the current captured image, and the above steps are repeated, which is not illustrated here.

Step S803: and acquiring a plurality of sampling points positioned on the search line segment in the current shot image.

In the embodiment of the disclosure, the search line segment passes through the projection contour point of the target object in the shot image, the projection contour point is located on the projection contour of the target object, and the projection contour is obtained by projection by using the reference pose of the target object. Reference may be made to the related description in the foregoing embodiments, which are not repeated herein.

Step S804: and acquiring attribute information of the sampling point and acquiring a reference weight of the sampling point.

In the embodiment of the present disclosure, the attribute information indicates the possibility that the sampling point belongs to the target object. Reference may be made to the related description in the foregoing embodiments, which are not repeated herein.

Note that the attribute information includes: the first probability value and the first reliability of the sample point belonging to the target object, and the second probability value and the second reliability of the sample point not belonging to the target object, and the calculation process of the first reliability can refer to formula (4) and the related description in the foregoing disclosed embodiment, and the smoothing factor s in formula (4) is negatively related. For example, the smoothing factor s may be set to 1.2 for a pyramid image of 1/4 resolution, 0.8 for a pyramid image of 1/2 resolution, and 0.6 for a pyramid image of the original resolution (i.e., the captured image itself), without limitation.

Step S805: and constructing an objective function based on the attribute information and the reference weight of the sampling point.

Reference may be made to the related description in the foregoing embodiments, which are not repeated herein.

Step S806: and obtaining the pose parameters of the target object in the current shooting image based on the target function.

Reference may be made to the related description in the foregoing embodiments, which are not repeated herein.

It should be noted that, as described in the foregoing disclosure, for the captured image, the pose parameters of the target object in the captured image may be obtained through multiple iterations. Similarly, for the pyramid image, the pose parameters of the target object in the pyramid image can be obtained through a plurality of iterations, and the lower the resolution of the pyramid image, the more the iterations are. For example, it may iterate 4 times for a pyramid image of 1/4 resolution, 2 times for a pyramid image of 1/2 resolution, and 1 time for a pyramid image of the original resolution (i.e., the captured image itself). For a specific iterative process, reference may be made to the related description in the foregoing disclosed embodiments, which is not described herein again.

Step S807: and judging whether the current shot image is the pyramid image of the last frame or not, if not, executing the step S808, otherwise, executing the step S810.

And under the condition that the current shot image is the last frame of pyramid image, the pose parameter of the target object in the last frame of pyramid image can be used as the final pose parameter of the target object in the shot image, otherwise, the iterative process can be continued.

Step S808: and taking the pose parameter obtained by the execution as a reference pose.

And under the condition that the current shot image is not the pyramid image of the last frame, the pose parameter obtained by the execution at this time can be used as the reference pose, and the iteration operation is executed on the pyramid image of the next frame.

Step S809: step S802 and subsequent steps are re-executed.

That is, in the case where the currently captured image is not the last frame pyramid image, the iterative operation is performed on the next frame pyramid image.

Step S810: and taking the pose parameter obtained by the execution as the final pose parameter of the target object in the shot image.

And under the condition that the current shot image is the last frame of pyramid image, finishing the iterative operation to obtain the final pose parameter of the target object in the shot image.

According to the scheme, the projection contour is obtained by projecting the reference pose of the target object, so that before projection sampling, a shot image is subjected to down-sampling to obtain pyramid images with a plurality of resolutions, the pyramid images are sequentially selected as the current shot image according to the resolution from small to large, the step of acquiring a plurality of sampling points on a search line segment in the shot image and the subsequent steps are executed on the current shot image, the reference pose adopted in the current execution is the pose parameter obtained in the last execution, and the pose parameter obtained in the last execution is used as the final pose parameter of the target object in the shot image, so that the pose parameter can be estimated from rough to fine in the process of acquiring the pose parameter, and the efficiency and the accuracy of acquiring the pose parameter can be improved.

Referring to fig. 9, fig. 9 is a schematic frame diagram of an embodiment of the pose acquisition apparatus 90 according to the present application. The posture acquiring apparatus 90 includes: the system comprises a projection sampling module 91, an information extraction module 92, a function construction module 93 and a pose solving module 94, wherein the projection sampling module 91 is used for acquiring a plurality of sampling points positioned on a search line segment in a shot image; the search line segment passes through a projection contour point of a target object in the shot image, and the projection contour point is located on the projection contour of the target object; the information extraction module 92 is configured to obtain attribute information of the sampling point and obtain a reference weight of the sampling point; wherein the attribute information represents a possibility that the sampling point belongs to the target object; the function building module 93 is configured to build an objective function based on the attribute information and the reference weight of the sampling point; the pose solving module 94 is configured to obtain pose parameters of the target object in the captured image based on the objective function.

In some disclosed embodiments, the information extraction module 92 includes a target point search sub-module, configured to search for a target point in a plurality of sampling points on a search line segment to obtain a search result; the target point is used for representing an object contour point of the target object; the information extraction module 92 includes a weight information obtaining sub-module, configured to obtain weight information of a plurality of sampling points on the search line segment, respectively, based on the search result; wherein the weight information includes at least one of a first weight and a second weight, the first weight is related to a predicted probability value of the target point, the predicted probability value represents a possibility that the sampling point is the object contour point, and the second weight is related to a first distance from the target point to the sampling point; the information extraction module 92 includes a reference weight obtaining sub-module, configured to obtain reference weights of the sampling points based on the weight information.

In some disclosed embodiments, the attribute information includes: the sampling point belongs to a first probability value of the target object; the target point searching submodule comprises a current point acquisition unit used for taking a plurality of sampling points as current points respectively for each searching line segment, the target point searching submodule comprises a candidate point acquisition unit used for taking the current points as candidate points under the condition that the reference probability difference value of the current points meets a first condition, and the target point searching submodule comprises a target point acquisition unit used for selecting the candidate points with the prediction cost values meeting a second condition as target points; the reference probability difference value of the current point is the difference between first probability values of two sampling points with a preset position relation with the current point, the prediction cost value comprises at least one of a first generation value and a second generation value, the first generation value is related to the prediction probability value of the candidate point, and the second generation value is related to a second distance from the candidate point to a projection contour point on the search line segment.

In some disclosed embodiments, the target point search submodule includes a candidate point filtering unit for filtering candidate points whose prediction probability values satisfy a third condition.

In some disclosed embodiments, the predetermined positional relationship is adjacent to the current point; and/or, the second condition comprises a predicted cost value minimum; and/or the first generation value is negatively correlated with the predictive probability value of the candidate point, and the second generation value is positively correlated with the second distance.

In some disclosed embodiments, the weight information includes a first weight; the weight information acquisition sub-module comprises a first determination unit, a second determination unit and a weight information acquisition sub-module, wherein the first determination unit is used for determining a first weight of a sampling point based on the predicted probability value of the target point under the condition that the search result comprises that the target point is searched, and the first weight is positively correlated with the predicted probability value of the target point; the weight information acquisition submodule comprises a second determination unit and a second determination unit, wherein the second determination unit is used for determining the first weight as a first numerical value under the condition that the search result comprises that the target point is not searched; the first value is a lower limit value of the first weight when the search result includes the searched target point.

In some disclosed embodiments, the weight information includes a second weight; the weight information acquisition sub-module comprises a third determination unit, and is used for determining a second weight of the sampling point based on the first distance corresponding to the sampling point under the condition that the search result comprises the searched target point, wherein the second weight is in negative correlation with the first distance; the weight information acquisition submodule comprises a fourth determination unit and a second determination unit, wherein the fourth determination unit is used for determining the second weight as a second numerical value under the condition that the search result comprises that the target point is not searched; wherein the second value is an upper limit value of the second weight in a case where the search result includes the searched target point.

In some disclosed embodiments, the weight information includes a first weight and a second weight, and the first weight, the second weight and the reference weight are positively correlated.

In some disclosed embodiments, the attribute information includes: the sampling point belongs to a first probability value and a first credibility of the target object, and the sampling point does not belong to a second probability value and a second credibility of the target object; the function building module 93 includes a joint probability calculation submodule, configured to obtain a first product of the first reliability and the first probability value and a second product of the second reliability and the second probability value, and obtain a joint probability value of the sampling point based on a sum of the first product and the second product; the function building module 93 includes a joint probability weighting submodule, configured to obtain a target function based on a weighting result of the reference weight of each sampling point to the joint probability value.

In some disclosed embodiments, the first confidence level and the second confidence level are in a negative correlation relationship, the first confidence level of the sampling point and the directional euclidean distance from the corresponding projected contour point to the sampling point are in a negative correlation relationship, and the corresponding projected contour point and the sampling point are located on the same search line segment.

In some disclosed embodiments, the captured image includes a foreground region and a background region divided based on the projection profile; the function building module 93 includes a first filtering submodule, configured to filter a sampling point when a directional euclidean distance of the sampling point is greater than a first distance value and the sampling point belongs to a foreground region; the function building module 93 includes a second filtering sub-module, configured to filter the sampling point when the directional euclidean distance of the sampling point is smaller than the second distance value, and the sampling point belongs to the background region.

In some disclosed embodiments, the projection profile is projected using a reference pose of the target object; the pose acquisition device 90 includes a down-sampling module, which is used for down-sampling the shot image to obtain pyramid images with a plurality of resolutions; the pose acquisition device 90 comprises an image selection module, a projection sampling module 91, an information extraction module 92, a function construction module 93 and a pose solving module 94, wherein the image selection module is used for sequentially selecting pyramid images as a current shooting image according to the resolution from small to large; the reference pose adopted by the current execution is the pose parameter obtained by the last execution, and the pose parameter obtained by the last execution is used as the final pose parameter of the target object in the shot image.

In some disclosed embodiments, the projection profile is projected using a reference pose of the target object, the reference pose being pose parameters of the target object in the reference image, and the reference image being captured prior to capturing the image; the pose solving module 94 comprises a function solving submodule for solving the objective function to obtain an update parameter of the reference pose; the pose solving module 94 includes a pose optimization sub-module for optimizing the reference pose with the updated parameters to obtain pose parameters.

Referring to fig. 10, fig. 10 is a schematic block diagram of an embodiment of an electronic device 100 according to the present application. The electronic device 100 includes a memory 101 and a processor 102 coupled to each other, and the processor 102 is configured to execute program instructions stored in the memory 101 to implement the steps of any of the above-described pose acquisition method embodiments. In one particular implementation scenario, electronic device 100 may include, but is not limited to: a microcomputer, a server, and the electronic device 100 may further include a mobile device such as a notebook computer, a tablet computer, and the like, which is not limited herein.

Specifically, the processor 102 is configured to control itself and the memory 101 to implement the steps of any of the above-described pose acquisition method embodiments. Processor 102 may also be referred to as a CPU (Central Processing Unit). The processor 102 may be an integrated circuit chip having signal processing capabilities. The Processor 102 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. Additionally, the processor 102 may be commonly implemented by integrated circuit chips.

By the aid of the scheme, influence of interference factors on pose solving can be relieved as far as possible, and accuracy of pose parameters can be improved.

Referring to fig. 11, fig. 11 is a block diagram illustrating an embodiment of a computer-readable storage medium 110 according to the present application. The computer-readable storage medium 110 stores program instructions 111 that can be executed by the processor, and the program instructions 111 are used for implementing the steps of any of the above-described pose acquisition method embodiments.

By the aid of the scheme, influence of interference factors on pose solving can be relieved as far as possible, and accuracy of pose parameters can be improved.

In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely one type of logical division, and an actual implementation may have another division, for example, a unit or a component may be combined or integrated with another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.

Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on network elements. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:多用户运动手势控制方法、装置、智能音箱和介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类