Single-image single-point transition method and monocular camera measurement method

CN122990002APending Publication Date: 2026-10-27SCANTECH (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610897569.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]但是该技术存在较大的局限性:现有技术要求单帧内必须同时观测到多于3个编码块才能唯一确定6自由度位姿

Benefits of technology

1、现有单目视觉位姿估计方法通常需要至少三个编码块获取当前帧的相机位置,而本发明仅需当前帧图像中包含一个完整的编码块(如优选的含中点与至少四个角点的编码块),即可提取足够的几何约束;从而在极低编码块密度(如单帧图像仅包含1~2个编码块可见)条件下,利用编码块的几何属性及帧间运动连续性,实现高精度帧间过渡。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990002A_ABST
    Figure CN122990002A_ABST
Patent Text Reader

Abstract

The application discloses a single-image single-point transition method and a monocular camera measurement method, which are applied to monocular camera measurement and contain at least one complete coding block in each frame of image; the method comprises the following steps: acquiring a single complete coding block parameter in a current frame of image; acquiring an initial pose of a camera based on the coding block parameter; acquiring a predicted camera pose of the current frame of image based on a known camera pose of a previous frame of image; excluding a mirror image ambiguity solution based on the predicted camera pose, taking a real solution and an initial translation vector as a first pose of the camera; acquiring a second pose of the camera based on the first pose and the coding block parameter; and constructing a residual error function according to a re-projection error and a motion smoothing term, and solving the camera pose of the current frame of image by a nonlinear optimization algorithm. The above measures realize high-precision interframe transition by using the geometric properties of the coding block and the interframe motion continuity under the condition of extremely low coding block density (for example, only 1-2 coding blocks are visible in a single frame of image).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of 3D scanning and modeling technology, specifically to a single-image, single-point transition method. Background Technology

[0002] In the field of monocular photogrammetry, achieving a continuous transition between two-dimensional images (i.e., pose calculation and three-dimensional reconstruction of sequential images) usually relies on localization techniques based on multi-markers, but this has obvious limitations under the extreme constraint of "single image, single point".

[0003] Multi-marker-based positioning technology is used in industrial measurement to achieve high-precision positioning using manually coded markers. Its implementation principle involves typically deploying multiple coded blocks (such as...) within the field of view. Figure 1 (As shown). When at least 3-4 coded blocks are detected simultaneously in a single frame, the absolute pose of the camera relative to the marker coordinate system is directly calculated using the PnP (Perspective-n-Point) algorithm. Inter-frame transitions depend on a sufficient number of common coded blocks (usually ≥3) being observed in consecutive frames.

[0004] However, this technology has significant limitations: existing technologies require more than three coded blocks to be observed simultaneously within a single frame to uniquely determine the 6-DOF pose. If limitations such as field of view, occlusion, or deployment conditions result in only one coded block being captured in an image (i.e., the "single image, single point" case), traditional PnP algorithms cannot solve for the absolute pose of this image due to underdeterminacy (fewer equations than unknowns), leading to interruptions in inter-frame transitions. Existing technologies typically require sacrificing accuracy by introducing an inertial measurement unit (IMU) or forcibly increasing the density of coded points, making it impossible to achieve smooth transitions under purely visual and single-coded-block observation conditions.

[0005] Therefore, existing technologies fail directly under this condition, failing to establish spatial connections between two-dimensional images and causing measurement interruptions. To ensure continuity between frames, current high-precision monocular measurement schemes often require high-density deployment of coded blocks along the measurement path to ensure multiple coded blocks are visible within the field of view at any given time. This strong dependence on "multiple coded blocks in common view" limits the technology's application scenarios. In scenarios involving large object measurement, confined space detection, or dynamic rapid scanning, high-density marker deployment is costly, time-consuming, and impractical.

[0006] Existing monocular photogrammetry techniques lack effective mathematical models and solution strategies when dealing with special cases where a single image contains only a single coded block. Traditional multi-marker PnP methods cannot be solved due to insufficient constraints, while pure inertial sensor calculations cannot meet the accuracy requirements. Summary of the Invention

[0007] The purpose of this invention is to provide a single-image single-point transition method that, under conditions of extremely low coded block density (such as a single frame image containing only 1 to 2 visible coded blocks), utilizes the geometric properties of coded blocks and the continuity of inter-frame motion to achieve high-precision inter-frame transition.

[0008] Firstly, a single-image, single-point transition method, applied in monocular camera measurement, includes at least one complete coded block within each frame image; the method includes... Get the parameters of a single complete coded block in the current frame image; The initial pose of the camera is obtained based on the coded block parameters; the initial pose includes the initial rotation matrix and the initial translation vector, and the initial rotation matrix includes the true solution and the mirror ambiguous solution. Based on the known camera pose corresponding to the previous frame image, obtain the predicted camera pose corresponding to the current frame image; based on the predicted camera pose, exclude mirror-ambiguous solutions, and use the true solution and the initial translation vector as the first pose of the camera. Based on the first pose and the coded block parameters, obtain the second pose of the camera; Based on the second pose, an initial sliding window optimization is adopted. A residual function is constructed according to the reprojection error and motion smoothing term. The optimized camera pose of the current frame image is obtained by solving the nonlinear optimization algorithm.

[0009] According to the above technical solution, the coding block includes a planar coding block plate, a midpoint located at the center of the coding block plate, and at least four corner points distributed around the midpoint.

[0010] According to the above technical solution, the coding block parameters include the coordinates of the center of the midpoint ellipse in pixel coordinates, the major and minor axis parameters of the midpoint ellipse, and the coordinates of the center of the corner ellipse, as well as the coordinates of the center of the midpoint circle, the diameter of the midpoint circle, and the coordinates of the center of the corner circle in the world coordinate system.

[0011] According to the above technical solution, obtaining the parameters of a single complete coded block in the current frame image includes obtaining pixel coordinate parameters and obtaining world coordinate parameters; The acquisition of pixel coordinate parameters includes: Obtain a binarized edge map based on the input current frame image; Based on the binary edge map, the contours of the midpoint and corner points are filtered; Ellipse fitting is performed on the contour to obtain the coordinates of the center of the midpoint ellipse in pixel coordinates, the major and minor axis parameters of the midpoint ellipse, and the coordinates of the center of the corner ellipse. The acquisition of world coordinate parameters includes: Decode its unique ID based on the two-dimensional distribution of points in the coded block; Retrieves the coordinates of the center of the midpoint circle, the diameter of the midpoint circle, and the coordinates of the center of the corner points in the world coordinate system from the preset database.

[0012] According to the above technical solution, the initial pose of the camera based on the coding block parameters is obtained by solving the initial pose of the camera relative to the coding block plane using the homography matrix, or the essential matrix, or the fundamental matrix.

[0013] According to the above technical solution, the process of obtaining the predicted camera pose corresponding to the current frame image based on the known camera pose corresponding to the previous frame image is as follows: Based on the known camera pose and camera velocity of the previous frame, the predicted camera pose of the current frame image is calculated; wherein, the camera velocity is obtained by the inertial measurement unit of the monocular camera itself, or calculated from the known camera poses of the previous two frames.

[0014] According to the above technical solution, the depth in the current frame camera coordinate system is obtained based on the coordinates of the center of the corner point and the first pose in the world coordinate system. Based on the major and minor axis parameters of the midpoint ellipse in pixel coordinates, the coordinates of the center of the midpoint circle in the world coordinate system, the diameter of the midpoint circle, and the depth, the scale relationship between the initial translation vector of the second pose and the actual translation vector in the world coordinate system is determined. Based on the scale relationship, the true translation vector in the world coordinate system is obtained, and the true solution of the rotation matrix is ​​used as the second pose.

[0015] According to the above technical solution, the reprojection error is the pixel distance between the target point coordinates in the world coordinate system after being projected onto the image plane by the second pose and the actual observed target point, where the target point is the midpoint or a corner point; The motion smoothing term is the pose change in the first two frames and the difference between the pose change in the previous frame and the current frame.

[0016] Secondly, a monocular camera measurement method includes a multi-coded block marking transition method and a single-image single-point transition method as described above. A monocular camera acquires multiple consecutive frames of images. Based on the number of coded blocks contained in the consecutive images, they are divided into two categories: the first category contains at least 3 coded blocks, and the second category contains 1 to 2 coded blocks. Based on the multi-code block labeling transition method, the camera pose corresponding to the first type of image in each frame is calculated; Based on the single-image single-point transition method, the camera pose corresponding to each frame of the second type of image is calculated. The camera poses of multiple image segments are stitched together sequentially to generate a complete and smooth 3D measurement trajectory of the camera.

[0017] According to the above technical solution, the coding block includes a planar coding block plate, a midpoint located at the center of the coding block plate, and at least four corner points distributed around the midpoint.

[0018] Thirdly, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the single-point transition method described in any of the preceding claims.

[0019] Fourthly, a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the single-point transition method described in any of the preceding claims.

[0020] The present invention has the following beneficial effects: 1. Existing monocular vision pose estimation methods typically require at least three coding blocks to obtain the camera position of the current frame. However, this invention only requires the current frame image to contain a complete coding block (such as a coding block containing the midpoint and at least four corner points) to extract sufficient geometric constraints. Thus, under conditions of extremely low coding block density (such as a single frame image containing only 1 to 2 visible coding blocks), high-precision inter-frame transitions can be achieved by utilizing the geometric properties of coding blocks and the continuity of inter-frame motion.

[0021] 2. When solving for the initial pose using the homography matrix, it is inevitable that the true solution and the mirror-image ambiguous solution of the rotation matrix will be generated. This invention utilizes the known camera pose corresponding to the previous frame image (such as the current frame pose predicted by a constant velocity model or inertial measurement unit) to compare two mathematically valid solutions, automatically eliminating mirror-image ambiguous solutions, thereby obtaining the true and consistent first camera pose. This avoids manual solution selection or additional sensor assistance, improving the automation and reliability of the system.

[0022] 3. Fully exploit the known geometric parameters in the coded block—the actual coordinates of the center of the midpoint circle in the world coordinate system, the diameter of the midpoint circle, and the major and minor axis parameters of the midpoint ellipse in the image coordinate system; thereby obtaining the depth information of the coded block, the absolute scale factor is precisely solved using nonlinear least squares, and the normalized translation vector is restored to the true physical translation vector. The resulting second pose has true scale significance and can be directly used for subsequent 3D measurement, navigation, or 3D reconstruction tasks.

[0023] 4. After acquiring the second pose, an initial sliding window optimization strategy is further adopted, considering both reprojection error (the pixel distance between the projected encoded point in the world coordinate system and the image observation) and motion smoothing (the consistency of pose changes between adjacent frames). Solving this using nonlinear optimization algorithms such as the Levonburg-Marquardt algorithm effectively suppresses the influence of single-frame noise and local outliers, ensuring the continuous smoothness of the camera trajectory in the time domain. This is particularly suitable for high-precision pose tracking in dynamic measurement or fast-moving scenarios.

[0024] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it according to the contents of the specification, the preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings. Specific embodiments of the present invention are given in detail below with reference to the accompanying drawings. Attached Figure Description

[0025] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention.

[0026] Figure 1 This is a schematic diagram of the gap surface difference measurement system provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of Embodiment 3 provided by the present invention; Detailed Implementation To make the purpose, technical solution, and advantages of this application clearer, the following description is provided in conjunction with the appendix. Figure 1-2 The present application is described and illustrated with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of the application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application. Furthermore, it is understood that although the effort involved in such development may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, modifications to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0027] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0028] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application means two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The terms “first,” “second,” “third,” etc., used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0029] Example 1 like Figure 1 As shown, this invention provides a single-image, single-point transition method. Applied to monocular camera measurement, it includes at least one complete coded block within each frame of the image. A preferred coded block is provided, comprising a planar coded block plate, a midpoint located at the center of the coded block plate, and at least four corner points distributed around the midpoint. However, the coded block is not limited to the given preferred coded block; other existing coded blocks can also be used.

[0030] The method includes S1: Obtain the parameters of a single complete coding block in the current frame image; the coding block parameters include the coordinates of the center of the midpoint ellipse in pixel coordinates, the major and minor axis parameters of the midpoint ellipse, and the coordinates of the center of the corner ellipse, as well as the coordinates of the center of the midpoint circle, the diameter of the midpoint circle, and the coordinates of the center of the corner circle in world coordinates.

[0031] S2: Obtain the initial pose of the camera based on the coded block parameters; where the initial pose includes the initial rotation matrix and the initial translation vector, and the initial rotation matrix includes the true solution and the mirror ambiguous solution; S3: Based on the known camera pose corresponding to the previous frame image, obtain the predicted camera pose corresponding to the current frame image; based on the predicted camera pose, exclude mirror ambiguity solutions, and use the true solution and the initial translation vector as the first pose of the camera. S4: Obtain the camera's second pose based on the first pose and the coded block parameters; S5: Based on the second pose, an initial sliding window optimization is adopted. A residual function is constructed according to the reprojection error and motion smoothing term. The optimized camera pose of the current frame image is obtained by solving the nonlinear optimization algorithm.

[0032] Existing monocular vision pose estimation methods typically require at least three coding blocks to obtain the camera position of the current frame. However, this invention only requires the current frame image to contain a complete coding block (such as a coding block containing the midpoint and at least four corner points) to extract sufficient geometric constraints. Thus, under conditions of extremely low coding block density (such as a single frame image containing only 1 to 2 visible coding blocks), high-precision inter-frame transitions can be achieved by utilizing the geometric properties of coding blocks and the continuity of inter-frame motion.

[0033] In step S1, obtaining the parameters of a single complete coded block in the current frame image includes obtaining pixel coordinate parameters (S11) and obtaining world coordinate parameters (S12).

[0034] The acquisition of pixel coordinate parameters (S11) includes: S111: Based on the input current frame image, perform edge detection using the Canny operator to obtain a binarized edge map.

[0035] S112: Based on the binary edge map, the core function cv2.findContours in OpenCV for detecting the contours of objects in an image is used to find contours, and the contours of the midpoint and corner points are filtered out based on the area and roundness.

[0036] S113: Perform ellipse fitting on the contour to obtain the coordinates of the center of the midpoint ellipse in pixel coordinates. The major and minor axis parameters of the midpoint ellipse, and the coordinates of the center of the corner ellipse. .

[0037] The major and minor axis parameters of the midpoint ellipse are mainly used to accurately locate the center of the ellipse and eliminate outliers. Furthermore, these parameters are also used, in conjunction with geometric features such as area and roundness, to filter and verify whether the extracted contours are valid midpoint coding blocks.

[0038] The acquisition of world coordinate parameters (S12) includes: S121: Decode its unique ID based on the two-dimensional distribution of points in the coded block.

[0039] S122: Retrieves the coordinates of the center of the midpoint circle and the diameter of the midpoint circle in the world coordinate system from the preset database. , and the coordinates of the center of the corner point ,in .

[0040] In the above embodiment, in step S2, obtaining the initial pose of the camera based on the coding block parameters is: solving the initial pose of the camera relative to the coding block plane using the homography matrix, or the essential matrix, or the fundamental matrix.

[0041] Specifically, S21: Consider the coded block as a plane, and the coordinates of its four corner points in the world coordinate system (with the center of the coded block as the origin) are: , where i = 1, 2, 3, 4.

[0042] S22: In step S122, image processing is used to accurately extract the coordinates of these four corner points in the image coordinate system. , where i = 1, 2, 3, 4.

[0043] S23: According to the principle of perspective projection, a point P on a 3D plane and its projection point p on an image satisfy the following relationship:

[0044] Where s is an unknown scaling factor, and H is a 3x3 homography matrix. H can be solved using the Direct Linear Transformation (DLT) algorithm with at least 4 pairs of 2D-3D point pairs (4 pairs of 2D-3D point pairs are provided in steps S21 and S22).

[0045] Rotation matrix R: , , ,in , λ is a column vector of H, λ is a normalization factor, and × represents the cross product.

[0046] Translation vector t: , where h3 is the third column of H.

[0047] The calculated R and t still have two problems: ① The scale of the translation vector t is unknown (because λ is unknown); ② There exist two mathematically valid solutions. and (Mirror image ambiguity).

[0048] In the above embodiment, step S3, the process of obtaining the predicted camera pose corresponding to the current frame image based on the known camera pose corresponding to the previous frame image, is as follows: Based on the known camera pose and camera velocity of the previous frame, the predicted camera pose of the current frame image is calculated; wherein, the camera velocity is obtained by the inertial measurement unit of the monocular camera itself, or calculated from the known camera poses of the previous two frames.

[0049] Specifically, taking the camera's speed obtained by the inertial measurement unit of the monocular camera itself as an example, S31: Assuming the camera motion is smooth over a short period of time, based on the pose of the previous frame t-1... and speed Predict the pose of the current frame t using a constant velocity model. .

[0050] S32: Solve the two possible solutions obtained in step S23. and Respectively compared with the predicted pose The solutions are compared, and the solution with the smallest sum of rotation angle difference and translation distance difference is selected as the true solution for the current frame. The other solution is excluded as a mirror ambiguity solution. The first pose of the camera in the current frame image is formed by the true solution of the rotation matrix and the initial translation vector.

[0051] When solving for the initial pose using the homography matrix, it is inevitable that the true solution and the mirror-image ambiguous solution of the rotation matrix will be generated. This invention utilizes the known camera pose corresponding to the previous frame image (such as the current frame pose predicted by a constant velocity model or inertial measurement unit) to compare two mathematically valid solutions, automatically eliminating mirror-image ambiguous solutions, thereby obtaining the true and consistent first camera pose. This avoids manual solution selection or additional sensor assistance, improving the automation and reliability of the system.

[0052] In the above embodiment, in step S4, obtaining the second pose of the camera based on the first pose and the coding block parameters is as follows: S41: Based on the coordinates of the corner point center and the first pose in the world coordinate system, obtain the depth in the current frame's camera coordinate system. Specifically, based on the 3D coordinates of the coded corner points... (where i=1,2,3,4) and the first pose can be used to calculate the depth Z_c of the corner point in the current camera coordinate system.

[0053] S42: Based on the major and minor axis parameters of the midpoint ellipse in pixel coordinates, the coordinates of the center of the midpoint circle in world coordinates, the diameter of the midpoint circle, and the depth Z_c, determine the scale relationship between the initial translation vector of the second pose and the actual translation vector in world coordinates.

[0054] Specifically, the first pose obtained in step S32 includes a normalized translation vector t_norm. The real-world translation t_real corresponding to this translation vector should be... , where s is the absolute scale factor to be determined. According to the pinhole camera model, the depth Z_c has a fixed geometric relationship with the observed position p_2d of the center of the midpoint circle in the image and the physical diameter D_real of the midpoint circle; through the constructed The optimal scaling factor s can be obtained by iteratively solving a nonlinear least squares problem with respect to s and minimizing the reprojection error.

[0055] S43: Based on the optimal scale factor s, obtain the true translation vector t_real in the world coordinate system, and use it together with the true solution of the rotation matrix as the second pose (R, t_real).

[0056] By fully extracting the known geometric parameters from the coded block—the actual coordinates of the center of the midpoint circle in the world coordinate system, the diameter of the midpoint circle, and the major and minor axis parameters of the midpoint ellipse in the image coordinate system—the depth information of the coded block is obtained. The absolute scale factor is then precisely solved using nonlinear least squares to restore the normalized translation vector to the true physical translation vector. The resulting second pose has realistic scale significance and can be directly used for subsequent 3D measurement, navigation, or 3D reconstruction tasks.

[0057] In the above embodiment, in step S5, the nonlinear optimization algorithm is the Levenberg-Marquardt algorithm. The Levenberg-Marquardt algorithm (LM) is suitable for situations with large reprojection errors and strong nonlinearity, and this scheme prefers this algorithm. If the initial pose estimation is good, the reprojection error is small, and convergence is easy, the Gauss-Newton algorithm can also be used, which has the advantage of being fast, but its robustness is poor.

[0058] The reprojection error is the pixel distance between the target point coordinates in the world coordinate system after being projected onto the image plane by the second pose and the actually observed target point. The target point is either the midpoint or a corner point (preferably the midpoint). For example, the coordinates p_2d=(u,v) of the center of the midpoint ellipse in pixel coordinates are matched with the coordinates of the center of the midpoint circle in the world coordinate system as input data for constructing the reprojection error, which is then used to solve for the initial camera pose and sliding window optimization. The motion smoothing term is the pose change in the previous two frames and the difference between the pose change in the previous frame and the current frame. Based on the second pose, an initial sliding window optimization is performed. A residual function is constructed according to the reprojection error and the motion smoothing term, and solved by a nonlinear optimization algorithm to obtain the optimized camera pose of the current frame image.

[0059] Specifically, Construct a sliding window containing the most recent N frames. The optimization objective is to find an optimal set of camera poses {T_i} (i ranging from t-N+1 to t) that minimizes the following objective function:

[0060] Define each item: That is, the second pose of the encoded point P_world in the world coordinate system, obtained through step S43, is projected onto the image plane, and the pixel distance between its projected position Project(...) and the actual observed position p_observed is calculated.

[0061] .

[0062] This constraint ensures that pose changes between adjacent frames are smooth, conforming to the laws of physical motion, and preventing drastic changes in trajectory. It is the weight of the smoothing term.

[0063] The above problem is solved using nonlinear optimization algorithms such as Levenberg-Marquardt, and the optimized final pose T_t of the current frame is obtained.

[0064] After acquiring the second pose, an initial sliding window optimization strategy is further adopted, considering both reprojection error (the pixel distance between the projected encoded point in the world coordinate system and the image observation) and motion smoothing (the consistency of pose changes between adjacent frames). Solving this strategy using nonlinear optimization algorithms such as the Levonburg-Marquardt algorithm effectively suppresses the influence of single-frame noise and local outliers, ensuring the continuous smoothness of the camera trajectory in the time domain. This approach is particularly suitable for high-precision pose tracking in dynamic measurement or fast-moving scenarios.

[0065] Example 2 The present invention also provides a monocular camera measurement method, including a multi-code block marking transition method and a single-image single-point transition method as described above.

[0066] During monocular measurement, a monocular camera acquires multiple consecutive images. These images contain varying numbers of coded blocks; some contain at least three coded blocks, while others contain only one or two. Based on the number of coded blocks in the consecutive images, they are categorized into two types: Type I images and Type II images containing one or two coded blocks. In other words, during monocular measurement, the acquired consecutive image data consists of alternating frames of Type I and Type II images, where consecutive frames of Type I or Type II images constitute a single image segment.

[0067] A1: Acquire multiple consecutive images using a monocular camera, and calculate the camera pose corresponding to the first type of image in each frame based on the existing multi-code block labeling transition method, thereby completing the camera pose calculation for a segment of images.

[0068] A2: Based on the single-image single-point transition method, calculate the camera pose corresponding to the second type of image in each frame; thus completing the calculation of the pose of the next segment.

[0069] Repeat steps A1 and A2; or repeat steps A1 and A2, then perform step A1. The above repetition process depends on whether the last segment of multi-frame images consists of images of the first type or images of the second type.

[0070] After calculating the camera pose for all image segments, the camera poses of multiple image segments are stitched together sequentially to generate a complete and smooth 3D measurement trajectory of the camera.

[0071] The coding block includes a planar coding block plate, a midpoint located at the center of the coding block plate, and at least four corner points distributed around the midpoint.

[0072] Example 3 like Figure 2 The diagram illustrates the structure of a computer device according to an embodiment of the present invention, such as a smartphone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server, or cabinet server (including standalone servers or server clusters composed of multiple servers). The computer device 20 in this embodiment includes, but is not limited to, a memory 21 and a processor 22 that are interconnected via a system bus. It should be noted that... Figure 2 Only a computer device 20 with components 21-22 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0073] In this embodiment, the memory 21 (i.e., the readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and programmable read-only memory (PROM). The memory 21 can also be an external storage device of the computer device 20, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the computer device 20. Of course, the memory 21 can also include both internal storage units and external storage devices of the computer device 20. In this embodiment, the memory 21 is typically used to store the operating system and various application software installed on the computer device 20, such as the program code for the steps of the single-image single-point transition method in the method embodiment. Furthermore, the memory 21 can also be used to temporarily store various types of data that have been output or will be output.

[0074] In some embodiments, processor 22 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. This processor 22 is typically used to control the overall operation of the computer device 20. In this embodiment, processor 22 is used to run program code stored in memory 21 or process data, for example, to run program code or process data for a single-graph single-point transition method to implement the single-graph single-point transition method in the method embodiment.

[0075] Example 4 A computer-readable storage medium is provided, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, app store, etc., storing a computer program thereon. When the program is executed by a processor, it implements the corresponding function. In this embodiment, the computer-readable storage medium is used for program code or processing data of a single-image single-point transition method, and when executed by a processor, it implements the single-image single-point transition method of the method embodiment.

[0076] It should be noted that, depending on the implementation needs, the various steps / components described in this application can be broken down into more steps / components, or two or more steps / components or parts of the operation of steps / components can be combined into new steps / components to achieve the purpose of this invention.

[0077] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A single-image, single-point transition method, characterized in that, Applied to monocular camera measurement, each frame of the image contains at least one complete coded block; the method includes... Get the parameters of a single complete coded block in the current frame image; The initial pose of the camera is obtained based on the coded block parameters; the initial pose includes the initial rotation matrix and the initial translation vector, and the initial rotation matrix includes the true solution and the mirror ambiguous solution. Based on the known camera pose corresponding to the previous frame image, obtain the predicted camera pose corresponding to the current frame image; based on the predicted camera pose, exclude mirror ambiguity solutions, and use the true solution and the initial translation vector as the first pose of the camera. Based on the first pose and the coded block parameters, obtain the second pose of the camera; Based on the second pose, an initial sliding window optimization is adopted. A residual function is constructed according to the reprojection error and motion smoothing term. The optimized camera pose of the current frame image is obtained by solving the nonlinear optimization algorithm.

2. The single-point transition method for graphs according to claim 1, characterized in that, The coding block includes a planar coding block plate, a midpoint located at the center of the coding block plate, and at least four corner points distributed around the midpoint.

3. The single-point transition method for graphs according to claim 2, characterized in that, The coding block parameters include the coordinates of the center of the midpoint ellipse in pixel coordinates, the major and minor axis parameters of the midpoint ellipse, and the coordinates of the center of the corner ellipse, as well as the coordinates of the center of the midpoint circle, the diameter of the midpoint circle, and the coordinates of the center of the corner circle in world coordinates.

4. The single-point transition method for graphs according to claim 3, characterized in that, The process of obtaining parameters of a single complete coded block in the current frame image includes obtaining pixel coordinate parameters and world coordinate parameters; The acquisition of pixel coordinate parameters includes: Obtain a binarized edge map based on the input current frame image; Based on the binary edge map, the contours of the midpoint and corner points are filtered; Ellipse fitting is performed on the contour to obtain the coordinates of the center of the midpoint ellipse in pixel coordinates, the major and minor axis parameters of the midpoint ellipse, and the coordinates of the center of the corner ellipse. The acquisition of world coordinate parameters includes: Decode its unique ID based on the two-dimensional distribution of points in the coded block; Retrieves the coordinates of the center of the midpoint circle, the diameter of the midpoint circle, and the coordinates of the center of the corner points in the world coordinate system from the preset database.

5. The single-point transition method for graphs according to claim 3, characterized in that, The initial pose of the camera based on the coded block parameters is obtained by solving the initial pose of the camera relative to the coded block plane using the homography matrix, the essential matrix, or the fundamental matrix.

6. The single-point transition method for graphs according to claim 5, characterized in that, The process of obtaining the predicted camera pose of the current frame image based on the known camera pose of the previous frame image is as follows: Based on the known camera pose and camera velocity of the previous frame, the predicted camera pose of the current frame image is calculated; wherein, the camera velocity is obtained by the inertial measurement unit of the monocular camera itself, or calculated from the known camera poses of the previous two frames.

7. The single-point transition method for graphs according to claim 1, characterized in that, The second pose of the camera, obtained based on the first pose and the coded block parameters, is as follows: Based on the coordinates of the center of the corner point in the world coordinate system and the first pose, obtain the depth in the current frame's camera coordinate system; Based on the major and minor axis parameters of the midpoint ellipse in pixel coordinates, the coordinates of the center of the midpoint circle in the world coordinate system, the diameter of the midpoint circle, and the depth, the scale relationship between the initial translation vector of the second pose and the actual translation vector in the world coordinate system is determined. Based on the scale relationship, the true translation vector in the world coordinate system is obtained, and the true solution of the rotation matrix is ​​used as the second pose.

8. The single-point transition method for graphs according to claim 1, characterized in that, The reprojection error is the pixel distance between the target point coordinates in the world coordinate system after being projected onto the image plane by the second pose and the actual observed target point, where the target point is the midpoint or a corner point. The motion smoothing term is the pose change in the first two frames and the difference between the pose change in the previous frame and the current frame.

9. A monocular camera measurement method, characterized in that, This includes a multi-code block marking transition method and a single-graph single-point transition method as described in any one of claims 1-8; A monocular camera acquires multiple consecutive frames of images. Based on the number of coded blocks contained in the consecutive images, they are divided into two categories: the first category contains at least 3 coded blocks, and the second category contains 1 to 2 coded blocks. Based on the multi-code block labeling transition method, the camera pose corresponding to the first type of image in each frame is calculated; Based on the single-image single-point transition method, the camera pose corresponding to each frame of the second type of image is calculated. The camera poses of multiple image segments are stitched together sequentially to generate a complete and smooth 3D measurement trajectory of the camera.

10. The monocular camera measurement method according to claim 9, characterized in that, The coding block includes a planar coding block plate, a midpoint located at the center of the coding block plate, and at least four corner points distributed around the midpoint.

11. A computer device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the graph single-point transition method according to any one of claims 1-8.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the graph single-point transition method according to any one of claims 1-8.