CN116309820A - Monocular vision positioning method, monocular vision positioning system and application of monocular vision positioning system - Google Patents

Monocular vision positioning method, monocular vision positioning system and application of monocular vision positioning system Download PDF

Info

Publication number
CN116309820A
CN116309820A CN202310008891.4A CN202310008891A CN116309820A CN 116309820 A CN116309820 A CN 116309820A CN 202310008891 A CN202310008891 A CN 202310008891A CN 116309820 A CN116309820 A CN 116309820A
Authority
CN
China
Prior art keywords
vector
matrix
value
calculating
iteration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310008891.4A
Other languages
Chinese (zh)
Inventor
冯冠元
周美琪
蒋振刚
程斐豪
师为礼
苗语
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changchun University of Science and Technology
Original Assignee
Changchun University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changchun University of Science and Technology filed Critical Changchun University of Science and Technology
Priority to CN202310008891.4A priority Critical patent/CN116309820A/en
Publication of CN116309820A publication Critical patent/CN116309820A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/535Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/74Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention is applicable to the technical field of visual positioning, and provides a monocular visual positioning method, a monocular visual positioning system and application thereof, wherein a epipolar geometric constraint relation between a query image and a matching database image is established according to visual feature matching points of the query image and the matching database image, then a scale coefficient in the epipolar geometric constraint relation is calculated through the visual feature matching points and the spatial positions of the matching points, and finally the absolute position of a query camera is calculated according to the scale coefficient and the epipolar geometric constraint relation; according to the embodiment of the invention, the scale coefficient in the epipolar geometry constraint relation is solved by utilizing the spatial positions of the matched characteristic points, and the positioning function can be realized by only matching one database image when the image is queried. In addition, in the process of solving the scale coefficient, the estimated value of the scale coefficient is continuously corrected by an iterative re-weighting method, so that the minimum domain solution of the scale coefficient is gradually obtained, and the solving precision of the scale coefficient is improved.

Description

Monocular vision positioning method, monocular vision positioning system and application of monocular vision positioning system
Technical Field
The invention belongs to the technical field of visual positioning, and particularly relates to a monocular visual positioning method, a monocular visual positioning system and application of the monocular visual positioning system.
Background
The visual positioning technology in the indoor scene is an indoor positioning technology which is widely researched at present, and the visual positioning system can be divided into a monocular visual positioning system and a multi-visual positioning system according to the different numbers of inquiry cameras.
In the actual positioning process, the query image needs to be uploaded to a server side, and a database image matched with the query image is retrieved from the visual map. After the database image is obtained that matches the query image, a epipolar geometry (Epipolar Geometry) constraint relationship may be established between the matching database image and the query image. By means of the epipolar geometry constraint relationship, the relative position relationship between the query camera and the database camera can be estimated.
It should be noted that, in the epipolar geometry constraint relationship established by a query image and a database image, the relative position of the query camera is estimated only according to the relationship, and the absolute position of the query camera cannot be obtained due to the Scale Ambiguity (Scale ambience) problem. The common method for solving the problem of scale ambiguity is to build a plurality of epipolar geometry constraint relations by using a plurality of matching database images, so as to avoid solving the scale coefficient. However, not every query image may retrieve a plurality of matching database images.
In order to solve the problem of scale ambiguity, the existing algorithm often establishes a plurality of epipolar geometry constraint relations through a plurality of database images, so that the problem of solving the scale coefficient is avoided, and the problem of scale ambiguity is indirectly solved. However, in practical positioning applications, it is found that not every database image may be retrieved to obtain a plurality of matching database images. Thus, when a query image can only retrieve one matching database image, multiple epipolar geometry constraints cannot be obtained.
Disclosure of Invention
The embodiment of the invention aims to provide a monocular vision positioning method, a monocular vision positioning system and application thereof, and aims to solve the problems in the prior art determined in the background art.
The embodiment of the invention is realized in such a way that a monocular vision positioning method comprises the following steps:
respectively calculating homogeneous position coordinate matrixes of the matched feature points on the normalized query image and the matched database image;
calculating a rotation matrix and a translation vector for representing the relative position relation between the query camera and the database camera according to the homogeneous position coordinate matrix of the query image and the matching database image;
setting an initial value and calculating an initial solution of the scale coefficient according to the observation vector and the measurement vector;
updating the homotopy value according to the norm value;
calculating an overall error vector and constructing a weight matrix for solving a least square problem according to the overall error vector;
calculating a scale coefficient iteration value and an overall error vector norm according to the weight matrix, the observation vector and the measurement vector;
judging whether an iteration termination condition is met, wherein the iteration termination condition is that the norm of the total error vector is not more than a set first threshold value or the iteration value of the scale coefficient reaches a set second threshold value;
and when the iteration termination condition is met, the iteration is terminated, the position of the query camera is calculated according to the scale coefficient, and when the iteration termination condition is not met, the iteration updating of the homotopy value is continuously executed until the iteration termination condition is met.
It is another object of an embodiment of the present invention to provide a monocular vision positioning system, the system comprising:
the homogeneous position coordinate matrix calculation module is used for calculating homogeneous position coordinate matrixes of the matched characteristic points on the normalized query image and the matched database image respectively;
the relative position relation calculation module is used for calculating a rotation matrix and a translation vector for representing the relative position relation between the query camera and the database camera according to the homogeneous position coordinate matrix of the query image and the matched database image;
the scale factor initial solution calculation module is used for setting an initial value and calculating a scale factor initial solution according to the observation vector and the measurement vector;
the homotopy value updating module is used for updating the homotopy value according to the norm value;
the weight matrix construction module is used for calculating an overall error vector and constructing a weight matrix for solving the least square problem according to the overall error vector;
the scale factor iterative computation module is used for computing a scale factor iterative value and an overall error vector norm according to the weight matrix, the observation vector and the measurement vector;
the termination judging module is used for judging whether an iteration termination condition is met, wherein the iteration termination condition is that the norm of the total error vector is not greater than a set first threshold value or the iteration value of the scale coefficient reaches a set second threshold value;
and the result output module is used for ending the iteration when the iteration ending condition is met, calculating the position of the query camera according to the scale coefficient, and continuously executing the iteration updating of the homotopy value until the iteration ending condition is met when the iteration ending condition is not met.
It is another object of embodiments of the present invention to provide an application of a monocular vision positioning method in indoor positioning.
According to the embodiment of the invention, the scale coefficient in the epipolar geometry constraint relation is solved by utilizing the spatial positions of the matched characteristic points, and the positioning function can be realized by only matching one database image when the image is queried. In addition, in the process of solving the scale coefficient, the estimated value of the scale coefficient is continuously corrected by an iterative re-weighting method, so that the minimum domain solution of the scale coefficient is gradually obtained, and the solving precision of the scale coefficient is improved.
Drawings
Fig. 1 is a schematic diagram illustrating execution of a monocular vision positioning method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a monocular visual positioning method according to an embodiment of the present invention;
FIG. 3 is a flowchart of calculating a homogeneous position coordinate matrix according to an embodiment of the present invention;
FIG. 4 is a flow chart of calculating a rotation matrix and a translation vector according to an embodiment of the present invention;
FIG. 5 is a flowchart of constructing a weight matrix according to an embodiment of the present invention;
FIG. 6 is a flowchart of calculating scale factor iteration values and overall error vector norms according to an embodiment of the present invention;
FIG. 7 is a block diagram of a monocular vision positioning system according to an embodiment of the present invention;
FIG. 8 is a block diagram of the internal architecture of a computer device in one embodiment.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
It will be understood that the terms "first," "second," and the like, as used herein, may be used to describe various elements, but these elements are not limited by these terms unless otherwise specified. These terms are only used to distinguish one element from another element. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script, without departing from the scope of the present application.
As shown in fig. 1 and 2, in one embodiment, a monocular vision positioning method is provided, which may specifically include the following steps:
step S100, homogeneous position coordinate matrixes of the matched feature points on the normalized query image and the matched database image are calculated respectively.
In the embodiment of the invention, the image I is inquired Q Is obtained by shooting through a handheld intelligent mobile terminal by a user and is matched with a database image I M Is obtained by a search algorithm and is used for inquiring the image I Q Database images with certain visual feature similarities have a certain number of visual feature matching points between the query image and the database image. Here, the search algorithm belongs to the prior art, and the embodiment of the present invention is not specifically limited herein.
Due to inquiry of image I Q Match database image I M With a certain number of visual feature matching points, based on which normalized query image I can be calculated Q Match database image I M And (5) matching the homogeneous position coordinate matrix of the feature points.
Step 200, calculating a rotation matrix and a translation vector for representing the relative position relation between the query camera and the database camera according to the homogeneous position coordinate matrix of the query image and the matching database image.
Step S300, setting an initial value and calculating an initial solution of the scale coefficient according to the observation vector and the measurement vector.
In the embodiment of the invention, the initial value comprises a norm value, homotopy parameters, an initial value of homotopy values, an error threshold, an iteration number threshold and an iteration count value. The observation vector is the vector formed by the observation data, namely the sample value in statistics. The measurement vector is a vector obtained by performing an operation on the basis of the observation vector. In the embodiment of the invention, the observation vector is calculated by the translation vector and the coordinates of the image points; the measurement vector is calculated from the rotation matrix and the world point coordinates.
In the embodiment of the invention, a norm value p=10 and an iteration number threshold k are set L =20, homotopy parameter k H Initial value k of homotopy value of =1.5 HI =2, error threshold δ, iteration count l=1, based on which the scale factor initial solution μ 0 Can be defined as:
Figure BDA0004037057750000051
step S400, updating the homotopy value according to the norm value.
In the embodiment of the invention, the homotopy value k HI Is pressed byThe process was performed as follows:
Figure BDA0004037057750000061
wherein min (p, k H k HI ) Representing normed values p and k H k HI Is smaller in the function max (p, k H k HI ) Representing normed values p and k H k HI Is a larger value of (a).
Step S500, calculating an overall error vector and constructing a weight matrix for solving the least square problem according to the overall error vector.
In the embodiment of the invention, the weight matrix can give more weight to a more reliable estimation result, so that the estimation precision of the least square method can be improved.
Step S600, calculating scale coefficient iteration values and overall error vector norms according to the weight matrix, the observation vector and the measurement vector.
Step S700, determining whether an iteration termination condition is satisfied, where the iteration termination condition is that the overall error vector norm is not greater than a set first threshold or that the scale factor iteration value reaches a set second threshold.
Step S800, when the iteration termination condition is met, the iteration is terminated, the position of the query camera is calculated according to the scale coefficient, and when the iteration termination condition is not met, the iteration update on the homotopy value is continuously executed until the iteration termination condition is met.
In the embodiment of the invention, when the iteration termination condition is satisfied, the obtained scale coefficient is assigned to the scale coefficient estimated value mu F I.e. equivalent to calculating the position of the querying camera from the scale factors
Figure BDA0004037057750000062
Figure BDA0004037057750000063
Wherein M is R And M T Respectively are provided withFor the rotation matrix and translation vector obtained in step S200, P D To match the database image feature point location matrix. Solving for the position of the query camera
Figure BDA0004037057750000064
And then, the position of the query camera is considered to be the position of the user, so that the position estimation of the user is realized. When the iteration termination condition is not satisfied, steps S400 to S700 are repeated until the termination condition is satisfied.
According to the embodiment of the invention, the scale coefficient in the epipolar geometry constraint relation is solved by utilizing the spatial positions of the matched characteristic points, and the positioning function can be realized by only matching one database image when the image is queried. In addition, in the process of solving the scale coefficient, the estimated value of the scale coefficient is continuously corrected by an iterative re-weighting method, so that the minimum domain solution of the scale coefficient is gradually obtained, and the solving precision of the scale coefficient is improved. Compared with the least square method scale coefficient solving method in the prior art, the method provided by the embodiment of the invention has certain advantages in the aspects of calculation efficiency and calculation accuracy.
In one embodiment, as shown in fig. 3, the step S100 may specifically include the following steps:
step S101, accelerating robust feature point extraction is carried out on the query image and the matching database image respectively, and a query image feature point position matrix and a matching database image feature point position matrix are obtained.
Step S102, a plurality of pairs of matching feature points between the query image and the matching database image are obtained through feature point matching.
Step S103, obtaining homogeneous position coordinate matrixes of the matched feature points on the query image and the matched database image, and normalizing the matched feature points to obtain normalized homogeneous position coordinate matrixes.
In the embodiment of the invention, the characteristic point position matrix of the query image is P Q The matching database image feature point position matrix is P D . The homogeneous position coordinate matrixes of the matched characteristic points on the query image and the matched database image are respectively P QM And P DM . The normalized homogeneous position coordinate matrixes are respectively
Figure BDA0004037057750000071
And->
Figure BDA0004037057750000072
Wherein:
Figure BDA0004037057750000073
Figure BDA0004037057750000074
in one embodiment, as shown in fig. 4, the step S200 may specifically include the following steps:
step S201, solving an essential matrix according to the homogeneous position coordinate matrix and the epipolar constraint relation.
In the embodiment of the invention, the normalized homogeneous position coordinate matrix
Figure BDA0004037057750000075
And->
Figure BDA0004037057750000076
The epipolar constraint relation with the essential matrix E is satisfied, namely:
Figure BDA0004037057750000077
the essential matrix E can be obtained by solving the epipolar constraint relationship. The essence matrix E may reflect the relative positional relationship between the query camera and the database camera, which relationship may be determined by rotating the matrix M R And translation vector M T Description is made. An essential matrix E and a rotation matrix M R And translation vector M T The relation between the two is:
E=[M T ] × M R
wherein [ M T ] × Is the translation vector M T Is an anti-symmetric matrix of (a).
Step S202, singular value decomposition is carried out on the essence matrix to obtain a rotation matrix and a translation vector for representing the relative position relation between the query camera and the database camera.
In the embodiment of the invention, the rotation matrix M between cameras can be solved by carrying out singular value decomposition on the essential matrix E R And translation vector M T . Rotation matrix M R Is a 3 x 3 dimensional matrix, composed of elements m st (s=1, 2,3, t=1, 2, 3):
Figure BDA0004037057750000081
translation vector M T Is a 3 x 1 dimensional vector, formed by the element m q (q=1, 2, 3) composition:
M T =[m 1 m 2 m 3 ] T
in one embodiment, as shown in fig. 5, step S500 may specifically include the following steps:
step S501, calculating an overall error vector according to the scale factor, the observation vector and the measurement vector.
In the embodiment of the invention, the overall error vector can be represented by the observation vector H O And measuring vector Y M And (3) obtaining:
Δ=μ (l) H O -Y M
wherein mu (l) For the scale factor obtained in the first iteration, H O To observe the vector, Y M Is a measurement vector.
In the examples of the present invention, Y is considered to be M For measuring vector Y M Is relatively reliable data and observes vector H O Multiplying the scale factor is the amount with error, the difference between the two is the error delta, and the optimal scale factor estimated value is obtained by solving the minimized error.
Specifically, the observation vector H O =[(m 3 u 1 -m 1 ),(m 3 v 1 -m 2 ),…,(m 3 u n -m 1 ),(m 3 v n -m 2 )] T ,(u 1 ,v 1 ) Is the image position coordinates of the first matching feature point, (u) n ,v n ) Is the image position coordinates of the nth matching feature point. Measuring vector Y M The method comprises the following steps:
Figure BDA0004037057750000091
wherein, (x) 1 ,y 1 ,z 1 ) Is the spatial position coordinates of the first matching feature point, (x) n ,y n ,z n ) Is the spatial position coordinates of the nth matching feature point. According to the position of the matching characteristic point on the database image, the matching characteristic point can be arranged in a matrix M D And find the spatial position coordinates of the matching feature points. Matrix M D Is the spatial position coordinate matrix of the pixel points of the database image, and the matrix M D Is one m D A x 3-dimensional matrix comprising m D Three-dimensional position coordinates, m D Is the total number of pixels matching the database image, matrix M D The three-dimensional position coordinates stored in the matching database image correspond to the data points in the matching database image one by one according to the matrix M D The spatial location of each pixel in the matching database image can be found.
Based on this, the overall error vector Δ may be represented as Δ= [ e 1 ,…,e i ,…e 2n ] T The total error vector Δ contains 2n error values in total.
Step S502, calculating the diagonal element values of the weight matrix according to the total error vector.
In the embodiment of the invention, the diagonal element values of the weight matrix can be further calculated according to the total error vector delta
Figure BDA0004037057750000092
Figure BDA0004037057750000093
Step S503, calculating the weight value in the weight matrix according to the diagonal element value, and completing the construction of the weight matrix.
In the embodiment of the invention, the diagonal element value is utilized
Figure BDA0004037057750000094
The weight value w in the weight matrix can be calculated i
Figure BDA0004037057750000095
Based on this, a weight matrix W for solving the least squares problem can be constructed:
Figure BDA0004037057750000101
in one embodiment, as shown in fig. 6, step S600 may specifically include the following steps: .
Step S601, calculating the basic value of the scale coefficient according to the weight matrix, the observation vector and the measurement vector.
In the embodiment of the invention, the basic value mu of the scale coefficient B The method comprises the following steps:
Figure BDA0004037057750000102
step S602, newton coefficients are calculated according to preset homotopy values.
The newton coefficient q is:
Figure BDA0004037057750000103
step S603, the scale coefficient is updated in an iterative mode, and the error norm is assigned.
Scale factor mu (l) The update function is:
Figure BDA0004037057750000104
corresponding error norm p N The valuation function is:
Figure BDA0004037057750000105
in step S604, the global error vector norm is solved.
The overall error vector norm is:
Δ F =||Δ|| pN
step S605 updates the iteration number of the scale factor.
In the embodiment of the invention, after the calculation is completed, the iteration times of the scale coefficient are updated, i.e. l is assigned as l+1.
As shown in fig. 7, in one embodiment, a monocular vision positioning system is provided, which may specifically include a homogeneous position coordinate matrix calculation module 100, a relative position relation calculation module 200, a scale factor initial solution calculation module 300, a homotopy value update module 400, a weight matrix construction module 500, a scale factor iteration calculation module 600, a termination decision module 700, and a result output module 800.
The homogeneous position coordinate matrix calculating module 100 is configured to calculate homogeneous position coordinate matrices of the matching feature points on the normalized query image and the matching database image, respectively.
The relative position relation calculating module 200 is configured to calculate a rotation matrix and a translation vector for representing a relative position relation between the query camera and the database camera according to the homogeneous position coordinate matrix of the query image and the matching database image.
The scale factor initial solution calculation module 300 is configured to set an initial value and calculate a scale factor initial solution according to an observation vector and a measurement vector.
The homotopy value updating module 400 is configured to update the homotopy value according to the norm value.
The weight matrix construction module 500 is configured to calculate an overall error vector and construct a weight matrix for solving a least squares problem according to the overall error vector.
The scale factor iterative computation module 600 is configured to compute a scale factor iterative value and an overall error vector norm according to a weight matrix, an observation vector and a measurement vector.
The termination determination module 700 is configured to determine whether an iteration termination condition is satisfied, where the iteration termination condition is that a total error vector norm is not greater than a set first threshold or that a scale factor iteration value reaches a set second threshold.
The result output module 800 is configured to, when the iteration termination condition is satisfied, terminate the iteration, calculate the position of the query camera according to the scale coefficient, and when the iteration termination condition is not satisfied, continue to perform iterative updating on the homotopy value until the iteration termination condition is satisfied.
In one embodiment, there is provided an application of a monocular vision positioning method in indoor positioning.
FIG. 8 illustrates an internal block diagram of a computer device in one embodiment. The computer device includes a processor, a memory, a network interface, an input device, and a display screen connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program which, when executed by a processor, causes the processor to implement a monocular vision positioning method. The internal memory may also have stored therein a computer program which, when executed by the processor, causes the processor to perform the monocular vision positioning method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 8 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the monocular vision positioning system provided herein may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 8. The memory of the computer device may store various program modules constituting the monocular vision positioning system, such as the homogeneous position coordinate matrix calculation module 100, the relative position relation calculation module 200, the scale factor initial solution calculation module 300, the homotopy value update module 400, the weight matrix construction module 500, the scale factor iterative calculation module 600, the termination determination module 700, and the result output module 800 shown in fig. 7. The computer program of each program module causes the processor to carry out the steps in the monocular visual positioning method of each embodiment of the present application described in the present specification.
For example, the computer device shown in fig. 8 may perform step S100 by the homogeneous position coordinate matrix calculation module 100 in the monocular vision positioning system as shown in fig. 7. The computer device may perform step S200 through the relative positional relationship calculation module 200. The computer device may execute step S300 through the scale factor initial solution calculation module 300.
In one embodiment, a computer device is presented, the computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
step S100, homogeneous position coordinate matrixes of the matched feature points on the normalized query image and the matched database image are calculated respectively.
Step 200, calculating a rotation matrix and a translation vector for representing the relative position relation between the query camera and the database camera according to the homogeneous position coordinate matrix of the query image and the matching database image.
Step S300, setting an initial value and calculating an initial solution of the scale coefficient according to the observation vector and the measurement vector.
Step S400, updating the homotopy value according to the norm value.
Step S500, calculating an overall error vector and constructing a weight matrix for solving the least square problem according to the overall error vector.
Step S600, calculating scale coefficient iteration values and overall error vector norms according to the weight matrix, the observation vector and the measurement vector.
Step S700, determining whether an iteration termination condition is satisfied, where the iteration termination condition is that the overall error vector norm is not greater than a set first threshold or that the scale factor iteration value reaches a set second threshold.
Step S800, when the iteration termination condition is met, the iteration is terminated, the position of the query camera is calculated according to the scale coefficient, and when the iteration termination condition is not met, the iteration update on the homotopy value is continuously executed until the iteration termination condition is met.
In one embodiment, a computer readable storage medium is provided, having a computer program stored thereon, which when executed by a processor causes the processor to perform the steps of:
step S100, homogeneous position coordinate matrixes of the matched feature points on the normalized query image and the matched database image are calculated respectively.
Step 200, calculating a rotation matrix and a translation vector for representing the relative position relation between the query camera and the database camera according to the homogeneous position coordinate matrix of the query image and the matching database image.
Step S300, setting an initial value and calculating an initial solution of the scale coefficient according to the observation vector and the measurement vector.
Step S400, updating the homotopy value according to the norm value.
Step S500, calculating an overall error vector and constructing a weight matrix for solving the least square problem according to the overall error vector.
Step S600, calculating scale coefficient iteration values and overall error vector norms according to the weight matrix, the observation vector and the measurement vector.
Step S700, determining whether an iteration termination condition is satisfied, where the iteration termination condition is that the overall error vector norm is not greater than a set first threshold or that the scale factor iteration value reaches a set second threshold.
Step S800, when the iteration termination condition is met, the iteration is terminated, the position of the query camera is calculated according to the scale coefficient, and when the iteration termination condition is not met, the iteration update on the homotopy value is continuously executed until the iteration termination condition is met.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in various embodiments may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (9)

1. A method of monocular vision positioning, the method comprising:
respectively calculating homogeneous position coordinate matrixes of the matched feature points on the normalized query image and the matched database image;
calculating a rotation matrix and a translation vector for representing the relative position relation between the query camera and the database camera according to the homogeneous position coordinate matrix of the query image and the matching database image;
setting an initial value and calculating an initial solution of the scale coefficient according to the observation vector and the measurement vector;
updating the homotopy value according to the norm value;
calculating an overall error vector and constructing a weight matrix for solving a least square problem according to the overall error vector;
calculating a scale coefficient iteration value and an overall error vector norm according to the weight matrix, the observation vector and the measurement vector;
judging whether an iteration termination condition is met, wherein the iteration termination condition is that the norm of the total error vector is not more than a set first threshold value or the iteration value of the scale coefficient reaches a set second threshold value;
and when the iteration termination condition is met, the iteration is terminated, the position of the query camera is calculated according to the scale coefficient, and when the iteration termination condition is not met, the iteration updating of the homotopy value is continuously executed until the iteration termination condition is met.
2. The method according to claim 1, wherein the step of calculating the homogeneous location coordinate matrix of the matching feature points on the normalized query image and the matching database image, respectively, specifically comprises:
accelerating robust feature point extraction is respectively carried out on the query image and the matching database image, so as to obtain a feature point matrix of the query image and a feature point matrix of the matching database image;
obtaining a plurality of pairs of matching feature points between the query image and the matching database image through feature point matching;
obtaining homogeneous position coordinate matrixes of the matched characteristic points on the query image and the matched database image, and normalizing the matched characteristic points to obtain normalized homogeneous position coordinate matrixes.
3. The method according to claim 1, wherein the step of calculating a rotation matrix and a translation vector for characterizing the relative positional relationship between the query camera and the database camera from the homogeneous position coordinate matrix of the query image and the matching database image comprises:
solving an essential matrix according to the homogeneous position coordinate matrix and the epipolar constraint relation;
singular value decomposition is performed on the essence matrix to obtain a rotation matrix and a translation vector for representing the relative position relationship between the query camera and the database camera.
4. The method according to claim 1, wherein the step of calculating the overall error vector and constructing a weight matrix for solving the least squares problem from the overall error vector comprises:
calculating an overall error vector according to the scale coefficient, the observation vector and the measurement vector;
calculating diagonal element values of a weight matrix according to the overall error vector;
and calculating weight values in the weight matrix according to the diagonal element values, and completing construction of the weight matrix.
5. The method according to claim 1, wherein the step of calculating scale factor iteration values and overall error vector norms from the weight matrix, the observation vector and the measurement vector comprises:
calculating a basic value of the scale coefficient according to the weight matrix, the observation vector and the measurement vector;
calculating Newton coefficients according to preset homotopy values;
carrying out iterative updating on the scale coefficient and assigning an error norm;
solving the overall error vector norm;
and updating the iteration times of the scale factors.
6. A method according to claim 3, characterized in that the rotation matrix M R Is a 3 x 3 dimensional matrix, composed of elements m st (s=1, 2,3, t=1, 2, 3), rotating matrix M R The method comprises the following steps:
Figure FDA0004037057740000021
the translation vector M T Is a 3 x 1 dimensional vector, formed by the element m q (q=1, 2, 3);
M T =[m 1 m 2 m 3 ] T
7. the method of claim 5, wherein the updating function of the scale factor is:
Figure FDA0004037057740000031
wherein q is a Newton coefficient,
Figure FDA0004037057740000032
k HI is homotopy value, mu B The basic value of the scale factor, p is the norm value.
8. A monocular vision positioning system, the system comprising:
the homogeneous position coordinate matrix calculation module is used for calculating homogeneous position coordinate matrixes of the matched characteristic points on the normalized query image and the matched database image respectively;
the relative position relation calculation module is used for calculating a rotation matrix and a translation vector for representing the relative position relation between the query camera and the database camera according to the homogeneous position coordinate matrix of the query image and the matched database image;
the scale factor initial solution calculation module is used for setting an initial value and calculating a scale factor initial solution according to the observation vector and the measurement vector;
the homotopy value updating module is used for updating the homotopy value according to the norm value;
the weight matrix construction module is used for calculating an overall error vector and constructing a weight matrix for solving the least square problem according to the overall error vector;
the scale factor iterative computation module is used for computing a scale factor iterative value and an overall error vector norm according to the weight matrix, the observation vector and the measurement vector;
the termination judging module is used for judging whether an iteration termination condition is met, wherein the iteration termination condition is that the norm of the total error vector is not greater than a set first threshold value or the iteration value of the scale coefficient reaches a set second threshold value;
and the result output module is used for ending the iteration when the iteration ending condition is met, calculating the position of the query camera according to the scale coefficient, and continuously executing the iteration updating of the homotopy value until the iteration ending condition is met when the iteration ending condition is not met.
9. Use of the monocular vision positioning method as claimed in any one of claims 1 to 7 in indoor positioning.
CN202310008891.4A 2023-01-04 2023-01-04 Monocular vision positioning method, monocular vision positioning system and application of monocular vision positioning system Pending CN116309820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310008891.4A CN116309820A (en) 2023-01-04 2023-01-04 Monocular vision positioning method, monocular vision positioning system and application of monocular vision positioning system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310008891.4A CN116309820A (en) 2023-01-04 2023-01-04 Monocular vision positioning method, monocular vision positioning system and application of monocular vision positioning system

Publications (1)

Publication Number Publication Date
CN116309820A true CN116309820A (en) 2023-06-23

Family

ID=86827653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310008891.4A Pending CN116309820A (en) 2023-01-04 2023-01-04 Monocular vision positioning method, monocular vision positioning system and application of monocular vision positioning system

Country Status (1)

Country Link
CN (1) CN116309820A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117036488A (en) * 2023-10-07 2023-11-10 长春理工大学 Binocular vision positioning method based on geometric constraint

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117036488A (en) * 2023-10-07 2023-11-10 长春理工大学 Binocular vision positioning method based on geometric constraint
CN117036488B (en) * 2023-10-07 2024-01-02 长春理工大学 Binocular vision positioning method based on geometric constraint

Similar Documents

Publication Publication Date Title
CN113240769B (en) Spatial link relation identification method and device and storage medium
WO2023030163A1 (en) Method, apparatus and device for converting texture map of three-dimensional model, and medium
CN116309820A (en) Monocular vision positioning method, monocular vision positioning system and application of monocular vision positioning system
CN113850807B (en) Image sub-pixel matching positioning method, system, device and medium
CN109102524B (en) Tracking method and tracking device for image feature points
CN111915681B (en) External parameter calibration method, device, storage medium and equipment for multi-group 3D camera group
CN113642397B (en) Object length measurement method based on mobile phone video
CN114266871A (en) Robot, map quality evaluation method, and storage medium
CN111177643A (en) Three-dimensional coordinate conversion method
CN116630442B (en) Visual SLAM pose estimation precision evaluation method and device
CN109829939B (en) Method for narrowing search range of multi-view image matching same-name image points
CN115496793A (en) Stereo matching method, device, computer equipment and storage medium
CN114463429B (en) Robot, map creation method, positioning method, and medium
CN116038720A (en) Hand-eye calibration method, device and equipment based on point cloud registration
CN110824496A (en) Motion estimation method, motion estimation device, computer equipment and storage medium
CN114966576A (en) Radar external reference calibration method and device based on prior map and computer equipment
CN112819900B (en) Method for calibrating internal azimuth, relative orientation and distortion coefficient of intelligent stereography
CN115294280A (en) Three-dimensional reconstruction method, apparatus, device, storage medium, and program product
CN115272470A (en) Camera positioning method and device, computer equipment and storage medium
CN109919998B (en) Satellite attitude determination method and device and terminal equipment
CN115205419A (en) Instant positioning and map construction method and device, electronic equipment and readable storage medium
CN110866535B (en) Disparity map acquisition method and device, computer equipment and storage medium
CN113570659A (en) Shooting device pose estimation method and device, computer equipment and storage medium
CN113537351A (en) Remote sensing image coordinate matching method for mobile equipment shooting
CN114842059A (en) House point cloud registration method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination