CN109211264A - Scaling method, device, electronic equipment and the readable storage medium storing program for executing of measuring system - Google Patents
Scaling method, device, electronic equipment and the readable storage medium storing program for executing of measuring system Download PDFInfo
- Publication number
- CN109211264A CN109211264A CN201710546626.6A CN201710546626A CN109211264A CN 109211264 A CN109211264 A CN 109211264A CN 201710546626 A CN201710546626 A CN 201710546626A CN 109211264 A CN109211264 A CN 109211264A
- Authority
- CN
- China
- Prior art keywords
- coordinate
- dimensional
- camera
- laser
- calibrating block
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C25/00—Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
Landscapes
- Engineering & Computer Science (AREA)
- Manufacturing & Machinery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The embodiment of the invention provides a kind of scaling method of measuring system, device, electronic equipment and readable storage medium storing program for executing, applied to technical field of machine vision, the described method includes: according to the positional relationship of laser and calibrating block, at least three not conllinear vertex on calibrating block section the first coordinate of three-dimensional in laser coordinates system respectively is obtained.The profile diagram for obtaining the calibrating block section under the line laser irradiation that laser generates, determines at least three not conllinear vertex in the two-dimensional pixel coordinate where profile diagram in image coordinate system.According to the internal reference and distortion factor of the camera obtained in advance, and three-dimensional first coordinate and two-dimensional pixel coordinate, the outer ginseng of camera is determined.According to the outer ginseng of camera and three-dimensional first coordinate, optic plane equations of the optical plane of line laser formation under camera coordinates system are determined.The scaling method of the embodiment of the present invention is simple, quick, is suitable for field calibration.
Description
Technical field
The present invention relates to technical field of machine vision, more particularly to the scaling method, device, electronics of a kind of measuring system
Equipment and readable storage medium storing program for executing.
Background technique
In image measurement process and machine vision applications, for the three-dimensional geometry position for determining space object surface point
With the correlation between the space object in the picture corresponding points, it is necessary to establish the geometrical model of camera imaging.Geometrical model
Parameter includes: camera parameter and optic plane equations, wherein camera parameter includes: camera internal reference, Camera extrinsic and distortion factor.
Camera internal reference refers to the focal length f in the direction camera x and the direction yxAnd fyAnd picture centre coordinate (u0, v0), distortion factor refers to radial direction
Distortion factor and tangential distortion coefficient.Camera extrinsic refers to camera coordinates system relative to the spin matrix R of reference frame and translation
Vector t, the process for solving camera parameter is camera calibration.During actual measurement, in addition to carrying out camera calibration, it is also necessary to ask
Optic plane equations are solved, so as to determine the position of object to be measured according to camera parameter and optic plane equations in image measurement.
Either in image measurement or machine vision applications, the calculating of camera calibration and optic plane equations is all very
The key link, the precision of calculated result and the stability of algorithm directly affect the accuracy of measurement result.In the related technology, exist
It when calculating optic plane equations, needs to be individually positioned in calibrating block at the position away from camera different distance, laser is issued
Line laser is beaten in calibrating block at different locations, and calibrating block is imaged with camera, is extracted in calibrating block imaging
Line laser obtains the line laser in the calibrating block imaging at different location.Due to the calibrating block of different location correspond to it is different
World coordinates and image coordinate pass through camera mark according to the corresponding world coordinates of the calibrating block of each position and image coordinate
Determine algorithm and calculate Camera extrinsic, and then calculates seat of the point under reference frame on line laser according to Camera extrinsic and internal reference
Mark.Finally, carrying out plane fitting by coordinate points of the least square method to same line laser, the optical plane where line laser is obtained
Equation.As it can be seen that this method needs for calibrating block to be placed on different location, plurality of pictures is then extracted, therefore, this method operates more
It is cumbersome.
Summary of the invention
A kind of scaling method for being designed to provide measuring system of the embodiment of the present invention, device, electronic equipment and readable
Storage medium, to simplify the process of measuring system calibration.Specific technical solution is as follows:
The embodiment of the invention discloses a kind of scaling method of measuring system, the measuring system includes laser and phase
Machine, which comprises
According to the positional relationship of scheduled laser and calibrating block, at least three obtained on the calibrating block section are not total to
Line vertex the first coordinate of three-dimensional in the laser coordinates system constructed in advance respectively;
The profile diagram in the calibrating block section under the line laser irradiation that the laser generates is obtained, determination is described at least
Three not conllinear vertex are in the two-dimensional pixel coordinate where the profile diagram in image coordinate system;
According to the internal reference of the camera obtained in advance and distortion factor and three-dimensional first coordinate and the two dimension
Pixel coordinate determines the outer ginseng of the camera;
According to the outer ginseng of the camera and three-dimensional first coordinate, determine the optical plane of the line laser formation described
Optic plane equations under camera coordinates system.
Optionally, the internal reference and distortion factor of the camera that the basis obtains in advance and three-dimensional first seat
Mark and the two-dimensional pixel coordinate, the step of determining the outer ginseng of the camera, comprising:
Two dimension according to the internal reference of the camera and distortion factor and the two-dimensional pixel coordinate, after obtaining distortion
Pixel coordinate;
According to the internal reference of the camera, three-dimensional first coordinate and it is described go distortion after two-dimensional pixel coordinate, pass through
Solution perspective N point PnP, obtains the outer ginseng of the camera.
Optionally, the outer ginseng according to the camera and three-dimensional first coordinate determine what the line laser was formed
The step of optic plane equations of the optical plane under the camera coordinates system, comprising:
According to the outer ginseng of the camera and three-dimensional first coordinate, obtains three-dimensional first coordinate and sat in the camera
The second coordinate of three-dimensional under mark system;
According to the positional relationship and three-dimensional second coordinate in the optical plane and the calibrating block section, institute is obtained
State the three-dimensional third coordinate that three-dimensional second coordinate is mapped in the optical plane;
According to the three-dimensional third coordinate, the optic plane equations are obtained by linear regression method.
Optionally, the optical plane is parallel with the calibrating block section;
The outer ginseng according to the camera and three-dimensional first coordinate, the optical plane for determining that the line laser is formed exist
The step of optic plane equations under the camera coordinates system, comprising:
According to the outer ginseng of the camera and three-dimensional first coordinate, obtains three-dimensional first coordinate and sat in the camera
The second coordinate of three-dimensional under mark system;
According to three-dimensional second coordinate, the optic plane equations are obtained by linear regression method.
Optionally, the outer ginseng according to the camera and three-dimensional first coordinate, obtain three-dimensional first coordinate
The step of three-dimensional second coordinate under the camera coordinates system, comprising:
According to formula: XC,i=RXW,i+ t determines the three-dimensional first coordinate XW,iThree-dimensional under the camera coordinates system
Second coordinate XC,i;
Wherein, i=1,2 ... n, n >=3, the outer ginseng of the camera include: R and t, and R indicates that the camera coordinates system is opposite
In the spin matrix of the laser coordinates system, t indicates translation of the camera coordinates system relative to the laser coordinates system
Vector.
Optionally, the positional relationship according to scheduled laser and calibrating block obtains on the calibrating block section
At least three not conllinear vertex respectively three-dimensional first coordinate in the laser coordinates system constructed in advance the step of, comprising:
According to the size of the positional relationship and the calibrating block of the laser and the calibrating block, acquisition is described at least
Three not conllinear vertex the first coordinate of three-dimensional in the laser coordinates system respectively.
Optionally, the size of the positional relationship and the calibrating block according to the laser and the calibrating block,
Obtain three-dimensional first coordinate of the described at least three not conllinear vertex respectively in the laser coordinates system specifically: when described
Reference axis in the optical plane laser coordinates system parallel and described with the calibrating block section is perpendicular to the calibrating block section
When, if the vertical range of the calibrating block section and laser coordinates system origin is S, described at least three is conllinear
Coordinate in vertex in three-dimensional first coordinate on each vertex with calibrating block section vertical direction is S, described
The coordinate parallel with the calibrating block section is each described vertex in institute in three-dimensional first coordinate on each vertex
State corresponding size in calibrating block section.
The embodiment of the invention also discloses a kind of caliberating device of measuring system, the measuring system includes laser and phase
Machine, described device include:
Three-dimensional first coordinate determining module, for the positional relationship according to scheduled laser and calibrating block, described in acquisition
At least three not conllinear vertex on calibrating block section the first coordinate of three-dimensional in the laser coordinates system constructed in advance respectively;
Profile diagram obtains module, for obtaining the calibrating block section under the line laser irradiation that the laser generates
Profile diagram;
Two-dimensional pixel coordinate determining module, for determining that described at least three not conllinear vertex are schemed where the profile diagram
As the two-dimensional pixel coordinate in coordinate system;
Outer ginseng determining module, for according to the internal reference and distortion factor of the camera obtained in advance and the three-dimensional
First coordinate and the two-dimensional pixel coordinate, determine the outer ginseng of the camera;
Optic plane equations determining module, for according to the camera outer ginseng and three-dimensional first coordinate, determine described in
Optic plane equations of the optical plane that line laser is formed under the camera coordinates system.
Optionally, the outer ginseng determining module is specifically used for, according to the internal reference of the camera and distortion factor and described
Two-dimensional pixel coordinate, the two-dimensional pixel coordinate after obtaining distortion;According to the internal reference of the camera, three-dimensional first coordinate and
The two-dimensional pixel coordinate gone after distortion has an X-rayed N point PnP by solution, obtains the outer ginseng of the camera.
Optionally, the optic plane equations determining module is specifically used for, according to the outer ginseng of the camera and described three-dimensional
One coordinate obtains three-dimensional second coordinate of three-dimensional first coordinate under the camera coordinates system;According to the optical plane with
The positional relationship in the calibrating block section and three-dimensional second coordinate, obtain three-dimensional second coordinate be mapped in it is described
Three-dimensional third coordinate in optical plane;According to the three-dimensional third coordinate, the optic plane equations are obtained by linear regression method.
Optionally, the optical plane is parallel with the calibrating block section;
The optic plane equations determining module is specifically used for, according to the outer ginseng of the camera and three-dimensional first coordinate,
Obtain three-dimensional second coordinate of three-dimensional first coordinate under the camera coordinates system;According to three-dimensional second coordinate, lead to
It crosses linear regression method and obtains the optic plane equations.
Optionally, the optic plane equations determining module is specifically used for, according to formula: XC,i=RXW,i+ t determines described three
Tie up the first coordinate XW,iThe second coordinate of three-dimensional X under the camera coordinates systemC,i;
Wherein, i=1,2 ... n, n >=3, the outer ginseng of the camera include: R and t, and R indicates that the camera coordinates system is opposite
In the spin matrix of the laser coordinates system, t indicates translation of the camera coordinates system relative to the laser coordinates system
Vector.
Optionally, the three-dimensional first coordinate determining module is specifically used for, according to the laser and the calibrating block
The size of positional relationship and the calibrating block obtains described at least three not conllinear vertex respectively in the laser coordinates system
In the first coordinate of three-dimensional.
Optionally, the three-dimensional first coordinate determining module is specifically used for, when the optical plane and the calibrating block section
When in parallel and the reference axis in the laser coordinates system is perpendicular to the calibrating block section, if the calibrating block section with
The vertical range of laser coordinates system origin be S, then in described at least three not conllinear vertex each vertex it is described
It with the coordinate of calibrating block section vertical direction is S in three-dimensional first coordinate, described three-dimensional the of each vertex
The coordinate parallel with the calibrating block section is each described vertex corresponding ruler in the calibrating block section in one coordinate
It is very little.
The embodiment of the invention also discloses a kind of electronic equipment, comprising: processor and machine readable storage medium, the machine
Device readable storage medium storing program for executing is stored with the machine-executable instruction that can be executed by the processor, and the processor executes the machine
When device executable instruction, the scaling method step of any of the above-described measuring system is realized.
The embodiment of the invention also discloses a kind of computer readable storage medium, the computer readable storage medium memory
Computer program is contained, when the computer program is executed by processor, realizes the calibration of any of the above-described measuring system
Method and step.
Scaling method, device, electronic equipment and the readable storage medium storing program for executing of measuring system provided in an embodiment of the present invention, according to
The positional relationship of scheduled laser and calibrating block determines at least three not conllinear vertex on calibrating block section respectively in laser
The first coordinate of three-dimensional in device coordinate system;The profile diagram in the calibrating block section under the line laser irradiation that laser generates is obtained, really
Fixed at least three not conllinear vertex are in the two-dimensional pixel coordinate where profile diagram in image coordinate system;According to the camera obtained in advance
Internal reference and distortion factor, and three-dimensional first coordinate and two-dimensional pixel coordinate determine the outer ginseng of camera;According to the outer ginseng of camera
With three-dimensional first coordinate, optic plane equations of the optical plane under camera coordinates system are determined.In the embodiment of the present invention, mark need to be only acquired
Determining the picture on block section can be completed the calibration of measuring system, therefore, the calibration of the measuring system of the embodiment of the present invention
Method is simple, quick.Certainly, implement any of the products of the present invention or method it is not absolutely required at the same reach above-described institute
There is advantage.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow chart of the scaling method of the measuring system of the embodiment of the present invention;
Fig. 2 is another flow chart of the scaling method of the measuring system of the embodiment of the present invention;
Fig. 3 is projective transformation schematic diagram in the related technology;
Fig. 4 is another flow chart of the scaling method of the measuring system of the embodiment of the present invention;
Fig. 5 is the camera coordinates system of the embodiment of the present invention and side view and front view with laser coordinates system;
Fig. 6 is the structure chart of the calibrating block under the online laser irradiation of the embodiment of the present invention;
Fig. 7 is coordinate schematic diagram of the calibrating block of the embodiment of the present invention in laser coordinates system;
Fig. 8 is the calibrating block schematic cross-section under the online laser irradiation of the embodiment of the present invention;
Fig. 9 is the structure chart of the caliberating device of the measuring system of the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
In order to solve the problems, such as that measuring system is demarcated cumbersome, the embodiment of the invention provides a kind of calibration sides of measuring system
Method, device, electronic equipment and readable storage medium storing program for executing, to simplify the process of measuring system calibration.Wherein, measuring system includes laser
Device and camera.During actual measurement, line laser is radiated on testee, and by camera to the section of testee
It is imaged, testee can be calculated according to the coordinate of the laser strip that line laser is formed on testee in the picture
The physical size of cross section profile.Due to needing the parameter according to measuring system, the physics ruler of the cross section profile of testee is calculated
It is very little, therefore, before carrying out actual measurement, need to demarcate measuring system.
Wherein, the parameter of measuring system includes: the internal reference, distortion factor, the outer line laser joined and laser generates of camera
The optic plane equations being formed by where optical plane.Since the internal reference and distortion factor of camera are ginsengs relevant to camera itself
Number, for given camera, the internal reference and distortion factor of camera are determining.Camera internal reference refers to the coke in the direction camera x and the direction y
Away from fxAnd fyAnd picture centre coordinate (u0, v0), distortion factor refers to coefficient of radial distortion and tangential distortion coefficient.And camera
Outer ginseng refers to spin matrix R and translation vector t of the camera coordinates system relative to reference frame, then, work as camera coordinates system
Or the position of reference frame, when changing, spin matrix R and translation vector t can also change therewith.Therefore, camera coordinates system
It changes with the relative position of reference frame, measuring system just needs to re-scale.
Scaling method, device, electronic equipment and the readable storage medium storing program for executing of measuring system in the embodiment of the present invention, refer to
It is scaling method, device, electronic equipment and the readable storage medium storing program for executing of measuring system when known to the internal reference and distortion factor of camera.
The scaling method of the measuring system of the embodiment of the present invention is introduced first below.
Referring to Fig. 1, Fig. 1 is a kind of flow chart of the scaling method of the measuring system of the embodiment of the present invention, including following step
It is rapid:
S101, according to the positional relationship of scheduled laser and calibrating block, obtain on calibrating block section at least three not
Conllinear vertex the first coordinate of three-dimensional in the laser coordinates system constructed in advance respectively.
In the embodiment of the present invention, calibrating block is with known structure information and the very high object of machining accuracy.It is being surveyed
When the calibration of amount system, it is first determined the position of camera and laser, camera coordinates system and laser institute where building camera
Laser coordinates system, laser coordinates system i.e. reference frame.In general, camera coordinates system and laser coordinates system phase
The certain angle of difference.Then calibrating block is placed at the position with a certain distance from camera and laser, obtains calibrating block section
On at least three not conllinear vertex coordinate in the laser coordinates system constructed in advance respectively, that is, three-dimensional first sits
Mark.Wherein it is determined that three-dimensional the first seat calibration method can be and be determined by computer, it is also possible to manual measurement, does not do herein
It limits.
S102 obtains the profile diagram in the calibrating block section in the case where line laser that laser generates irradiates, and does not determine at least three not
Conllinear vertex is in the two-dimensional pixel coordinate where profile diagram in image coordinate system.
In embodiments of the present invention, when measuring system calibrating, the line laser that can control laser sending is irradiated to
In calibrating block, so as to according to the profile diagram in calibrating block section under online laser irradiation, to measure the calibration of system.Tool
Body, the profile diagram in calibrating block section under the available line laser irradiation generated in laser, after obtaining profile diagram, this hair
It can set the upper left corner of profile diagram to the origin of image coordinate system in bright embodiment, make the X-axis horizontal direction of image coordinate system
The right side, the Y-axis of image coordinate system straight down, optionally, can also construct image coordinate system according to profile diagram.In image coordinate system
In, at least three not conllinear vertex can be obtained by the image processing method or the manual method for choosing vertex for extracting vertex
Corresponding two-dimensional pixel coordinate.
S103 is sat according to the internal reference and distortion factor of the camera obtained in advance, and three-dimensional first coordinate and two-dimensional pixel
Mark, determines the outer ginseng of camera, wherein the outer ginseng of camera is the camera coordinates system that constructs in advance relative under laser coordinates system
Outer ginseng.
It should be noted that the internal reference of camera and distortion factor are known in the embodiment of the present invention.The outer ginseng of camera refers to
, spin matrix R and translation vector t of the camera coordinates system relative to laser coordinates system.Wherein, spin matrix R is 3 × 3
Orthogonal matrix, respectively indicate the rotation amount in three directions in three-dimensional coordinate;The vector that translation vector is 3 × 1, respectively indicates three
Tie up the translational movement in three directions in coordinate.
It, can basis after the internal reference and distortion factor for obtaining camera, and three-dimensional first coordinate and two-dimensional pixel coordinate
The internal reference and distortion factor of camera, and three-dimensional first coordinate and two-dimensional pixel coordinate, determine the outer ginseng of camera, wherein camera
Outer ginseng be the camera coordinates system that constructs in advance relative to the outer ginseng under laser coordinates system.For example, can be according in camera
Ginseng and distortion factor and two-dimensional pixel coordinate, calculate go distortion after two-dimensional pixel coordinate, then according to the internal reference of camera, go
Two-dimensional pixel coordinate and three-dimensional first coordinate after distortion are obtained by solution PnP (Perspective n Point has an X-rayed N point)
To the outer ginseng of camera.
S104 determines the optical plane of line laser formation in camera coordinates system according to the outer ginseng of camera and three-dimensional first coordinate
Under optic plane equations.
Specifically, three-dimensional first coordinate is the coordinate under laser coordinates system, and three-dimensional first coordinate is located at optical plane
In.And optic plane equations are the optic plane equations under camera coordinates system, therefore, it is necessary to be camera seat by three-dimensional first coordinate transformation
Coordinate under mark system, since the outer ginseng of camera is camera coordinates system relative to the spin matrix R of laser coordinates system and is translated towards
Measure t.So, the coordinate according to available three-dimensional first coordinate of the outer ginseng of camera under camera coordinates system.And then according to camera
Coordinate under coordinate system calculates the optic plane equations under camera coordinates system.
The scaling method of the measuring system of the embodiment of the present invention, according to the positional relationship of scheduled laser and calibrating block,
Obtain at least three not conllinear vertex the first coordinate of three-dimensional in laser coordinates system respectively on calibrating block section.It obtains
The line laser that laser generates irradiates the profile diagram in lower calibrating block section, determines at least three not conllinear vertex where profile diagram
Two-dimensional pixel coordinate in image coordinate system.It is sat according to the internal reference and distortion factor of the camera obtained in advance, and three-dimensional first
Mark and two-dimensional pixel coordinate, determine the outer ginseng of camera.According to the outer ginseng of camera and three-dimensional first coordinate, determine what line laser was formed
Optic plane equations of the optical plane under camera coordinates system.In the embodiment of the present invention, a figure on calibrating block section need to be only acquired
The calibration of measuring system can be completed in piece, and therefore, the scaling method of the measuring system of the embodiment of the present invention is simple, quick.In addition,
When relative position between camera and laser changes, it can easily be re-scaled, be more suitable for scene
Calibration.
Referring to fig. 2, Fig. 2 is another flow chart of the scaling method of the measuring system of the embodiment of the present invention, including following
Step:
S201, according to the positional relationship of scheduled laser and calibrating block, obtain on calibrating block section at least three not
Conllinear vertex the first coordinate of three-dimensional in the laser coordinates system constructed in advance respectively.
S202 obtains the profile diagram in the calibrating block section in the case where line laser that laser generates irradiates, and does not determine at least three not
Conllinear vertex is in the two-dimensional pixel coordinate where profile diagram in image coordinate system.
Due to S201, S202 respectively in Fig. 1 embodiment S101 and S102 it is identical, S101 and S102 in Fig. 1
All embodiments are suitable for Fig. 2, and can reach the same or similar beneficial effect, and details are not described herein.
S203, according to the internal reference of the camera obtained in advance and distortion factor and two-dimensional pixel coordinate, after obtaining distortion
Two-dimensional pixel coordinate.
In the embodiment of the present invention, since camera has certain distortion factor, the mark obtained in image coordinate system
Determine the two-dimensional pixel coordinate that the two-dimensional pixel coordinate in the profile diagram in block section is distortion, then, precision is higher in order to obtain
The calibration result of measuring system distort to two-dimensional pixel coordinate, the two-dimensional pixel coordinate after obtaining distortion.This
In a kind of implementation of inventive embodiments, the calculation method for carrying out distortion to two-dimensional pixel coordinate is as follows:
If k1、k2And k3Indicate the coefficient of radial distortion of camera, p1And p2Indicate the tangential distortion coefficient of camera, fxWith
fyRespectively indicate the focal length in the direction camera x and the direction y, (u0, v0) indicate picture centre coordinate, the two dimension in the embodiment of the present invention
Pixel coordinate, that is, the two-dimensional pixel coordinate to distort are (u ', v ').
Initialize following variable:
X'=(u'-u0)/fx;
Y '=(v'-v0)/fy;
X=x ';
Y=y ';
Iter=0;Wherein, x ', y ', x and y are intermediate variable, and iter is cycle-index.
As iter < N, following circulation is executed:
r2=x2+y2
X=[x ' -2p1xy-p2(r2+2x2)]/(1+k1r2+k2r4+k3r6);
Y=[y ' -2p2xy-p1(r2+2y2)]/(1+k1r2+k2r4+k3r6);
Iter=iter+1;
N is the number that circulation executes, and according to test it is found that when the value of N is 5, obtained calibration result precision is higher, this
Inventive embodiments do not limit the value of N.According to above-mentioned circulation, the value of available x and y, according to formula: u=fxx+u0And v
=fyy+v0, the two-dimensional pixel coordinate after obtaining distortion is (u, v).
Since the distortion factor of different cameras is different, optionally, can also according to the two-dimensional pixel coordinate that S102 is obtained,
The internal reference of camera and three-dimensional first coordinate, calculate the outer ginseng of camera, that is to say, that distort to two-dimensional pixel coordinate.
S204 according to the internal reference of camera, three-dimensional first coordinate and goes the two-dimensional pixel coordinate after distortion to obtain by solving PnP
To the outer ginseng of camera.
It should be noted that if provide N number of three-dimensional point in reference frame, and N number of three-dimensional point is provided and is being schemed
As corresponding two-dimensional points in coordinate system, image coordinate system is the coordinate system where the image of the N number of three-dimensional point obtained by camera.
PnP be according to N number of three-dimensional point two-dimensional points corresponding with the N number of three-dimensional point, camera is demarcated.
If corresponding two-dimensional points and three-dimensional point are to respectively x=[u v]TAnd XL=[xL yL zL]T, solve PnP the step of such as
Under:
The first step chooses a new coordinate system, i.e. A coordinate system.
Choose the corresponding three-dimensional point X of subpoint of lie farthest awayL0And XL1, with XL0And XL1Midpoint be origin OA,A coordinate system is established for Z axis, while acquiring the point X under laser coordinates systemLExpression under A coordinate system
Second step calculatesExpression under camera coordinates system.
N three-dimensional point is divided into (n-2) at a 3 points to { XL0XL1XLi| i ≠ 0, i ≠ 1 }, then PnP problem is converted into (n-2)
A P3P problem, and solve P3P.
Wherein, the method for P3P is solved specifically:
Since the coordinate of the three-dimensional point in optical plane it is known that then obtain X finallyL0And XL1Distance D0, XL0And XLiDistance
D1,i, XL1And XLiDistance D2,i.Simultaneously because coordinate (the u of two-dimensional pointsj, vj) it is known that by the coordinate transformation of two-dimensional points at homogeneous
Coordinate.
The as direction vector of sight.Thus sight is calculatedWithAngle γ0,WithAngle
γ1,i,WithAngle γ2,i.Wherein, fx、fy、u0And v0Indicate the internal reference of camera, fxAnd fyRespectively indicate the direction camera x
With the focal length in the direction y, u0And v0Indicate picture centre.
By the property of projective transformation it is found that there is always triangle Δ X 'L0X′L1X′LiWith triangle Δ XL0XL1XLiIt is similar, and
X′L0Depth be 1, referring to Fig. 3, Fig. 3 is projective transformation schematic diagram in the related technology.Assuming that X 'L1Depth be cos γ0+
t1, only require to obtain t1The Z axis of A coordinate system can be acquiredExpression under camera coordinates system.
Following variable is obtained by calculation:
A1, i=A0, isin2γ0-sin2γ1, i,
A2, i=cos γ1, icosγ2, i-cosγ0,
A3, i=cos γ0cosγ2, i-cosγ1, i,
A4, i=cos γ2, i,
A6, i=sin2γ0-cos2γ1, i+cosγ0cosγ1, icosγ2, i+A5, isin2γ0。
And then it obtains about t1Quartic polynomial:
Wherein,
B3, i=2 (A2, iA5, i-A0, iA3, iA4, i),
B1, i=2 (A2, iA6, i-A1, iA3, iA4, i),
Then t can be obtained by polynomial rooting1。
According to the method for above-mentioned solution P3P, 3 points a for (n-2) to available (n-2) a quartic polynomial, can structure
Build cost function:
Then t1=argminF (t1)。
To F (t1) derivation obtains seven order polynomials:
Wherein,
The root for seeking seven order polynomials obtains the extreme point no more than seven real numbers, if the F " (t at extreme point1) > 0, then for
Minimum.
Third step calculates XLExpression X under camera coordinates systemC。
Projective transformation between camera coordinates system and reference frame (being laser coordinates system in the embodiment of the present invention) can
It indicates are as follows:
Wherein, [r2 r5 r8]TFor expression of the Z axis under camera coordinates system of A coordinate system, i.e., acquired in previous stepExpression under camera coordinates system,For homogeneous image coordinate.System of linear equations can be constructed: Ax=b,
Wherein,
It can be decomposed to obtain least square solution by SVD.
Since least square solution is there is no the orthogonality of spin matrix is constrained, the rotation being calculated cannot be used
Turn and the rotation peace for deriving camera coordinates system relative to laser coordinates system is gone in translation (camera coordinates system is relative to A coordinate system)
It moves.If
It can be calculated:
4th step calculates camera coordinates system relative to the rotation R of laser coordinates system and translation t.
X is calculated firstLAnd XCCovariance matrix S.
It carries out SVD to covariance matrix again to decompose to obtain: S=UDVT。
Det if (U) det (V) > 0, R=UVT;
Otherwise,
T=μC-RμL。
5th step determines the outer ginseng R and t of camera.
Multiple minimums are generally yielded in second step, and the number of minimum is not more than 4, and each minimum can be counted
Calculation obtains one group of R and t, it is therefore desirable to screen to calculated result.
According to formula:Residual error is calculated, residual error the smallest one group of R and t is can use and makees
For final result, to obtain the outer ginseng of camera.
S205 obtains three of three-dimensional first coordinate under camera coordinates system according to the outer ginseng of camera and three-dimensional first coordinate
Tie up the second coordinate.
Specifically, three-dimensional first coordinate is the coordinate under laser coordinates system, and three-dimensional first coordinate is located at optical plane
In.And optic plane equations are the optic plane equations under camera coordinates system, therefore, it is necessary to by the three-dimensional first under laser coordinates system
Coordinate transformation is the second coordinate of three-dimensional under camera coordinates system.So, according to the outer ginseng of camera and three-dimensional first coordinate, three are obtained
Tie up three-dimensional second coordinate of first coordinate under camera coordinates system.
For example, can be according to formula: XC,i=RXW,i+ t determines the first coordinate X of three-dimensionalW,iThree-dimensional under camera coordinates system
Second coordinate XC,i。
Wherein, i=1,2 ... n, n >=3, the outer ginseng of camera include: R and t, and R indicates camera coordinates system relative to laser
The spin matrix of coordinate system, t indicate translation vector of the camera coordinates system relative to laser coordinates system.
In the embodiment of the present invention, due to the first coordinate X of three-dimensionalW,iWith the second coordinate X of three-dimensionalC,iMeet formula: XC,i=RXW,i
+ t, therefore, the optic plane equations under camera coordinates system, need the outer ginseng (R and t) according to camera, three-dimensional first in order to obtain
Coordinate XW,iAnd formula: XC,i=RXW,i+ t obtains the first coordinate X of three-dimensionalW,iThe second coordinate of three-dimensional X under camera coordinates systemC,i。
S206 obtains three-dimensional second and sits according to the positional relationship of optical plane and calibrating block section, and three-dimensional second coordinate
Mark the three-dimensional third coordinate being mapped in optical plane.
In the embodiment of the present invention, three-dimensional second coordinate is the seat positioned at least three not conllinear vertex on calibrating block section
Mark, calibrating block section and optical plane have certain positional relationship, in order to obtain optic plane equations, need three-dimensional second coordinate
It is mapped in optical plane, obtains three-dimensional third coordinate.Certainly, calibrating block section cannot be vertical with optical plane, otherwise, three-dimensional third
Coordinate will be conllinear in optical plane, is unable to get optic plane equations.
S207 obtains optic plane equations by linear regression method according to three-dimensional third coordinate.
Assuming that optic plane equations are as follows: BX+CY+Z+D=0, since three-dimensional third coordinate is located in optical plane, three-dimensional
Third coordinate meets the optic plane equations, and obtain at least three three-dimensional third coordinates are substituted into the optic plane equations, pass through line
The property Return Law obtains optic plane equations.Optionally, by asking the least square solution of following equation group to obtain coefficient B, C and D
Obtain optic plane equations.
Ey=a.
Wherein,Coordinate (xCn, yCn, ZCn) indicate
Three-dimensional second coordinate.
The scaling method of the measuring system of the embodiment of the present invention, according to the positional relationship of scheduled laser and calibrating block,
Obtain at least three not conllinear vertex the first coordinate of three-dimensional in laser coordinates system respectively on calibrating block section.It obtains
The line laser that laser generates irradiates the profile diagram in lower calibrating block section, determines at least three not conllinear vertex where profile diagram
Two-dimensional pixel coordinate in image coordinate system.It is sat according to the internal reference and distortion factor of the camera obtained in advance, and three-dimensional first
Mark and two-dimensional pixel coordinate, determine the outer ginseng of camera.According to the outer ginseng of camera and three-dimensional first coordinate, determine what line laser was formed
Optic plane equations of the optical plane under camera coordinates system.In the embodiment of the present invention, a figure on calibrating block section need to be only acquired
The calibration of measuring system can be completed in piece, and therefore, the scaling method of the measuring system of the embodiment of the present invention is simple, quick.In addition,
When relative position between camera and laser changes, it can easily be re-scaled, be more suitable for scene
Calibration.
Referring to fig. 4, Fig. 4 is another flow chart of the scaling method of the measuring system of the embodiment of the present invention, including following
Step:
S401, according to the positional relationship of scheduled laser and calibrating block, obtain on calibrating block section at least three not
Conllinear vertex the first coordinate of three-dimensional in the laser coordinates system constructed in advance respectively.
In the embodiment of the present invention, since calibrating block is with known structure information and the very high object of machining accuracy.So,
When optical plane is parallel with calibrating block section, the acquisition methods of three-dimensional first coordinate will be simplified, that is to say, that can basis
The size of the positional relationship and calibrating block of laser and calibrating block obtains at least three not conllinear vertex and sits respectively in laser
The first coordinate of three-dimensional in mark system.Specifically, when placing calibrating block, by the line laser shape in calibrating block section and laser generation
At optical plane it is parallel as much as possible.Since at least three not conllinear vertex can determine a plane, it is flat calculating light
When the equation of face, as long as determining three-dimensional coordinate of at least three not conllinear vertex under camera coordinates system on calibrating block section
Determine optic plane equations.
Optionally, for the ease of measurement, an axis of reference frame is parallel to laser, an axis is parallel to line laser,
One axis obtains laser coordinates system perpendicular to optical plane and calibrating block section.So, it is closed according to the position of laser and calibrating block
The size of system and calibrating block obtains three-dimensional first coordinate tool of at least three not conllinear vertex respectively in laser coordinates system
Body are as follows: when optical plane is parallel with calibrating block section and laser coordinates system in reference axis perpendicular to calibrating block section when, if
The vertical range of calibrating block section and laser coordinates system origin is S, then each vertex at least three not conllinear vertex
Be S with the coordinate of calibrating block section vertical direction in three-dimensional first coordinate, in first coordinate of three-dimensional on each vertex with mark
Determining the parallel coordinate in block section is each vertex corresponding size in calibrating block section.It is that the present invention is real referring to Fig. 5, Fig. 5
Apply the camera coordinates system of example and side view and front view with laser coordinates system.Y in laser coordinates system in Fig. 5wThe seat of axis
Mark indicates the height of calibrating block profile or the distance (position depending on laser coordinates system origin of calibrating block distance lasers
It sets, indicates calibrating block height if origin is in the plane that calibrating block is put, if origin indicates to mark on laser transmitting terminal
Block is determined at a distance from laser), X in laser coordinates systemwThe width of the coordinate representation calibrating block profile of axis, laser coordinates system
Middle ZwThe position in the coordinate representation calibrating block section of axis optionally can set Z for calibrating block sectionwAxis starting point, that is, calibrating block
The Z of arbitrary point on sectionwThe coordinate of axis is 0.Therefore, it in the laser coordinates system constructed, can determine in calibrating block
Three-dimensional first coordinate of at least three not conllinear vertex in laser coordinates system.
For example, Fig. 6 is the structure chart of the calibrating block under the online laser irradiation of the embodiment of the present invention, certainly, calibration
The structure of block can there are many kinds of, the calibrating block in Fig. 6 is only one such.By the X of laser coordinates systemwAxis and YwAxis
Place plane is arranged on calibrating block section, as shown in fig. 7, Fig. 7 is the calibrating block of the embodiment of the present invention in laser coordinates system
In coordinate schematic diagram, wherein ZwAxis is perpendicular to XwAxis and YwPlane where axis, is not shown in Figure 7.On calibrating block section
The Z at any pointwThe coordinate of axis is identical, ZwThe coordinate of axis is depending on the position of the laser coordinates system of foundation.If swashed
The coordinate origin of light device coordinate system is in XwAxis and YwPlane where axis, then, the Z of the arbitrary point on calibrating block sectionwThe coordinate of axis
It is 0, XwAxis and YwThe coordinate of axis is the size of calibrating block.It is therefore convenient to which the size according to calibrating block obtains at least three
Three-dimensional first coordinate of the not conllinear vertex in laser coordinates system.
S402 obtains the profile diagram in the calibrating block section in the case where line laser that laser generates irradiates, and does not determine at least three not
Conllinear vertex is in the two-dimensional pixel coordinate where profile diagram in image coordinate system.
Specifically, can obtain line after the line laser for generating laser is irradiated in calibrating block by camera and swash
The profile diagram in the calibrating block section under light irradiation, as shown in figure 8, Fig. 8 is the mark under the online laser irradiation of the embodiment of the present invention
Determine block schematic cross-section, above-mentioned at least three not conllinear vertex can be the vertex of bright wisp in profile diagram.
S403, according to the internal reference of the camera obtained in advance and distortion factor and two-dimensional pixel coordinate, after obtaining distortion
Two-dimensional pixel coordinate.
S404 according to the internal reference of camera, three-dimensional first coordinate and goes the two-dimensional pixel coordinate after distortion to obtain by solving PnP
To the outer ginseng of camera.
S405 obtains three of three-dimensional first coordinate under camera coordinates system according to the outer ginseng of camera and three-dimensional first coordinate
Tie up the second coordinate.
Due to S401, S402, S403, S404, S405 respectively in Fig. 2 embodiment S201, S202, S203, S204,
S205 is identical, and therefore, all embodiments of S201, S202, S203, S204, S205 are suitable for Fig. 4 in Fig. 2, and can reach
The same or similar beneficial effect, details are not described herein.
S406 obtains optic plane equations by linear regression method according to three-dimensional second coordinate.
In the embodiment of the present invention, since the first coordinate of three-dimensional is located in optical plane, convert by three-dimensional first coordinate to phase
After the second coordinate of three-dimensional under machine coordinate system, do not need to convert three-dimensional second coordinate, it can be directly according to three-dimensional the
Two coordinates obtain optic plane equations by linear regression method.
The scaling method of the measuring system of the embodiment of the present invention, according to the positional relationship of scheduled laser and calibrating block,
Obtain at least three not conllinear vertex the first coordinate of three-dimensional in laser coordinates system respectively on calibrating block section.It obtains
The line laser that laser generates irradiates the profile diagram in lower calibrating block section, determines at least three not conllinear vertex where profile diagram
Two-dimensional pixel coordinate in image coordinate system.It is sat according to the internal reference and distortion factor of the camera obtained in advance, and three-dimensional first
Mark and two-dimensional pixel coordinate, determine the outer ginseng of camera.According to the outer ginseng of camera and three-dimensional first coordinate, determine optical plane in camera
Optic plane equations under coordinate system.In the embodiment of the present invention, under conditions of optical plane is parallel with calibrating block section, only need to acquire
The calibration of measuring system, therefore, the embodiment of the present invention can be completed in a picture comprising three in calibrating block not conllinear vertex
Measuring system scaling method it is simple, quick.In addition, when the relative position between camera and laser changes, it can
Easily to be re-scaled, it is more suitable for field calibration.
Corresponding to above method embodiment, the embodiment of the invention also discloses a kind of caliberating device of measuring system, referring to
Fig. 9, Fig. 9 are the structure chart of the caliberating device of the measuring system of the embodiment of the present invention, comprising:
Three-dimensional first coordinate determining module 901 obtains mark for the positional relationship according to scheduled laser and calibrating block
Determine three-dimensional first coordinate of at least three on the block section not conllinear vertex respectively in the laser coordinates system constructed in advance.
Profile diagram obtains module 902, for obtaining the profile in the calibrating block section under the line laser irradiation that laser generates
Figure.
Two-dimensional pixel coordinate determining module 903 determines at least three not conllinear vertex image coordinate systems where profile diagram
In two-dimensional pixel coordinate.
Outer ginseng determining module 904 is sat for the internal reference and distortion factor according to the camera obtained in advance, and three-dimensional first
Mark and two-dimensional pixel coordinate, determine the outer ginseng of camera.
Optic plane equations determining module 905 determines that line laser is formed for the first coordinate of outer ginseng and three-dimensional according to camera
Optic plane equations of the optical plane under camera coordinates system.
The caliberating device of the measuring system of the embodiment of the present invention, according to the positional relationship of scheduled laser and calibrating block,
Obtain at least three not conllinear vertex the first coordinate of three-dimensional in laser coordinates system respectively on calibrating block section.It obtains
The line laser that laser generates irradiates the profile diagram in lower calibrating block section, determines at least three not conllinear vertex where profile diagram
Two-dimensional pixel coordinate in image coordinate system.It is sat according to the internal reference and distortion factor of the camera obtained in advance, and three-dimensional first
Mark and two-dimensional pixel coordinate, determine the outer ginseng of camera.According to the outer ginseng of camera and three-dimensional first coordinate, determine what line laser was formed
Optic plane equations of the optical plane under camera coordinates system.In the embodiment of the present invention, a figure on calibrating block section need to be only acquired
The calibration of measuring system can be completed in piece, and therefore, the scaling method of the measuring system of the embodiment of the present invention is simple, quick.In addition,
When relative position between camera and laser changes, it can easily be re-scaled, be more suitable for scene
Calibration.
It should be noted that the device of the embodiment of the present invention is using the device of the scaling method of above-mentioned measuring system, then
All embodiments of the scaling method of above-mentioned measuring system are suitable for the device, and can reach the same or similar beneficial to effect
Fruit.
Optionally, in the caliberating device of the measuring system of the embodiment of the present invention, outer ginseng determining module 904 is specifically used for, root
Two-dimensional pixel coordinate according to the internal reference and distortion factor and two-dimensional pixel coordinate of camera, after obtaining distortion;According to camera
Internal reference, three-dimensional first coordinate and the two-dimensional pixel coordinate after distortion is gone to obtain the outer ginseng of camera by solving PnP.
Optionally, in the caliberating device of the measuring system of the embodiment of the present invention, optic plane equations determining module 905 is specifically used
In obtaining three-dimensional second coordinate of three-dimensional first coordinate under camera coordinates system according to the outer ginseng of camera and three-dimensional first coordinate;
According to the positional relationship of optical plane and calibrating block section, and three-dimensional second coordinate, obtaining three-dimensional second coordinate, to be mapped in light flat
Three-dimensional third coordinate in face;According to three-dimensional third coordinate, optic plane equations are obtained by linear regression method.
Optionally, in the caliberating device of the measuring system of the embodiment of the present invention, optical plane is parallel with calibrating block section;
Optic plane equations determining module 905 is specifically used for, and according to the outer ginseng of camera and three-dimensional first coordinate, obtains three-dimensional the
Three-dimensional second coordinate of one coordinate under camera coordinates system;According to three-dimensional second coordinate, optical plane is obtained by linear regression method
Equation.
Optionally, in the caliberating device of the measuring system of the embodiment of the present invention, optic plane equations determining module 905 is specifically used
According to formula: XC,i=RXW,i+ t determines the first coordinate X of three-dimensionalW,iThe second coordinate of three-dimensional X under camera coordinates systemC,i;
Wherein, i=1,2 ... n, n >=3, the outer ginseng of camera include: R and t, and R indicates camera coordinates system relative to laser
The spin matrix of coordinate system, t indicate translation vector of the camera coordinates system relative to laser coordinates system.
Optionally, in the caliberating device of the measuring system of the embodiment of the present invention, the first coordinate determining module of three-dimensional 901 is specific
For obtaining at least three not conllinear vertex difference according to the size of the positional relationship and calibrating block of laser and calibrating block
The first coordinate of three-dimensional in laser coordinates system.
Optionally, in the caliberating device of the measuring system of the embodiment of the present invention, the first coordinate determining module of three-dimensional 901 is specific
For, when optical plane is parallel with calibrating block section and laser coordinates system in reference axis perpendicular to calibrating block section when, if
The vertical range of calibrating block section and laser coordinates system origin is S, then each vertex at least three not conllinear vertex
Be S with the coordinate of calibrating block section vertical direction in three-dimensional first coordinate, in first coordinate of three-dimensional on each vertex with mark
Determining the parallel coordinate in block section is each vertex corresponding size in calibrating block section.
The embodiment of the invention also provides a kind of electronic equipment, comprising: processor and machine readable storage medium, machine can
It reads storage medium and is stored with the machine-executable instruction that can be executed by processor, when processor executes machine-executable instruction,
Realize the scaling method step of above-mentioned measuring system, the scaling method of above-mentioned measuring system can be Fig. 1 embodiment, Fig. 2 is implemented
The scaling method of measuring system in example and Fig. 4 embodiment.
It should be noted that above-mentioned machine readable storage medium may include: RAM (Random Access Memory, with
Machine accesses memory), it also may include nonvolatile memory (non-volatile memory), for example, at least a disk
Memory.Optionally, machine readable storage medium can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor can be general processor, comprising: CPU (Central Processing Unit, central processing
Device), NP (Network Processor, network processing unit) etc.;Can also be DSP (Digital SignalProcessing,
Digital signal processor), ASIC (Application Specific Integrated Circuit, specific integrated circuit),
FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device are divided
Vertical door or transistor logic, discrete hardware components.
The embodiment of the invention also provides a kind of computer readable storage medium, it is stored in computer readable storage medium
Computer program when computer program is executed by processor, realizes the scaling method step of above-mentioned measuring system, above-mentioned measurement system
The scaling method of system can be the scaling method of Fig. 1 embodiment, Fig. 2 embodiment and the measuring system in Fig. 4 embodiment.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.It is especially for measurement
For the caliberating device of system, electronic equipment and readable storage medium storing program for executing embodiment, since it is substantially similar to the method embodiment, so
It is described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (16)
1. a kind of scaling method of measuring system, which is characterized in that the measuring system includes laser and camera, the method
Include:
According to the positional relationship of scheduled laser and calibrating block, at least three obtained on the calibrating block section are not pushed up collinearly
Put the first coordinate of three-dimensional in the laser coordinates system constructed in advance respectively;
The profile diagram for obtaining the calibrating block section under the line laser irradiation that the laser generates, determines described at least three
Not conllinear vertex is in the two-dimensional pixel coordinate where the profile diagram in image coordinate system;
According to the internal reference of the camera obtained in advance and distortion factor and three-dimensional first coordinate and the two-dimensional pixel
Coordinate determines the outer ginseng of the camera;
According to the outer ginseng of the camera and three-dimensional first coordinate, determine the optical plane of the line laser formation in the camera
Optic plane equations under coordinate system.
2. the scaling method of measuring system according to claim 1, which is characterized in that the basis obtains described in advance
The internal reference and distortion factor of camera and three-dimensional first coordinate and the two-dimensional pixel coordinate determine the outer of the camera
The step of ginseng, comprising:
Two-dimensional pixel according to the internal reference of the camera and distortion factor and the two-dimensional pixel coordinate, after obtaining distortion
Coordinate;
It is saturating by solving according to the internal reference of the camera, three-dimensional first coordinate and the two-dimensional pixel coordinate gone after distortion
Depending on N point PnP, the outer ginseng of the camera is obtained.
3. the scaling method of measuring system according to claim 1, which is characterized in that the outer ginseng according to the camera
With three-dimensional first coordinate, optic plane equations of the optical plane of the line laser formation under the camera coordinates system are determined
Step, comprising:
According to the outer ginseng of the camera and three-dimensional first coordinate, three-dimensional first coordinate is obtained in the camera coordinates system
Under the second coordinate of three-dimensional;
According to the positional relationship and three-dimensional second coordinate in the optical plane and the calibrating block section, described three are obtained
Tie up the three-dimensional third coordinate that the second coordinate is mapped in the optical plane;
According to the three-dimensional third coordinate, the optic plane equations are obtained by linear regression method.
4. the scaling method of measuring system according to claim 1, which is characterized in that the optical plane and the calibrating block
Section is parallel;
The outer ginseng according to the camera and three-dimensional first coordinate determine the optical plane of the line laser formation described
The step of optic plane equations under camera coordinates system, comprising:
According to the outer ginseng of the camera and three-dimensional first coordinate, three-dimensional first coordinate is obtained in the camera coordinates system
Under the second coordinate of three-dimensional;
According to three-dimensional second coordinate, the optic plane equations are obtained by linear regression method.
5. the scaling method of measuring system according to claim 3 or 4, which is characterized in that described according to the camera
Outer ginseng and three-dimensional first coordinate, obtain three-dimensional second coordinate of three-dimensional first coordinate under the camera coordinates system
Step, comprising:
According to formula: XC,i=RXW,i+ t determines the three-dimensional first coordinate XW,iThree-dimensional second under the camera coordinates system
Coordinate XC,i;
Wherein, i=1,2 ... n, n >=3, the outer ginseng of the camera include: R and t, and R indicates the camera coordinates system relative to institute
The spin matrix of laser coordinates system is stated, t indicates translation vector of the camera coordinates system relative to the laser coordinates system.
6. the scaling method of measuring system according to claim 1, which is characterized in that it is described according to scheduled laser and
The positional relationship of calibrating block obtains at least three not conllinear vertex on the calibrating block section respectively in the laser constructed in advance
The step of three-dimensional first coordinate in device coordinate system, comprising:
According to the size of the positional relationship and the calibrating block of the laser and the calibrating block, described at least three are obtained
Not conllinear vertex the first coordinate of three-dimensional in the laser coordinates system respectively.
7. the scaling method of measuring system according to claim 6, which is characterized in that described according to the laser and institute
The positional relationship of calibrating block and the size of the calibrating block are stated, described at least three not conllinear vertex is obtained and swashs respectively described
The first coordinate of three-dimensional in light device coordinate system specifically: when the optical plane laser parallel and described with the calibrating block section
When reference axis in device coordinate system is perpendicular to the calibrating block section, if the calibrating block section and the laser coordinates system
The vertical range of origin be S, then in described at least three not conllinear vertex in three-dimensional first coordinate on each vertex with
The coordinate of calibrating block section vertical direction is S, in three-dimensional first coordinate on each vertex with the mark
Determining the parallel coordinate in block section is each described vertex corresponding size in the calibrating block section.
8. a kind of caliberating device of measuring system, which is characterized in that the measuring system includes laser and camera, described device
Include:
Three-dimensional first coordinate determining module obtains the calibration for the positional relationship according to scheduled laser and calibrating block
At least three not conllinear vertex on block section the first coordinate of three-dimensional in the laser coordinates system constructed in advance respectively;
Profile diagram obtains module, for obtaining the profile in the calibrating block section under the line laser irradiation that the laser generates
Figure;
Two-dimensional pixel coordinate determining module, for determining that described at least three not conllinear vertex are sat in image where the profile diagram
Two-dimensional pixel coordinate in mark system;
Outer ginseng determining module, for the internal reference and distortion factor and described three-dimensional first according to the camera obtained in advance
Coordinate and the two-dimensional pixel coordinate, determine the outer ginseng of the camera;
Optic plane equations determining module, for according to the camera outer ginseng and three-dimensional first coordinate, determine the line swash
Optic plane equations of the optical plane that light is formed under the camera coordinates system.
9. the caliberating device of measuring system according to claim 8, which is characterized in that the outer ginseng determining module is specifically used
According to the internal reference of the camera and distortion factor and the two-dimensional pixel coordinate, the two-dimensional pixel after obtaining distortion is sat
Mark;According to the internal reference of the camera, three-dimensional first coordinate and it is described go distortion after two-dimensional pixel coordinate, pass through solution perspective
N point PnP, obtains the outer ginseng of the camera.
10. the caliberating device of measuring system according to claim 8, which is characterized in that the optic plane equations determine mould
Block is specifically used for, and according to the outer ginseng of the camera and three-dimensional first coordinate, obtains three-dimensional first coordinate in the phase
The second coordinate of three-dimensional under machine coordinate system;According to the positional relationship and described three of the optical plane and the calibrating block section
The second coordinate is tieed up, the three-dimensional third coordinate that three-dimensional second coordinate is mapped in the optical plane is obtained;According to the three-dimensional
Third coordinate obtains the optic plane equations by linear regression method.
11. the caliberating device of measuring system according to claim 8, which is characterized in that the optical plane and the calibration
Block section is parallel;
The optic plane equations determining module is specifically used for, and according to the outer ginseng of the camera and three-dimensional first coordinate, obtains
Three-dimensional second coordinate of three-dimensional first coordinate under the camera coordinates system;According to three-dimensional second coordinate, pass through line
The property Return Law obtains the optic plane equations.
12. the caliberating device of measuring system described in 0 or 11 according to claim 1, which is characterized in that the optic plane equations are true
Cover half block is specifically used for, according to formula: XC,i=RXW,i+ t determines the three-dimensional first coordinate XW,iUnder the camera coordinates system
The second coordinate of three-dimensional XC,i;
Wherein, i=1,2 ... n, n >=3, the outer ginseng of the camera include: R and t, and R indicates the camera coordinates system relative to institute
The spin matrix of laser coordinates system is stated, t indicates translation vector of the camera coordinates system relative to the laser coordinates system.
13. the caliberating device of measuring system according to claim 8, which is characterized in that three-dimensional first coordinate determines
Module is specifically used for, and according to the size of the positional relationship and the calibrating block of the laser and the calibrating block, obtains institute
State three-dimensional first coordinate of at least three not conllinear vertex respectively in the laser coordinates system.
14. the caliberating device of measuring system according to claim 13, which is characterized in that three-dimensional first coordinate determines
Module is specifically used for, when the reference axis in the optical plane laser coordinates system parallel and described with the calibrating block section is hung down
Directly when the calibrating block section, if the vertical range of the calibrating block section and laser coordinates system origin is S,
In three-dimensional first coordinate on described at least three each vertex in not conllinear vertex with calibrating block section Vertical Square
To coordinate be S, the coordinate parallel with the calibrating block section is in three-dimensional first coordinate on each vertex
Each described vertex corresponding size in the calibrating block section.
15. a kind of electronic equipment characterized by comprising processor and machine readable storage medium, the machine readable storage
Media storage has the machine-executable instruction that can be executed by the processor, and the processor executes the executable finger of the machine
When enabling, method and step as claimed in claim 1 to 7 is realized.
16. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program, the computer program realize method and step as claimed in claim 1 to 7 when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710546626.6A CN109211264B (en) | 2017-07-06 | 2017-07-06 | Calibration method and device of measurement system, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710546626.6A CN109211264B (en) | 2017-07-06 | 2017-07-06 | Calibration method and device of measurement system, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109211264A true CN109211264A (en) | 2019-01-15 |
CN109211264B CN109211264B (en) | 2021-04-30 |
Family
ID=64992303
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710546626.6A Active CN109211264B (en) | 2017-07-06 | 2017-07-06 | Calibration method and device of measurement system, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109211264B (en) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109737230A (en) * | 2019-02-25 | 2019-05-10 | 河海大学常州校区 | A kind of intelligent hydraulic control system and method for non-cpntact measurement |
CN110135277A (en) * | 2019-07-05 | 2019-08-16 | 南京邮电大学 | A kind of Human bodys' response method based on convolutional neural networks |
CN110378971A (en) * | 2019-07-25 | 2019-10-25 | Oppo广东移动通信有限公司 | A kind of detection method and device of image alignment precision, equipment, storage medium |
CN110473262A (en) * | 2019-08-22 | 2019-11-19 | 北京双髻鲨科技有限公司 | Outer ginseng scaling method, device, storage medium and the electronic equipment of more mesh cameras |
CN111028337A (en) * | 2019-12-04 | 2020-04-17 | 南京大学 | Three-dimensional photoacoustic imaging method for improving problem of limited visual angle |
CN111161358A (en) * | 2019-12-31 | 2020-05-15 | 华中科技大学鄂州工业技术研究院 | Camera calibration method and device for structured light depth measurement |
CN111739104A (en) * | 2020-06-24 | 2020-10-02 | 深圳市道通科技股份有限公司 | Calibration method and device of laser calibration system and laser calibration system |
CN111750896A (en) * | 2019-03-28 | 2020-10-09 | 杭州海康机器人技术有限公司 | Holder calibration method and device, electronic equipment and storage medium |
CN111915681A (en) * | 2019-05-08 | 2020-11-10 | 长沙智能驾驶研究院有限公司 | External parameter calibration method and device for multi-group 3D camera group, storage medium and equipment |
CN112562003A (en) * | 2019-09-10 | 2021-03-26 | 北京京东乾石科技有限公司 | Calibration method and calibration system for external parameters of camera |
CN112857249A (en) * | 2019-11-28 | 2021-05-28 | 株洲中车时代电气股份有限公司 | Calibration method and device for contact net detection equipment |
CN114062265A (en) * | 2021-11-11 | 2022-02-18 | 易思维(杭州)科技有限公司 | Method for evaluating stability of supporting structure of visual system |
WO2022134328A1 (en) * | 2020-12-21 | 2022-06-30 | 福建汇川物联网技术科技股份有限公司 | Construction method and apparatus for building information model |
CN114963025A (en) * | 2022-04-19 | 2022-08-30 | 深圳市城市公共安全技术研究院有限公司 | Leakage point positioning method and device, electronic equipment and readable storage medium |
CN115393442A (en) * | 2022-03-02 | 2022-11-25 | 深圳市深视智能科技有限公司 | Calibration method, device and system of three-dimensional camera |
WO2023020575A1 (en) * | 2021-08-18 | 2023-02-23 | 深圳市创客工场科技有限公司 | Calculation method, laser machining device and computer-readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104677305A (en) * | 2015-02-11 | 2015-06-03 | 浙江理工大学 | Method and system for three-dimensionally reconstructing object surface based on cross-structured light |
CN105118040A (en) * | 2015-09-18 | 2015-12-02 | 中国科学院自动化研究所 | Document image distortion rectifying method based on structured laser beams |
CN106097348A (en) * | 2016-06-13 | 2016-11-09 | 大连理工大学 | A kind of three-dimensional laser point cloud and the fusion method of two dimensional image |
-
2017
- 2017-07-06 CN CN201710546626.6A patent/CN109211264B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104677305A (en) * | 2015-02-11 | 2015-06-03 | 浙江理工大学 | Method and system for three-dimensionally reconstructing object surface based on cross-structured light |
CN105118040A (en) * | 2015-09-18 | 2015-12-02 | 中国科学院自动化研究所 | Document image distortion rectifying method based on structured laser beams |
CN106097348A (en) * | 2016-06-13 | 2016-11-09 | 大连理工大学 | A kind of three-dimensional laser point cloud and the fusion method of two dimensional image |
Non-Patent Citations (4)
Title |
---|
朱耀轩等: "基于单目视觉的火炮身管指向静态测量", 《兵工学报》 * |
李冠楠等: "一字线结构光三维测量模型的新型标定方法", 《光子学报》 * |
李龙等: "结构光视觉引导的轨迹跟踪***的标定技术", 《计算机工程与应用》 * |
陈文亮等: "三维空间中线结构光与相机快速标定方法", 《红外技术》 * |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109737230A (en) * | 2019-02-25 | 2019-05-10 | 河海大学常州校区 | A kind of intelligent hydraulic control system and method for non-cpntact measurement |
CN111750896A (en) * | 2019-03-28 | 2020-10-09 | 杭州海康机器人技术有限公司 | Holder calibration method and device, electronic equipment and storage medium |
CN111915681B (en) * | 2019-05-08 | 2023-12-29 | 长沙智能驾驶研究院有限公司 | External parameter calibration method, device, storage medium and equipment for multi-group 3D camera group |
CN111915681A (en) * | 2019-05-08 | 2020-11-10 | 长沙智能驾驶研究院有限公司 | External parameter calibration method and device for multi-group 3D camera group, storage medium and equipment |
CN110135277B (en) * | 2019-07-05 | 2022-08-16 | 南京邮电大学 | Human behavior recognition method based on convolutional neural network |
CN110135277A (en) * | 2019-07-05 | 2019-08-16 | 南京邮电大学 | A kind of Human bodys' response method based on convolutional neural networks |
CN110378971A (en) * | 2019-07-25 | 2019-10-25 | Oppo广东移动通信有限公司 | A kind of detection method and device of image alignment precision, equipment, storage medium |
CN110473262A (en) * | 2019-08-22 | 2019-11-19 | 北京双髻鲨科技有限公司 | Outer ginseng scaling method, device, storage medium and the electronic equipment of more mesh cameras |
CN112562003A (en) * | 2019-09-10 | 2021-03-26 | 北京京东乾石科技有限公司 | Calibration method and calibration system for external parameters of camera |
CN112857249A (en) * | 2019-11-28 | 2021-05-28 | 株洲中车时代电气股份有限公司 | Calibration method and device for contact net detection equipment |
CN111028337A (en) * | 2019-12-04 | 2020-04-17 | 南京大学 | Three-dimensional photoacoustic imaging method for improving problem of limited visual angle |
CN111161358A (en) * | 2019-12-31 | 2020-05-15 | 华中科技大学鄂州工业技术研究院 | Camera calibration method and device for structured light depth measurement |
CN111161358B (en) * | 2019-12-31 | 2022-10-21 | 华中科技大学鄂州工业技术研究院 | Camera calibration method and device for structured light depth measurement |
CN111739104A (en) * | 2020-06-24 | 2020-10-02 | 深圳市道通科技股份有限公司 | Calibration method and device of laser calibration system and laser calibration system |
CN111739104B (en) * | 2020-06-24 | 2024-05-03 | 深圳市道通科技股份有限公司 | Calibration method and device of laser calibration system and laser calibration system |
WO2022134328A1 (en) * | 2020-12-21 | 2022-06-30 | 福建汇川物联网技术科技股份有限公司 | Construction method and apparatus for building information model |
WO2023020575A1 (en) * | 2021-08-18 | 2023-02-23 | 深圳市创客工场科技有限公司 | Calculation method, laser machining device and computer-readable storage medium |
CN114062265A (en) * | 2021-11-11 | 2022-02-18 | 易思维(杭州)科技有限公司 | Method for evaluating stability of supporting structure of visual system |
CN115393442A (en) * | 2022-03-02 | 2022-11-25 | 深圳市深视智能科技有限公司 | Calibration method, device and system of three-dimensional camera |
CN114963025A (en) * | 2022-04-19 | 2022-08-30 | 深圳市城市公共安全技术研究院有限公司 | Leakage point positioning method and device, electronic equipment and readable storage medium |
CN114963025B (en) * | 2022-04-19 | 2024-03-26 | 深圳市城市公共安全技术研究院有限公司 | Leakage point positioning method and device, electronic equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109211264B (en) | 2021-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109211264A (en) | Scaling method, device, electronic equipment and the readable storage medium storing program for executing of measuring system | |
CN103292710B (en) | A kind of distance measurement method applying binocular vision vision range finding principle | |
CN104616292B (en) | Monocular vision measuring method based on global homography matrix | |
CN101998136A (en) | Homography matrix acquisition method as well as image pickup equipment calibrating method and device | |
Belden | Calibration of multi-camera systems with refractive interfaces | |
CN107481288A (en) | The inside and outside ginseng of binocular camera determines method and apparatus | |
CN109697736A (en) | Scaling method, device, electronic equipment and the readable storage medium storing program for executing of measuring system | |
CN109272555B (en) | External parameter obtaining and calibrating method for RGB-D camera | |
WO2015129642A1 (en) | Flow velocimetry method for visualized fluid, and flow velocimetry system | |
CN110398208A (en) | Big data deformation monitoring method based on photographic measuring apparatus system | |
CN103679693A (en) | Multi-camera single-view calibration device and calibration method thereof | |
CN116030202B (en) | Three-dimensional image reconstruction method and device, electronic equipment and storage medium | |
CN112102401B (en) | Target positioning method, device, system, equipment and storage medium | |
CN104794718A (en) | Single-image CT (computed tomography) machine room camera calibration method | |
CN110232707A (en) | A kind of distance measuring method and device | |
CN108801218A (en) | Large scale dynamic photogrammtry system it is high-precision fixed to and orientation accuracy evaluation method | |
Diebold et al. | Light-field camera design for high-accuracy depth estimation | |
Wang et al. | An improved two-point calibration method for stereo vision with rotating cameras in large FOV | |
Vargas et al. | Flexible calibration procedure for fringe projection profilometry | |
CN105783881B (en) | The method and apparatus of aerial triangulation | |
Yao et al. | Geometric calibration of line-scan camera using a planar pattern | |
Li et al. | Spatial light path analysis and calibration of four-mirror-based monocular stereo vision | |
CN112819900B (en) | Method for calibrating internal azimuth, relative orientation and distortion coefficient of intelligent stereography | |
CN113034615B (en) | Equipment calibration method and related device for multi-source data fusion | |
Ulrich et al. | A camera model for cameras with hypercentric lenses and some example applications |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 310051 room 304, B / F, building 2, 399 Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province Patentee after: Hangzhou Hikvision Robot Co.,Ltd. Address before: No.555, Qianmo Road, Binjiang District, Hangzhou City, Zhejiang Province Patentee before: HANGZHOU HIKROBOT TECHNOLOGY Co.,Ltd. |
|
CP03 | Change of name, title or address |