Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention is clearer,, the embodiment of the invention is explained further details below in conjunction with embodiment and accompanying drawing.At this, illustrative examples of the present invention and explanation thereof are used to explain the present invention, but not as to qualification of the present invention.
The process flow diagram of the method for the three-dimensional coordinate of a kind of Measuring Object that Fig. 1 provides for the embodiment of the invention, please with reference to Fig. 1, this method comprises:
101: the image that obtains the target that is fixed in testee through camera;
In the present embodiment, please with reference to Fig. 2 A, camera is the same with camera of the prior art, mainly comprises: imageing sensor 21, lens 22, housing 23 and winding displacement 24, the structure of combining is shown in Fig. 2 B.
In the present embodiment, the shape of target can be sphere, and target be connected with testee fixing so that directly confirm the coordinate of this testee according to the coordinate of target.
Fig. 3 is the camera of present embodiment and the position and the coordinate synoptic diagram of target, and please with reference to Fig. 3, present embodiment is a true origin with cam lens (camera lens) center, is the Z axle with vertical camera direction.Before the measurement, earlier target is fixed on the testee, target is in the coverage of camera.
102: the pixel at place, center of picture that extracts target according to said image is with respect to the coordinate at the imageing sensor center of said camera and the area of picture on the imageing sensor of said camera of target;
Fig. 4 A be the camera of present embodiment imageing sensor, lens and target three-dimensional position and apart from synoptic diagram; Fig. 4 B is the position view of the target seen from Y shaft angle degree among Fig. 4 A, and Fig. 4 C is the position view of picture on imageing sensor of the target on the imageing sensor among Fig. 4 A.
Shown in Fig. 4 A-Fig. 4 C; In the present embodiment; After camera photographs the image of target, image on its imageing sensor, according to the picture of the target on the imageing sensor; The pixel at center place of picture that can obtain target is with respect to the coordinate Nx and the Ny at the imageing sensor center of said camera, and the area S of the picture of target on the imageing sensor of said camera.
103:, obtain the actual range coordinate of the picture of said target according to the pixel at the place, center of the picture of said target interval with respect to the pixel on the imageing sensor of the coordinate at the imageing sensor center of said camera and said camera;
Please continue C, in the present embodiment, suppose that camera resolution is N with reference to Fig. 4
W* N
H, the developed width of imageing sensor and highly be respectively W, H in the camera, then being spaced apart of pixel on the imageing sensor
The pixel at the place, center of the picture of the target that integrating step 102 obtains is with respect to the coordinate Nx and the Ny at the imageing sensor center of said camera, and the actual range coordinate of the picture of target is x=Nx*dx, y=Ny*dy.
104: the distance that obtains target and camera according to the area of picture on the imageing sensor of said camera of said target;
By mathematics and the imaging knowledge can know, same target and camera apart from Z not simultaneously, the area S of the picture of target on imageing sensor also the difference, this relation is approximately
Wherein k is a proportionality constant, and k can be by the camera parameter, for example the camera resolution, N
W* N
H, the developed width W of imageing sensor and the distance B of height H, lens center and imageing sensor etc. and target parameter, for example target diameter R etc. confirms to derive, for example, according to above-mentioned parameter value and formula k=(π R
2D
2N
wN
H)/WH calculates and obtains this proportionality constant k; Also can obtain, for example, obtain one group of Z value and corresponding S value through actual measurement earlier, then according to formula by the actual measurement match
Obtain one group of k, get the proportionality constant k of the mean value of this group k value, above-mentionedly just illustrate as present embodiment, present embodiment not with this as restriction.Therefore; The area S of picture on the imageing sensor of said camera of the target that obtains according to step 102 can obtain the distance
of target and camera
105: the distance according to the imageing sensor of the lens center of the actual range coordinate of the image of the distance of said target and camera and said target and said camera and said camera obtains the coordinate of target with respect to said camera;
The target that calculate to be obtained by step 104 combines the distance B of lens center and imageing sensor can obtain the coordinate X and the Y of target with camera apart from Z; Be respectively
thus; Target is with respect to the three-dimensional coordinate (X of camera; Y Z) just can obtain.
106: obtain the coordinate of testee with respect to the coordinate of said camera with respect to said camera according to target.
In the present embodiment; Because target is fixedly connected on the testee; Therefore target can be approximated to be the coordinate of testee with respect to camera with respect to the coordinate of camera, and thus, present embodiment has obtained the three-dimensional coordinate of testee through the mode of non-cpntact measurement.
Present embodiment is according to known parameters of pick-up head, the for example distance of actual wide height, lens center and the imageing sensor of resolution, imageing sensor, and the parameter of known target; The planimeter of the picture of diameter for example, the picture of the target that can photograph according to camera position and the target on imageing sensor is calculated three-dimensional coordinate (X, the Y of target with respect to camera; Z); Because the required input parameter is few, not only computing velocity is fast, can accomplish real-time monitoring; And the employing non-cpntact measurement, improved applicability.
Fig. 5 is the composition frame chart of device of three-dimensional coordinate of the Measuring Object of present embodiment, and please with reference to Fig. 5, the device of present embodiment comprises target 51, camera 52 and processor 53, wherein:
Before measuring, target 51 is fixedly connected on the testee, in one embodiment, target be shaped as sphere, and its diameter is known.
Camera 52 is used to obtain the said image that is fixed in the target of testee, and in one embodiment, this camera 52 can comprise imageing sensor 521 and lens 522, can further include housing and winding displacement, sees Fig. 2 A and Fig. 2 B for details.
Processor 53 is used for confirming the coordinate of said target with respect to said camera according to said image; In one embodiment; This processor 53 can comprise extraction unit 531, first computing unit 532, second computing unit 533, the 3rd calculating unit 534 and definite unit 535, wherein:
The pixel at place, center of picture that extraction unit 531 is used for extracting target according to said image is with respect to the coordinate at the imageing sensor center of said camera and the area of picture on the imageing sensor of said camera of target.In one embodiment, this extraction unit 531 can be realized the function of abovementioned steps 102, repeats no more at this.
First computing unit 532 is used for calculating the actual range coordinate of the picture that obtains said target according to the pixel at place, the center of the picture of the said target interval with respect to the pixel on the imageing sensor of the coordinate at the imageing sensor center of said camera and said camera.In one embodiment, the actual wide height of the resolution of camera, imageing sensor is known, and this
first computing unit 532 can be according to formula
With
Calculate the interval of pixel on the imageing sensor that obtains camera, wherein, N
W* N
HResolution for said camera; W is that developed width, the H of the imageing sensor of said camera is the true altitude of the imageing sensor of said camera; Calculate the actual range coordinate x and the y of the picture that obtains said target again according to formula x=Nx*dx and y=Ny*dy; Wherein, Nx and Ny are that the pixel at center place of picture of said target is with respect to the coordinate at the imageing sensor center of said camera.Specifically of step 103, repeat no more at this.
Second computing unit 533 is used for calculating the distance that obtains target and camera according to the area of picture on the imageing sensor of said camera of said target.In one embodiment;
Second computing unit 533 can according to formula
calculate to obtain said target and camera apart from Z; Wherein, K is a proportionality constant, and S is the area of picture on the imageing sensor of said camera of said target.Specifically of step 104, repeat no more at this.
The 3rd calculating
unit 534 is used for obtaining the coordinate of target with respect to said camera according to the distance calculation of the imageing sensor of the lens center of the actual range coordinate of the image of the distance of said target and camera and said target and said camera and said camera.In one embodiment; The distance of lens center and imageing sensor is known; The 3rd calculating
unit 534 can calculate coordinate X and the Y of acquisition target with respect to said camera according to formula
and
; And then the acquisition target is with respect to coordinate X, Y and the Z of said camera; Wherein, D is the distance of imageing sensor of lens center and the said camera of said camera.Specifically of step 105, repeat no more at this.
Confirm that unit 535 is used for obtaining the coordinate of testee with respect to said camera according to target with respect to the coordinate of said camera.In the present embodiment, because that target is connected with testee is fixing, therefore, can obtain the coordinate of testee by the coordinate of the target of abovementioned steps calculating acquisition.
Present embodiment is according to known parameters of pick-up head, the for example distance of actual wide height, lens center and the imageing sensor of resolution, imageing sensor, and the parameter of known target; The planimeter of the picture of diameter for example, the picture of the target that can photograph according to camera position and the target on imageing sensor is calculated three-dimensional coordinate (X, the Y of target with respect to camera; Z), because the required input parameter is few, not only computing velocity is fast; Can accomplish real-time monitoring, and adopt non-cpntact measurement, improve applicability; Equipment needed thereby is simple in addition, and cost is low.
Above-described specific embodiment; The object of the invention, technical scheme and beneficial effect have been carried out further explain, and institute it should be understood that the above is merely specific embodiment of the present invention; And be not used in qualification protection scope of the present invention; All within spirit of the present invention and principle, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.