A kind of monocular range-measurement system based on Inertial Measurement UnitTechnical field
The invention belongs to visual fields, and in particular to a kind of monocular range-measurement system based on Inertial Measurement Unit.
Background technique
Visual token is one of important technology of robot field, in terms of vision positioning, target following, visionIt has a wide range of applications.Common visual token method has monocular ranging, binocular ranging, structure light measurement etc..Structure light measurementThe light source with multiple characteristic points is needed, the occasion of application is relatively more fixed;Binocular ranging needs corresponding characteristic matching system,Affect the precision and efficiency of measurement;And monocular distance measuring structure is simple, arithmetic speed is fast, to have broad application prospects.
LUO SHIGUANG.Method of ObstacleDetection for the Road based onMonocular Measurement [J] .Computer engineering&Software, 2013,34 (9): 100-102 is mentionedA kind of monocular ranging technology is gone out, single camera vision system is reduced to video camera projection model.It is built by geometrical relationship derivationVertical ranging model, obtains the transformational relation between image coordinate and world coordinate system, realizes and hinders finally by geometrical relationship operationHinder the measuring and calculating of object distance, but the program has and needs manual-alignment camera optical axis.
JIANG XIAODONG,YU JIYAN,ZHU LIKUN,HUANG JIANSHENG Research on Self-calibration Binocular Ranging System based on Hardware SURF Algorithm[J].ActaOptica Sinica proposes a kind of self calibration binocular range-measurement system based on hardware SURF algorithm.The program using first by2 cameras of different location shoot Same Scene and obtain 2 width images simultaneously from different perspectives, then using SURF algorithm detection andThe correspondence picture point that same object point is located on 2 width images is matched, tested distance accordingly is finally calculated based on principle of parallax, isSystem utilizes ZynqSoC processor using Position-Sensitive Detector and servo motor as binocular camera optical axis self calibration platformSURF algorithm is carried out hardware-accelerated, but the program still has the disadvantages that first is that image matching algorithm is computationally intensive, second is thatTo the image of not obvious characteristic, matching precision is lower.
ZHANG YONG JU,GU XU BO,ZHANG JIAN,WANG BING,et al.3D MeasurementBased on Combination of Structured Light and Binocular Vision[J].JISUANJI YUXIANDAIHUA, 2018,2:118-121, a kind of method for three-dimensional measurement that structure light is combined with binocular vision is proposed, is passed throughMany spies are provided to object projection coded structured light so that object under test generates particular image under the irradiation of structure lightSign matching angle point, can very easily carry out the matching of characteristic point, improve matched precision, but the program still have it is followingDisadvantage: first is that limitation of the structure light due to light source, the occasion of application is relatively more fixed;Second is that still needing to carry out using image matching algorithmCharacteristic matching.
Currently used visual token method has in summary:
(1) method based on monocular ranging.Depth information is obtained using small using the Target Photo that a video camera obtainsBorescopic imaging principle derives tested distance.But the disadvantage is that needing manual-alignment camera optical axis.
(2) method based on binocular ranging.Same field is shot simultaneously from different perspectives using two cameras of different locationScape obtains two images, is then matched using image matching algorithm to the identical characteristic point in two images, last baseTested distance accordingly is calculated in principle of parallax.But the disadvantage is that image matching algorithm is computationally intensive, and for unobviousThe image of feature, matching precision are lower.
(3) based on the method for structure light measurement.Projection source is encoded, camera shooting is light source encodedThe image crossed on object by the depth modulation of body surface is projected to, because structured light light source has many characteristic points or volumeCode, thus provides many matching angle points, can very easily carry out the matching of characteristic point, improve matched precision, mostImage matching algorithm is recycled to obtain accordingly being tested distance afterwards.But the disadvantage is that limitation of the structure light due to light source, the occasion of applicationCompare fixation, and image matching algorithm is still utilized, calculation amount is larger.
Summary of the invention
It is an object of the invention to propose a kind of monocular range-measurement system based on Inertial Measurement Unit, using based on knownThe monocular distance measuring method of object, structure is simple, arithmetic speed is fast, is taken the photograph using IMU sensor cooperation servo motor come adjust automaticallyAs the optical axis of head, registration optical axis error is introduced to solve camera itself and system and assemble.
The technical solution for realizing the aim of the invention is as follows: a kind of monocular range-measurement system based on Inertial Measurement Unit is adoptedWith the monocular distance measuring method based on known object, cooperate servo motor come the optical axis of adjust automatically camera using IMU sensor,It assembles to introduce and is registrated optical axis error to solve camera itself and system.
The monocular range-measurement system based on Inertial Measurement Unit, including power supply, data acquisition module, data processing mouldBlock and pose adjustment module.
The power supply is connect with data acquisition module, data processing module and pose adjustment module respectively, is acquired for dataModule, data processing module and pose adjustment module for power supply.
The data acquisition module includes IMU sensor and camera, and IMU sensor passes through signal wire and data processing mouldThe main control chip of block connects, and the acceleration of camera is constantly measured in flight course, camera is obtained after integral operationAttitude angle information, camera connect by data line with main control chip, and collected pictorial information is sent to master control corePiece.
The data processing module includes main control chip, pin-saving chip, serial ports and host computer;Main control chip passes through letterNumber line is connect with IMU sensor, and pin-saving chip and serial ports are connect with main control chip respectively by signal wire, and host computer passes throughData line is connect with serial ports;Main control chip constantly receives the camera posture information from IMU sensor before ranging, by operationThe position coordinates that camera and measured target point are accurately corrected after processing are poor, and union show that camera gesture stability instructs, mostThe instruction morphing control amount for motor of gesture stability at last, is sent to pose adjustment module, and main control chip will be to reception when rangingTo the pictorial information from camera handled, according to national forest park in Xiaokeng and similar triangles geometrical principle obtain byRanging is from being saved in pin-saving chip for processing result and be sent to host computer by serial ports.
The pose adjustment module includes three axis servo motors, controls the movement of tri- axis of X, Y, Z respectively, passes through data lineIt is attached with main control chip;After receiving the gesture stability instruction that main control chip is sent, turning for three servo motors is adjustedSpeed, accurately to manipulate the optical axis position of camera, until optical axis is mutually perpendicular to tested plane.
Compared with prior art, the present invention its distinguishing feature is:
(1) calculation amount is small.For the disadvantage huge using Image Feature Matching algorithm calculation amount, the present invention is utilized based on smallThe monocular distance measuring method of borescopic imaging model and similar triangles geometrical principle, so that CPU calculation amount is smaller.
(2) can accomplish from main modulation camera optical axis.It is assembled for camera itself with system and introduces registration optical axis errorDisadvantage, the present invention is using IMU sensor cooperation servo motor come the optical axis of adjust automatically camera.
Detailed description of the invention
Fig. 1 is a kind of monocular range-measurement system general structure schematic diagram based on Inertial Measurement Unit of the embodiment of the present invention.
Fig. 2 is the IMU sensor of the embodiment of the present invention and each coordinate relation schematic diagram of camera.
Fig. 3 is the range measurement principle schematic diagram based on national forest park in Xiaokeng of the embodiment of the present invention.
Fig. 4 is the range-measurement system execution flow chart of the embodiment of the present invention.
Specific embodiment
In conjunction with Fig. 1, the monocular range-measurement system based on Inertial Measurement Unit that the present invention provides a kind of, including power supply, dataAcquisition module, data processing module and pose adjustment module.Wherein:
The power supply is connect with data acquisition module, data processing module and pose adjustment module respectively, is acquired for dataModule, data processing module and pose adjustment module for power supply, data acquisition module respectively with data processing module and pose adjustmentModule connection, data processing module are connected with pose adjustment module.
The data acquisition module includes IMU sensor and camera, and IMU sensor passes through signal wire and data processing mouldThe main control chip of block connects, and the acceleration of camera is constantly measured in flight course, camera is obtained after integral operationAttitude angle information.Camera is connect by data line with main control chip, and collected pictorial information is sent to master control corePiece.
The data processing module includes main control chip, pin-saving chip, serial ports and host computer.Main control chip passes through letterNumber line is connect with IMU sensor, and pin-saving chip and serial ports are connect with main control chip respectively by signal wire, and host computer passes throughData line is connect with serial ports.Main control chip constantly receives the camera posture information from IMU sensor before ranging, by operationThe position coordinates that camera and measured target point are accurately corrected after processing are poor, and union show that camera gesture stability instructs, mostThe instruction morphing control amount for motor of gesture stability at last, is sent to pose adjustment module.Main control chip will be to reception when rangingTo the pictorial information from camera handled, according to national forest park in Xiaokeng and similar triangles geometrical principle obtain byRanging is from being saved in pin-saving chip for processing result and be sent to host computer by serial ports.
Its range measurement principle is as follows: assuming that L represents target to the distance of video camera, W1Refer to the photo intermediate cam shape of shootingSide length, W2The side length of measured target intermediate cam shape, F are focal length of camera.It is L=that ranging formula, which then can be obtained, according to similar triangles(W2*F)/W1。
The pose adjustment module includes three axis servo motors etc., controls the movement of tri- axis of X, Y, Z respectively, passes through dataLine is connect with main control chip, and three axis servo motors are connect with camera.It is instructed when receiving the gesture stability that main control chip is sentAfterwards, the revolving speed of three axis servo motors is adjusted, accurately to manipulate the optical axis position of camera, until optical axis and tested plane are mutually hung downDirectly.
In conjunction with Fig. 2, each coordinate relationship of IMU sensor and camera in the present invention are as follows:
IMU sensor and camera are connected, and sensor z-axis direction is overlapped with camera axis holding straight up, x-axis sideIt is overlapped to the holding of camera optical axis direction, y-axis direction, which is then arranged with camera optical axis direction and simultaneously with x, z-axis, to keep hanging downDirectly.Wherein coordinate relationship are as follows: world coordinate system Oxyz, camera coordinate system Ox1y1z1.Defining world coordinate system Oxyz isReference frame, then x1y1Intersection with x/y plane is line of nodes N, then is that x-axis and line of nodes N are pressed from both sides due to camera yaw angle φAngle, roll angle γ are z1The angle of axis and z-axis, pitch angleFor x1The angle of axis and line of nodes N.
World coordinate system Oxyz is as referential, camera coordinate system Ox1y1z1It is moved in Oxyz, generates pitching, yawWith the variation of rolling.It is integrated between being set time by the three-axis gyroscope data of attitude transducer, acquires above three attitude angle, togetherWhen introduce the fusion of accelerometer/magnetometer correction, finally acquire three attitude angles of the camera with respect to world coordinate system: pitchingAngleYaw angle φ and roll angle γ.
Pinhole imaging system range measurement principle in conjunction with Fig. 3, in the present invention are as follows:
Assuming that L represents target to the distance of video camera, W1Refer to the side length of the photo intermediate cam shape of shooting, W2Measured targetThe side length of intermediate cam shape, F are focal length of camera.It is L=(W that ranging formula, which then can be obtained, according to similar triangles2*F)/W1。
In conjunction with Fig. 4, execution process of the invention are as follows:
(1) before ranging, predetermined camera targeted attitude is inputted into main control chip.
(2) when starting ranging, IMU sensor is started to work, and is obtained the attitude angle information of camera in real time and is exported and givesMain control chip show that the posture of camera and targeted attitude is poor by main control chip COMPREHENSIVE CALCULATING.
(3) when three servo motors being mounted below camera receive the pose adjustment information from main control chipWhen.The posture of camera is adjusted, by control motor speed so as to adjust optical axis position.
(4) after camera reaches target posture, start to acquire pictorial information, and be sent to main control chip, according toPinhole imaging system principle carries out distance calculation.
(5) host computer is sent to by serial ports after obtaining corresponding distance measurement result, and stores data into data storageChip.
In order to verify actual effect of the invention, special set square of selecting has carried out three groups of experiments, in fact as measurement targetIt is as follows to test result
| Group | Actual range (cm) | Measurement distance (cm) | Error (%) |
| 1 | 50 | 50.78 | 1.56 |
| 2 | 60 | 59.32 | 0.53 |
| 3 | 70 | 70.91 | 1.30 |
The present invention can quickly, effectively realize monocular cam self calibration using IMU sensor cooperation servo motor, simultaneouslyLinear camera shooting head model cooperation similar triangles geometrical principle more can accurately realize monocular cam distance measurement function, will accidentallyDifference control is within 3%, engineering practice value with higher.