A kind of 3-D scanning magic box
Technical field
The present invention relates to computer vision and electronic technology field, specifically a kind of laser 3 d scanner.
Background technology
Spatial digitizer can be used for being scanned the object of real world, so as to obtain three dimensional surface data.It should
It is extremely extensive with field, such as industrial design, reverse-engineering, criminal identification, historical relic classical collection etc..According to the technical method for using not
Together, triangle telemetry, time-of-flight method and structure Light Source Method etc. be can be largely classified into.
Triangle telemetry is to object under test surface, then using phase machine examination using one laser rays of laser transmitter projects
Survey the laser spot on object under test surface.Laser spot, camera and laser sensor constitute a triangle in itself, by camera
Gather the position of laser spot in image to judge angle of the camera in triangle, and then calculate the depth of determinand surface point
Degree distance.
Time-of-flight method is to launch pulse to testee surface using laser, is then come and gone by calculating laser pulse
The time difference of body surface converts the distance of signal walking, and then is calculated the depth information of object table millet cake.
Structure Light Source Method is projected by the structure fringe of specific coding, then by forming an angle by body surface
Two camera synchronous acquisition images, then by matching technique, triangulation principle, calculate in the range of two camera fields of view
The 3 d space coordinate of body surface pixel.
The universals of prior art and product are:Price is high, and volume is big, and strongly professional, speed is slow.By these factors
Influence, be used in industry and commercial kitchen area more such technology and product, and still belong to blank in consumer electronics sector.
For time-of-flight method, usually require that measured object apart from camera distance farther out, enough certainties of measurement could be obtained.
If measured object range sweep equipment is too near, because the flight time of light is too short, scanning accuracy can drastically decline.Therefore,
The technical method and product are commonly available to the 3-D scanning of the Outdoor Scenes such as heavy construction, mine, and are not suitable for interior very
To the scanning of Desktop Product.
Structure Light Source Method is applied to indoor scene, and scanning accuracy is also sufficiently high, but sweep speed is slower, and parameter sets
Put more complicated, therefore suitable for specific industry field, and it is not suitable for everyday use.The usual table of technical deficiency of triangle telemetry
Now:1st, the balance between sweep speed and precision.The selection of laser rays spacing is critically important, generally 0.1mm, if spacing is too
Greatly, although sweep speed can be accelerated, but precision is inadequate., whereas if spacing is too small, then sweep speed will be reduced.2、
Splicing data volume is big.Measured object is scanned completely, at least need to scan six data in face, and this six numbers in face
It is not that in the same coordinate system, but, it is necessary to follow-up artificial merge under device coordinate system, quantities is big, and effect according to coordinate
It is really bad.
3-D scanning is current study hotspot, with becoming increasingly popular for 3-D scanning concept, three-dimensional scanning device is small
Type is simultaneously moved on the desktop of consumer, makes its handy inexpensive, is the problem that those skilled in the art are devoted to solving.
The content of the invention
The technical problem to be solved in the present invention is to provide fast a kind of small volume, speed, low cost and operation simple and convenient
Laser 3 d scanner.
In order to solve the above-mentioned technical problem, the technical scheme is that providing a kind of 3-D scanning magic box, its feature exists
In:Including shell, the turntable for placing object to be scanned is provided with shell, turntable is connected with stepper motor;It is provided with shell
Fixed support, line laser sensor and camera are on fixed support;
Stepper motor drives the object to be scanned on turntable to rotate, and the line laser of line laser sensor emission is projected to be waited to sweep
Body surface, the laser line image of the body surface to be scanned that cameras capture is rotated are retouched, and is sent to control unit;Control unit
Image to receiving is processed, and obtains the space coordinates of body surface arbitrfary point, is generated the threedimensional model of object and is exported.
Preferably, the shell is cylindrical structure.
Preferably, described control unit uses Arduino platforms as control mainboard.
Preferably, the line laser sensor is a wordline laser sensor.
Preferably, the stepper motor connects control unit by stepper motor driver.
It is highly preferred that the stepper motor driver is the DMOS mini-step controlling devices of tape switching unit and overcurrent protection.
Preferably, described control unit carries out the process of image procossing includes:
Step 1:Image denoising
The raw data of the image that removal is collected;
Step 2:Point cloud
Due to scanning object or the complexity of scene, scanning every time can only obtain the point cloud number of object or a scene part
According to;In order to obtain complete cloud data, it is necessary to be scanned with position from different perspectives, then to the point cloud number of Multiple-Scan
According to being spliced, the space coordinates of body surface arbitrfary point is obtained;
Step 3:Three-dimensional reconstruction
After the space coordinates for obtaining body surface arbitrfary point, you can carry out the three-dimensional reconstruction of model, recover the three of object
Dimension coordinate, realizes the visualization of three-dimensional data points;
Step 4:Surface fitting
Patch fitting is directly carried out to cloud data, so as to form surface model;
Step 5:Threedimensional model is exported
The threedimensional model of generation includes archetype, profile, feature and data model.
Compared to existing technology, the 3-D scanning magic box that the present invention is provided has the advantages that:
1st, small volume.Employ that monochromaticjty is good, coherence is good, the word laser that good directionality, brightness are high, coordinate short focus
Wide-angle lens camera, to realize between laser scanning module, two kinds of modules of image capture module and motor motion control module most
Small distance.At the same time, it is ensured that the undistorted collection of the accuracy and image of picture.
2nd, speed is fast.Increased using height come Driving Stepping Motor from ULN2003 drive modules using Arduino Uno R3
The voltage and current of benefit carrys out motor motion module, while coordinate quick 3-D scanning, with the speed for accelerating to scan, be imaged
Degree.
3rd, low cost.From a word laser and camera, due to small volume, can guarantee that reach at a lower cost it is higher
Precision, the link block and metal screws that overall architecture is printed by 3d constitute, and sturdy and durable, cost performance is high.
4th, simple and convenient is operated.Because the present apparatus is mainly towards popular consumer electronics product, so for scanning
Required precision is not high, simple to operate, can more cater to the consumer electronics product market demand.
Brief description of the drawings
The 3-D scanning magic box structural representation that Fig. 1 is provided for the present embodiment;
The 3-D scanning magic box composition frame chart that Fig. 2 is provided for the present embodiment;
Fig. 3 is hardware system structure schematic diagram;
Fig. 4 is software system structure schematic diagram;
The 3-D scanning magic box workflow diagram that Fig. 5 is provided for the present embodiment.
Specific embodiment
With reference to specific embodiment, the present invention is expanded on further.It should be understood that these embodiments are merely to illustrate the present invention
Rather than limitation the scope of the present invention.In addition, it is to be understood that after the content for having read instruction of the present invention, people in the art
Member can make various changes or modifications to the present invention, and these equivalent form of values equally fall within the application appended claims and limited
Scope.
The 3-D scanning magic box structural representation that Fig. 1 is provided for the present embodiment, described 3-D scanning magic box is that one kind can
In the lightweight 3D scanners that desktop is used, specifically a kind of cylindrical structure is suitable to place on the table, and internal diameter size
Adjustment can within the specific limits be zoomed in and out.Its major function:Quick three can be carried out to the object being placed in box
Dimension is scanned and exports 3D models.The 3D models of output can be on PC the enterprising edlin of software such as 3DS MAX, MAYA, lead to
Crossing display carries out three-dimensional display, and prints in kind by 3D printer.It is various that the 3-D scanning magic box can be used for scanning
Different types of object, for example:Jewellery, sculpture, sample, digital product etc., can be used widely in numerous areas.
With reference to Fig. 2,3-D scanning magic box is divided into hardware system and software systems two parts, specifically by four module structures
Into being respectively:Laser scanning module, image capture module, motor motion control module, image processing module.
With reference to Fig. 3, hardware system by Arduino platforms, turntable 1, line laser sensor 2, camera 3, stepper motor and
Fixed support etc. is constituted.Arduino Uno are powered as control mainboard using USB interface, by software download program to Uno
In;Four phase step motor is used to drive the object to be scanned 4 on turntable 1 to rotate;Object is carried out using a wordline laser and camera
The collection of surface information:A wordline laser projects body surface to be scanned, by cameras capture body surface image.To meet essence
Degree with operation require, line laser should have monochromaticjty is good, coherence is good, good directionality, brightness high the characteristics of.Stepper motor be by
Electric impulse signal is changed into the open loop control element of motor of angular displacement or displacement of the lines.Stepper motor can not be directly connected to industrial frequency AC
Or dc source, it is necessary to use special stepper motor driver.It is by pulse generation control unit, power drive unit, guarantor
The compositions such as shield unit.DC motor speed is quickly and driving voltage needs very greatly, and the I/O port for depending merely on single-chip microcomputer can not drive electricity
Machine is, it is necessary to special drive module.A4988 is the DMOS mini-step controlling devices of a tape switching unit and overcurrent protection, and the product can
It is complete, half, 1/4,1/8 and operate bipolar stepping motor during 1/16 step mode, output driving performance up to 35V and ± 2,
A4988 includes a fixed turn-off time current voltage regulator, and the voltage-stablizer can work under slow or mixing evanescent mode.So choosing
The rotating that A4988 is selected to control stepper motor, motor can be specifically controlled by button and program.Arduino master
To be made up of with expansion board control panel, Arduino Uno R3 mainly turn serial port circuit by ATmega328 series monolithics and USB
Constitute.32kb Flash2KB SRAM, 1KB EEPROM are included in 8-bit microprocessor ATmega328 pieces, operation clock frequency is
16MHz, program can be directly downloaded in Uno by internal preset bootloader programs.ATmega328 single-chip microcomputers are produced
High level signal is transferred to stepper motor, and stepper motor starts to drive band scanning object operating.Cameras capture is to article for rotation table
The laser line image in face is simultaneously transferred to the treatment of PC ends.
With reference to Fig. 4 and Fig. 5, software systems mainly realize camera calibration, IMAQ, image denoising, point cloud, three-dimensional
Rebuild, surface fitting, and threedimensional model output etc. function.
(1) camera calibration.Camera calibration is carried out using 163mm × 95mm gridiron patterns scaling board and laser is demarcated.
(2) IMAQ.Laser sensor is opened, allows a wordline laser vertically to project body surface, while
Start stepper motor, allow object to rotate.Camera is opened, laser reflection curve is gathered, after object is rotated by 360 °, then obtained
Obtain the surface data of object.
(3) image denoising.The raw data of the range image for collecting specifically has two types, and the first is to obtain
Take blocking for exterior object during body surface data and the noise in being present in view data in itself.Another kind is in spy
The error produced in a registration process is levied, most commonly by " thickness " of data investigation generation, it is necessary to be carried out between data
Treatment.Can generally manually select delet method for the first data noise, latter then generally use resampling or other
Method is processed.
(4) cloud is put.Due to scanning object or the complexity of scene, scanning only can obtain object or scene is a certain every time
Partial cloud data.In order to obtain complete cloud data, it is necessary to be scanned with position from different perspectives, then used
Iteration closest approach algorithm completes the splicing of cloud data.
(5) three-dimensional reconstruction.After the space coordinates for obtaining body surface arbitrfary point, you can carry out the three-dimensional reconstruction of model.
By setting up four linear equations with the world coordinates of the point as unknown number, the generation for obtaining the point can be solved with least square method
Boundary's coordinate.Actual reconstruction can terminate method using EP point.Once the inside and outside parameter of two video cameras determines, so that it may by two imagings
The relation that the restriction relation of the polar curve in plane is set up between corresponding points, and thus simultaneous equations, the world for trying to achieve picture point sits
Scale value.Recover the three-dimensional coordinate of object by calculating, realize the visualization of three-dimensional data points.
(6) surface fitting.Patch fitting is directly carried out to cloud data, so as to form surface model.
(7) threedimensional model output.The threedimensional model of generation includes archetype, profile, feature and data model (including three
Angular measurement, Nurbs, simple geometry model).Color model can also be made, orthophotoquad and threedimensional model is exported.