Sub-pixel pose determination method, device, equipment and storage medium
By constructing a superdensity function to determine subpixel pose, the problem of long computation time in existing technologies is solved, and efficient and high-precision subpixel pose calculation is achieved.
Patent Information
- Application Number
- CN202211404684.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-10
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-11-10
AI Technical Summary
Existing technologies suffer from excessive computation time when calculating sub-pixel pose for contour matching at high speed and with high precision, making it difficult to achieve high-precision sub-pixel positioning without increasing runtime.
By obtaining the pixel-level pose of the target to be matched in the multidimensional parameter space, a superdensity function is constructed, and the sub-pixel pose is determined using the superdensity function, thereby reducing the amount of computation and improving computational efficiency.
It achieves high-precision calculation of sub-pixel pose for contour matching without increasing computation time, thus improving positioning accuracy and speed.
Smart Images

Figure CN115984370B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision technology, and in particular to a method, apparatus, device, and storage medium for determining subpixel pose. Background Technology
[0002] Contour matching technology is widely used in machine vision, and contour-based matching is the most common localization method. In high-precision localization applications, it is necessary to further improve to sub-pixel accuracy. Generally, this requires positional accuracy of less than 0.1 pixels for the x and y axes in the row and column directions, and angular accuracy of less than 0.1 degrees for rotation. In situations with specific requirements for runtime and performance, it is crucial to improve sub-pixel accuracy without increasing runtime. There are two main methods for localization: 1) A fractional interpolation method, which performs interpolation based on a fractional fitting function and calculates the location of the maximum point, which represents the desired sub-pixel accurate position and angle values; 2) A least-squares iterative method, which minimizes the distance function from all template contour points to their corresponding image points. Through multiple iterations, the row and column positions of x and y, as well as the angle rotation, are adjusted to reduce the distance values, gradually approaching the sub-pixel accurate position and angle values. However, as accuracy increases, runtime also increases. Therefore, how to calculate the sub-pixel pose of contour matching quickly and accurately has become a pressing problem.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this invention is to provide a subpixel pose determination method, apparatus, device, and storage medium, aiming to solve the technical problem of how to calculate the subpixel pose of contour matching at high speed and with high accuracy.
[0005] To achieve the above objectives, the present invention provides a sub-pixel pose determination method, which includes the following steps:
[0006] Obtain the pixel-level pose of the target to be matched in the multidimensional parameter space;
[0007] Using the pixel-level pose as the center, obtain the parameter space score corresponding to each pose point within the preset parameter space range;
[0008] Construct a hyperdensity function based on each pose point and the corresponding parameter space score;
[0009] The sub-pixel pose of the target to be matched is determined based on the superdensity function.
[0010] Optionally, the step of obtaining the pixel-level pose of the target to be matched in the multidimensional parameter space through contour matching specifically includes:
[0011] The initial pixel-level pose of the target to be matched in the multidimensional parameter space is obtained by contour matching;
[0012] Obtain a preset number of sample points corresponding to each parameter dimension in the initial pixel-level pose;
[0013] Pixel-level pose is determined based on the sample points.
[0014] Optionally, the step of determining the pixel-level pose based on the sample points specifically includes:
[0015] Construct a parabolic equation based on the sample points, and obtain the extreme value positions corresponding to the parabolic equation;
[0016] Obtain the distance between the extreme position and the initial pixel-level pose;
[0017] When the distance is less than the threshold distance, the primary pixel-level pose is taken as the pixel-level pose.
[0018] Optionally, after the step of obtaining the distance between the extreme value position and the initial pixel-level pose, the method further includes:
[0019] When the distance is greater than or equal to the threshold distance, the initial pixel-level pose is updated according to the distance, and the step of obtaining a preset number of sample points corresponding to each parameter dimension in the initial pixel-level pose is returned until the distance is less than the threshold distance, and the updated pixel-level pose is obtained.
[0020] The updated pixel-level pose is used as the pixel-level pose.
[0021] Optionally, the step of constructing the hyperdensity function based on each pose point and the corresponding parameter space score of each pose point specifically includes:
[0022] Construct an initial hyperdensity function based on each pose point and the corresponding parameter space score;
[0023] The initial hyperdensity function is fitted with a surface to obtain the hyperdensity function.
[0024] Optionally, the step of determining the sub-pixel pose of the target to be matched based on the superdensity function specifically includes:
[0025] Obtain the stationary point pose corresponding to the hyperdensity function;
[0026] Obtain the Hessian matrix corresponding to the hyperdensity function;
[0027] The subpixel pose of the target to be matched is determined based on the stationary pose and the Hessian matrix.
[0028] Optionally, the step of determining the sub-pixel pose of the target to be matched based on the stationary point pose and the Hessian matrix specifically includes:
[0029] Substitute the stationary point pose into the Hessian matrix to obtain the target matrix;
[0030] When the target matrix is a negative definite matrix, the stationary point pose is used as the sub-pixel pose of the target to be matched.
[0031] Furthermore, to achieve the above objectives, the present invention also provides a sub-pixel pose determination device, the sub-pixel pose determination device comprising:
[0032] The pose acquisition module is used to acquire the pixel-level pose of the target to be matched in the multi-dimensional parameter space;
[0033] The spatial score acquisition module is used to acquire the parameter spatial score corresponding to each pose point within a preset parameter space range, with the pixel-level pose as the center.
[0034] The function construction module is used to construct a hyperdensity function based on each pose point and the corresponding parameter space score of each pose point.
[0035] The subpixel pose determination module is used to determine the subpixel pose of the target to be matched based on the superdensity function.
[0036] Furthermore, to achieve the above objectives, the present invention also proposes a subpixel pose determination device, the subpixel pose determination device comprising: a memory, a processor, and a subpixel pose determination program stored in the memory and executable on the processor, the subpixel pose determination program being configured to implement the steps of the subpixel pose determination method as described above.
[0037] Furthermore, to achieve the above objectives, the present invention also proposes a storage medium storing a sub-pixel pose determination program, wherein when the sub-pixel pose determination program is executed by a processor, it implements the steps of the sub-pixel pose determination method as described above.
[0038] This invention obtains the pixel-level pose of the target to be matched in a multi-dimensional parameter space. Centered on the pixel-level pose, it acquires the parameter space scores corresponding to each pose point within a preset parameter space range. Then, it constructs a super-density function based on each pose point and its corresponding parameter space scores, and finally determines the sub-pixel pose of the target to be matched based on the super-density function. By obtaining the parameter space scores corresponding to each pose point within a preset parameter space range centered on the pixel-level pose, this invention reduces computational complexity. Furthermore, by determining the sub-pixel pose of the target to be matched based on the super-density function, compared to existing methods that calculate sub-pixel poses using score interpolation or least-squares iteration, this invention enables high-speed and high-precision calculation of the sub-pixel pose for contour matching based on the super-density function. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of the sub-pixel pose determination device for the hardware operating environment involved in the embodiments of the present invention;
[0040] Figure 2 This is a flowchart illustrating the first embodiment of the subpixel pose determination method of the present invention.
[0041] Figure 3 This is a schematic diagram of the initial superdensity function of the two-dimensional parameter space in an embodiment of the subpixel pose determination method of the present invention;
[0042] Figure 4 This is a schematic diagram of the hyperdensity function of the two-dimensional parameter space in an embodiment of the subpixel pose determination method of the present invention;
[0043] Figure 5 This is a flowchart illustrating the second embodiment of the subpixel pose determination method of the present invention;
[0044] Figure 6 This is a flowchart illustrating the third embodiment of the subpixel pose determination method of the present invention;
[0045] Figure 7 This is a structural block diagram of the first embodiment of the subpixel pose determination device of the present invention.
[0046] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0047] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0048] Reference Figure 1 , Figure 1 This is a schematic diagram of the sub-pixel pose determination device structure for the hardware operating environment involved in the embodiments of the present invention.
[0049] like Figure 1 As shown, the subpixel pose determination device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0050] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the subpixel pose determination device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0051] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a subpixel pose determination program.
[0052] exist Figure 1 In the subpixel pose determination device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the subpixel pose determination device of the present invention can be set in the subpixel pose determination device, and the subpixel pose determination device calls the subpixel pose determination program stored in the memory 1005 through the processor 1001 and executes the subpixel pose determination method provided in the embodiment of the present invention.
[0053] Based on the aforementioned subpixel pose determination device, this embodiment of the invention provides a subpixel pose determination method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the subpixel pose determination method of the present invention.
[0054] In this embodiment, the sub-pixel pose determination method includes the following steps:
[0055] Step S10: Obtain the pixel-level pose of the target to be matched in the multidimensional parameter space;
[0056] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a personal computer, or an electronic device or subpixel pose determination device capable of performing the above functions. The following description uses the subpixel pose determination device as an example to illustrate this embodiment and the subsequent embodiments.
[0057] Understandably, this embodiment can determine the pixel-level position of the target to be matched using contour matching technology. Contour matching is the most commonly used localization method because the contour edges of an image contain the most important information in the image, are not easily affected by various internal and external factors, and have high stability and consistency. The edge gradients of the image are also very convenient to handle translation, scaling, rotation, etc., requiring only simple geometric transformation operations. Using the edge gradients of the image contour for matching and localization is currently the most commonly used and effective technique among various matching and localization methods. Due to its advantages such as simple calculation, strong anti-interference ability, stable and reliable matching results, ease of parallel acceleration, and simple handling of rotation and scaling, it has become the most common standard method in the field of machine vision.
[0058] It should be understood that the target to be matched refers to the target that matches the template in the sub-pixel contour region of the target image, that is, the target that is similar to the template. The image parameter space in which the target to be matched is located includes the target's row and column position, rotation angle, scaling size, etc. If there are other requirements, they can also be added to this parameter space, and the entire image parameter space constitutes a multi-dimensional parameter space.
[0059] Generally, pixel-level pose data includes the x (column) and y (row) positions on the image plane, which is a two-dimensional parameter space. When the rotation direction needs to be calculated and an angle is added, it becomes a three-dimensional parameter space. If the scaling scale needs to be calculated and the scaling amount is added, it becomes a four-dimensional parameter space. If there are other parameter space data requirements, such as different scaling in the row and column directions, or projection plane transformation, it becomes a more multi-dimensional parameter space. This embodiment does not impose specific restrictions on the parameter dimensions of pixel-level pose.
[0060] Step S20: Using the pixel-level pose as the center, obtain the parameter space score corresponding to each pose point within the preset parameter space range;
[0061] Understandably, the preset parameter space range refers to a pre-set parameter space range, which can include the parameter space range corresponding to each parameter dimension in the pixel-level pose. For example, assuming the pixel-level pose p(x) p ,y p ,r p,s p ), where x p For column coordinates, y p Let r be the row coordinate. p s is the angle value. p The scaling factor is the parameter space fraction s. loc (x i ,y j ,r k ,s t The preset parameter space range can be set to i∈[-4,4],j∈[-4,4],k∈[-3,3],t∈[-3,3], and can also be set to other values. This embodiment does not impose specific restrictions on this.
[0062] In a specific implementation, the preset parameter space centered on the pixel-level pose may include multiple pose points. Each pose point has a corresponding parameter space score. The larger the parameter space score, the higher the degree of matching between the pose point and the template. The specific method for obtaining the parameter space score can refer to the existing technology, and this embodiment will not elaborate on it further.
[0063] Step S30: Construct the hyperdensity function based on each pose point and the corresponding parameter space score;
[0064] It should be noted that the hyperdensity function is a function with each pose point as the independent variable and the parameter space score corresponding to each pose point as the dependent variable.
[0065] Furthermore, in order to accurately determine the superdensity function, in this embodiment, step S30 includes: constructing an initial superdensity function based on each pose point and the parameter space score corresponding to each pose point; and performing surface fitting on the initial superdensity function to obtain the superdensity function.
[0066] Understandably, the initial hyperdensity function is also a function with each pose point as the independent variable and the corresponding parameter space score as the dependent variable. Assuming each pose point corresponds to a four-dimensional parameter space, the initial hyperdensity function is a quaternary function; knowing each pose point and its corresponding parameter space score, the initial hyperdensity function can be obtained. (Refer to...) Figure 3 , Figure 3 This is a schematic diagram of the initial hyperdensity function in the two-dimensional parameter space of an embodiment of the sub-pixel pose determination method of the present invention, as shown below. Figure 3 As shown, Figure 3 Let be the initial hyperdensity function in the two-dimensional parameter space, where x represents the column coordinate, y represents the row coordinate, and score represents the parameter space score. It can be seen that the initial hyperdensity function is a discrete function. The initial hyperdensity function for a parameter space of any parameter dimension is a discrete function, which is not shown in the figure of this embodiment.
[0067] It should be understood that the hyperdensity function can be obtained by surface fitting. Assuming each pose point corresponds to a four-dimensional parameter space, the hyperdensity function is a quaternary function, which can be expressed as: s = f(x, y, r, s). (Refer to...) Figure 4 , Figure 4 This is a schematic diagram of the hyperdensity function in the two-dimensional parameter space of an embodiment of the subpixel pose determination method of the present invention. Figure 4 As shown, Figure 4 In this context, x represents the column coordinate, y represents the row coordinate, and score represents the parameter space score. Figure 4 for Figure 3 The function obtained after surface fitting can be used in this embodiment. Figure 3 The maximum value in the model is used as the center point. Pose points within a 3×3 local region are extracted for surface fitting to reduce computational load. This embodiment does not impose specific limitations on the range of the extracted local region. Surface fitting for parameter spaces of arbitrary parameter dimensions can also be performed using the same method.
[0068] Step S40: Determine the sub-pixel pose of the target to be matched based on the superdensity function.
[0069] In this embodiment, the sub-pixel pose of the target to be matched can be determined based on the superdensity function, and the sub-pixel pose can be the maximum pose in the superdensity function.
[0070] This embodiment obtains the pixel-level pose of the target to be matched in a multi-dimensional parameter space through contour matching. Centered on the pixel-level pose, it acquires the parameter space scores corresponding to each pose point within a preset parameter space range. Then, it constructs a super-density function based on each pose point and its corresponding parameter space scores, and finally determines the sub-pixel pose of the target to be matched based on the super-density function. This embodiment reduces computation by acquiring the parameter space scores corresponding to each pose point within a preset parameter space range centered on the pixel-level pose. Furthermore, it determines the sub-pixel pose of the target to be matched based on the super-density function. Compared to existing methods that calculate sub-pixel poses using score interpolation or least-squares iteration, this embodiment can calculate the sub-pixel pose of contour matching quickly and accurately based on the super-density function.
[0071] refer to Figure 5 , Figure 5 This is a flowchart illustrating the second embodiment of the subpixel pose determination method of the present invention.
[0072] Based on the first embodiment described above, in this embodiment, step S10 includes:
[0073] Step S101: Obtain the initial pixel-level pose of the target to be matched in the multidimensional parameter space through contour matching;
[0074] Understandably, this embodiment can obtain the initial pixel-level pose of the target to be matched in the multi-dimensional parameter space through contour matching. Assume the initial pixel-level pose p0(x) p0 ,y p0 ,r p0 ,s p0 ).
[0075] Step S102: Obtain a preset number of sample points corresponding to each parameter dimension in the initial pixel-level pose;
[0076] It should be noted that the preset quantity is a pre-set quantity used to limit the number of sample points; this embodiment does not impose a specific limit on it. For example, taking the angle dimension in the initial pixel-level pose as an example, if the preset quantity is 3, then with r... p0 The sample point centered is (r) p-1 ,r p0 ,r p1 The same method can be used to obtain sample points for other parameter dimensions, but this embodiment will not elaborate further on this.
[0077] Step S103: Determine the pixel-level pose based on the sample points.
[0078] In this embodiment, pixel-level pose can be determined by combining all the acquired sample points.
[0079] Furthermore, in order to accurately determine the pixel-level pose, in this embodiment, step S103 includes: constructing a parabolic equation based on the sample points and obtaining the extreme value position corresponding to the parabolic equation; obtaining the distance between the extreme value position and the initial pixel-level pose; and when the distance is less than a threshold distance, using the initial pixel-level pose as the pixel-level pose.
[0080] Understandably, a parabolic equation can be constructed based on the sample points. Let's take the sample points from the three angular dimensions mentioned above as an example, using r as an example... p0 The sample point centered is (r) p-1 ,r p0 ,r p1 The corresponding parameter space score is (s) p-1 ,s p0 ,s p1 We can construct the parabolic equation f(s) = b1*s. 2 +b2*s+b3, (r p-1 ,s p-1 ), (r p0 ,s0), (r p1 Substituting s1) into the parabola equation, we can obtain the values of b1, b2, and b3, and then find the extreme values corresponding to the parabola equation. The extreme values for other parameter dimensions can also be obtained using the same method.
[0081] It should be understood that to obtain the distance between the extreme position and the initial pixel-level pose, assuming that in the one-dimensional parameter space the extreme position is (a1, s1) and the initial pixel-level pose is (a2, s2), then the distance between the extreme position and the initial pixel-level pose is... The distance between the extreme locations of other parameter dimensions and the initial pixel-level pose can also be obtained in the same way.
[0082] In the specific implementation, the threshold distance is a preset distance, and the specific value can be set according to the actual situation. This embodiment does not impose specific restrictions on this. When the distance is less than the threshold distance, the initial pixel-level pose is the same as the pixel-level pose.
[0083] Furthermore, in this embodiment, after the step of obtaining the distance between the extreme position and the initial pixel-level pose, the method further includes: when the distance is greater than or equal to a threshold distance, updating the initial pixel-level pose according to the distance, and returning to the step of obtaining a preset number of sample points corresponding to each parameter dimension in the initial pixel-level pose, until the distance is less than the threshold distance, and obtaining the updated pixel-level pose; and using the updated pixel-level pose as the pixel-level pose.
[0084] Understandably, when the distance is greater than or equal to the threshold distance, the initial pixel-level pose can be updated based on the distance. Specifically, the updated pixel-level pose can be obtained by adding the distance to the initial pixel-level pose.
[0085] It should be understood that after updating the initial pixel-level pose, the sample points corresponding to the updated pixel value pose are obtained, and the updated extreme value position is obtained through the above method. Then, the updated distance between the updated extreme value position and the updated initial pixel-level pose is calculated. If the updated distance is greater than or equal to the threshold distance, the above steps need to be repeated until the updated distance is less than the threshold distance, and the updated pixel-level pose is taken as the pixel-level pose.
[0086] In practice, actual tests have shown that, under normal circumstances, pixel-level poses that meet the requirements can be obtained in less than 3 iterations, which is very efficient.
[0087] In this embodiment, small samples are extracted in the corresponding parameter dimension to fit the parabolic equation, and the position distance criterion is used to iterate step by step and update the pixel-level pose.
[0088] This embodiment obtains the initial pixel-level pose of the target to be matched in a multi-dimensional parameter space through contour matching, then obtains a preset number of sample points corresponding to each parameter dimension in the initial pixel-level pose, and finally determines the pixel-level pose based on the sample points. By obtaining a preset number of sample points corresponding to each parameter dimension in the initial pixel-level pose and then determining the pixel-level pose based on the sample points, this embodiment can update the pixel-level pose with fewer iterations and obtain an accurate pixel-level pose.
[0089] refer to Figure 6 , Figure 6 This is a flowchart illustrating the third embodiment of the subpixel pose determination method of the present invention.
[0090] Based on the above embodiments, in this embodiment, step S40 includes:
[0091] Step S401: Obtain the stationary point pose corresponding to the hyperdensity function;
[0092] In this embodiment, the stationary point pose corresponding to the hyperdensity function can be determined. Assuming the hyperdensity function is s = f(x,y,r,s), then the simultaneous solution can be obtained. The corresponding stationary point coordinates can be obtained. The above explanation only uses the four-dimensional parameter space as an example. The same method can be used to obtain the corresponding stationary point coordinates for other parameter dimensions. This embodiment does not impose any specific restrictions on this.
[0093] Step S402: Obtain the Hessian matrix corresponding to the superdensity function;
[0094] Understandably, we assume the superdensity function is s = f(x,y,r,s), and the corresponding Hessian matrix is H.
[0095] The above explanation uses only a four-dimensional parameter space as an example. The Hessian matrix can also be obtained in the same way for other parameter dimensions. This embodiment does not impose any specific restrictions on this.
[0096] Step S403: Determine the sub-pixel pose of the target to be matched based on the stationary point pose and the Hessian matrix.
[0097] In this embodiment, the sub-pixel pose of the target to be matched can be determined by the stationary point pose and the Hessian matrix.
[0098] Furthermore, in order to accurately determine the subpixel pose, in this embodiment, step S403 includes: substituting the stationary point pose into the Hessian matrix to obtain the target matrix; when the target matrix is a negative definite matrix, using the stationary point pose as the subpixel pose of the target to be matched.
[0099] It is understandable that after substituting the stationary point pose into the Hessian matrix, the target matrix can be obtained. When the target matrix is a negative definite matrix, the sub-pixel pose of the target to be matched is the stationary point coordinate. The method for determining whether the target matrix is a negative definite matrix can refer to the existing technology, and this embodiment will not elaborate on it further.
[0100] In practical implementation, if the target matrix is a positive definite matrix or an indefinite matrix, the sub-pixel pose calculation will fail because the position does not meet the solution conditions. However, in the current application scenario, the negative definiteness of the target matrix is generally satisfied.
[0101] This embodiment obtains the stationary point pose corresponding to the superdensity function, then obtains the Hessian matrix corresponding to the superdensity function, and finally determines the sub-pixel pose of the target to be matched based on the stationary point pose and the Hessian matrix. This embodiment determines the sub-pixel pose of the target to be matched based on the stationary point pose and the Hessian matrix, using the Hessian matrix as a criterion. Determining the sub-pixel pose of the target to be matched based on the stationary point coordinates improves the accuracy of the sub-pixel pose and enables fast and efficient calculation of the sub-pixel pose for contour matching, thus improving the accuracy and speed of sub-pixel contour matching.
[0102] Reference Figure 7 , Figure 7 This is a structural block diagram of the first embodiment of the subpixel pose determination device of the present invention.
[0103] like Figure 7 As shown, the sub-pixel pose determination device proposed in this embodiment of the invention includes:
[0104] Pose acquisition module 10 is used to acquire the pixel-level pose of the target to be matched in the multi-dimensional parameter space;
[0105] The spatial score acquisition module 20 is used to acquire the parameter spatial score corresponding to each pose point within a preset parameter space range, with the pixel-level pose as the center.
[0106] Function construction module 30 is used to construct a superdensity function based on each pose point and the parameter space score corresponding to each pose point;
[0107] The subpixel pose determination module 40 is used to determine the subpixel pose of the target to be matched based on the superdensity function.
[0108] This embodiment obtains the pixel-level pose of the target to be matched in a multi-dimensional parameter space. Centered on the pixel-level pose, it acquires the parameter space scores corresponding to each pose point within a preset parameter space range. Then, it constructs a super-density function based on each pose point and its corresponding parameter space scores, and finally determines the sub-pixel pose of the target to be matched based on the super-density function. This embodiment reduces computation by obtaining the parameter space scores corresponding to each pose point within a preset parameter space range centered on the pixel-level pose. Furthermore, it determines the sub-pixel pose of the target to be matched based on the super-density function. Compared to existing methods that calculate sub-pixel poses using score interpolation or least-squares iteration, this embodiment can calculate the sub-pixel pose of contour matching quickly and accurately based on the super-density function.
[0109] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0110] In addition, for technical details not described in detail in this embodiment, please refer to the sub-pixel pose determination method provided in any embodiment of the present invention, which will not be repeated here.
[0111] Based on the first embodiment of the subpixel pose determination device of the present invention described above, a second embodiment of the subpixel pose determination device of the present invention is proposed.
[0112] In this embodiment, the pose acquisition module 10 is further configured to acquire the initial pixel-level pose of the target to be matched in the multi-dimensional parameter space through contour matching; acquire a preset number of sample points corresponding to each parameter dimension in the initial pixel-level pose; and determine the pixel-level pose based on the sample points.
[0113] Furthermore, the pose acquisition module 10 is also used to construct a parabolic equation based on the sample points and obtain the extreme value position corresponding to the parabolic equation; obtain the distance between the extreme value position and the initial pixel-level pose; and when the distance is less than a threshold distance, use the initial pixel-level pose as the pixel-level pose.
[0114] Furthermore, the pose acquisition module 10 is also used to update the initial pixel-level pose according to the distance when the distance is greater than or equal to a threshold distance, and return to the step of acquiring a preset number of sample points corresponding to each parameter dimension in the initial pixel-level pose, until the distance is less than the threshold distance, and obtain the updated pixel-level pose; and use the updated pixel-level pose as the pixel-level pose.
[0115] Furthermore, the function construction module 30 is also used to construct an initial superdensity function based on each pose point and the parameter space score corresponding to each pose point; and to perform surface fitting on the initial superdensity function to obtain the superdensity function.
[0116] Furthermore, the subpixel pose determination module 40 is also used to obtain the stationary pose corresponding to the superdensity function; obtain the Hessian matrix corresponding to the superdensity function; and determine the subpixel pose of the target to be matched based on the stationary pose and the Hessian matrix.
[0117] Furthermore, the subpixel pose determination module 40 is also used to substitute the stationary point pose into the Hessian matrix to obtain the target matrix; when the target matrix is a negative definite matrix, the stationary point pose is used as the subpixel pose of the target to be matched.
[0118] Other embodiments or specific implementations of the subpixel pose determination device of the present invention can be referred to the above-described method embodiments, and will not be repeated here.
[0119] Furthermore, this embodiment of the invention also proposes a storage medium storing a sub-pixel pose determination program, which, when executed by a processor, implements the steps of the sub-pixel pose determination method described above.
[0120] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0121] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0122] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0123] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A sub-pixel pose determination method, characterized in that, The sub-pixel pose determination method includes the following steps: Obtain the pixel-level pose of the target to be matched in the multidimensional parameter space; Using the pixel-level pose as the center, obtain the parameter space score corresponding to each pose point within the preset parameter space range; A hyperdensity function is constructed based on each pose point and the corresponding parameter space score. The hyperdensity function is a function with each pose point as the independent variable and the corresponding parameter space score as the dependent variable. The sub-pixel pose of the target to be matched is determined based on the superdensity function.
2. The sub-pixel pose determination method as described in claim 1, characterized in that, The step of obtaining the pixel-level pose of the target to be matched in the multidimensional parameter space specifically includes: Obtain the initial pixel-level pose of the target to be matched in the multidimensional parameter space; Obtain a preset number of sample points corresponding to each parameter dimension in the initial pixel-level pose; Pixel-level pose is determined based on the sample points.
3. The sub-pixel pose determination method as described in claim 2, characterized in that, The step of determining the pixel-level pose based on the sample points specifically includes: Construct a parabolic equation based on the sample points, and obtain the extreme value positions corresponding to the parabolic equation; Obtain the distance between the extreme position and the initial pixel-level pose; When the distance is less than the threshold distance, the initial pixel-level pose is taken as the pixel-level pose.
4. The sub-pixel pose determination method as described in claim 3, characterized in that, After the step of obtaining the distance between the extreme value position and the initial pixel-level pose, the method further includes: When the distance is greater than or equal to the threshold distance, the initial pixel-level pose is updated according to the distance, and the step of obtaining a preset number of sample points corresponding to each parameter dimension in the initial pixel-level pose is returned until the distance is less than the threshold distance, and the updated pixel-level pose is obtained. The updated pixel-level pose is used as the pixel-level pose.
5. The sub-pixel pose determination method as described in claim 1, characterized in that, The step of constructing the hyperdensity function based on each pose point and the corresponding parameter space score specifically includes: Construct an initial hyperdensity function based on each pose point and the corresponding parameter space score; The initial hyperdensity function is fitted with a surface to obtain the hyperdensity function.
6. The sub-pixel pose determination method as described in claim 5, characterized in that, The step of determining the sub-pixel pose of the target to be matched based on the superdensity function specifically includes: Obtain the stationary point pose corresponding to the hyperdensity function; Obtain the Hessian matrix corresponding to the hyperdensity function; The subpixel pose of the target to be matched is determined based on the stationary pose and the Hessian matrix.
7. The sub-pixel pose determination method as described in claim 6, characterized in that, The step of determining the sub-pixel pose of the target to be matched based on the stationary point pose and the Hessian matrix specifically includes: Substitute the stationary point pose into the Hessian matrix to obtain the target matrix; When the target matrix is a negative definite matrix, the stationary point pose is used as the sub-pixel pose of the target to be matched.
8. A sub-pixel pose determination device, characterized in that, The sub-pixel pose determination device includes: The pose acquisition module is used to acquire the pixel-level pose of the target to be matched in the multi-dimensional parameter space; The spatial score acquisition module is used to acquire the parameter spatial score corresponding to each pose point within a preset parameter space range, with the pixel-level pose as the center. The function construction module is used to construct a superdensity function based on each pose point and the corresponding parameter space score of each pose point. The superdensity function is a function with each pose point as the independent variable and the corresponding parameter space score of each pose point as the dependent variable. The subpixel pose determination module is used to determine the subpixel pose of the target to be matched based on the superdensity function.
9. A sub-pixel pose determination device, characterized in that, The device includes: a memory, a processor, and a subpixel pose determination program stored in the memory and executable on the processor, the subpixel pose determination program being configured to implement the steps of the subpixel pose determination method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium stores a subpixel pose determination program, which, when executed by a processor, implements the steps of the subpixel pose determination method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Pose information determination method and device
CN112085786A
Pose estimation method and device, terminal equipment and storage medium
CN114820779A