Stability Delay defines the time (expressed in microseconds) that the video camera has to wait, after the plane’s rotation, before shooting another picture.
Max Laser Width defines the maximum width of the laser’s line (expressed in pixels).
Min Laser Width defines the minimum width of the laser’s line (expressed in pixels).
Generate PLY File converts the scan in a PLY cloud of dots.
PLY Data Format defines the PLY file’s format (Binary or ASCII).
Generate STL File supplies the scan in a .stl file.
Generate XYZ File converts the scan in a XYZ cloud of dots.
Separate the Lasers Calibration is a debug option, used in order to separate the images obtained by the two lasers, and distinguishes them by using different colours (it requires PLY).
Enable Burst Mode enables the video camera’s burst mode, during the still mode acquisition.
Create Base for Object adds a flat base to the object, so to simplify the 3D printing.
Start and regulations
Let’s see now how to work with our scanner, but with a premise: the calibration function requires the creation of a “calibration object” that you will have to obtain by means of 3D printing (the file iscalibration_item.stl and you may download it from the magazine’s website). Once the object has been created, please connect Raspberry Pi 2 to a monitor (via a HDMI cable) and to the LAN (via a dedicated cable). Please power the shield with 12Vcc for the motor and with 5Vcc – 1 A for Raspberry Pi 2. We opted for a single 12Vcc power supply and used a DC/DC module in order to obtain the 5Vcc needed by Raspberry Pi. Once Raspbian has been booted, please type cd freelss/src from LXterminal and press Invio. After that please type sudo ./freelss and then press Invio: a video will appear, showing the following writing: “Running on port 80…”.
Now, please type the IP address assigned to Raspberry Pi 2 in the PC browser’s address bar. Please set the required hardware values (video camera/laser coordinates, Steps Per Revolution, pin board, etc.) from the SETTING/setup menu; in particular, before any operation you will have to define Raspberry Pi’s GPIO pins that have been assigned to the left (Left Laser Pin) and right (Right Laser Pin) lasers, in addition to those corresponding to the EN (Motor Enable Pin), STEP (Motor Step Pin) and DIR (Motor Direction Pin) lines of the shield’s U2 driver. In Raspberry Pi 2 – whose GPIO connector is of the extended kind and it supports more I/Os of the ones supported by the first Raspberry Pi – some GPIOs have been fixed at a hardware level and the extended ones have been mapped by means of a specific library. The FreeLSS software uses the wiringpi2 library, therefore the GPIOs that are connected to the ones to be typed in the web interface’s boxes are the corresponding ones in the WiringPi.
The lines have to be chosen in the interval that is considered by the shield, in the sense that if it may be connected – as for EN and by means of the JPEN jumper, to IO17, IO22 or IO27, then in the Motor Enable Pin you should only write 17, 22 or 27. As for the ULN2003’s outputs, the lasers have to be connected to the corresponding ones to the IOs that you want to specify in the screen view. Please refer to the table in figure.
If you want to connect a lamp so to light the scene, you will have to check the Enable Lighting box and to type the GPIO pin with which you will control the Lighting (what we just said is still valid) – by means of one of the ULN2003 free outputs – in the box below.
Once the settings have been selected, please click on the CAMERA button in the web interface so to see the monitor preview of what the camera shoots. Please regulate the video camera’s optics so that the object on the plate is being focused and tilt the video camera on the horizontal plane, so that the inferior dash found on the red centering cross corresponds to the plate’s centre of rotation. You will then have to put the calibration object on the plate (towards the centre) with the ends pointed upwards: the horizontal line must equally lean on all the three ends even during the rotation (if it is too high or too low, please modify the Camera Y value in Setup); if it doesn’t occur, it means that the video camera isn’t perfectly horizontal. The two pictures in figure help to clarify the concept.
In order to activate or deactivate the lasers, you will have to click on the “Toggle Left Laser” and “Toggle Right Laser” buttons.
The two laser lines must converge towards the centre of the rotating platform and be perfectly normal with respect to it; for the purpose it would be convenient to place the calibration object on the platform so that a face is exactly aligned with the plane’s centre of rotation. Please make sure that the laser beams perfectly overlap.
While in SETTINGS, please set the 5 MP (still mode 2592×1944) video camera’s shooting mode and enable both lasers (Both Lasers) by means of “Laser Selection”. Please save the settings and return to CAMERA, where you will have to click on Calibrate Laser; a few seconds after the system will inform about the occurred calibration (it may only be carried out in the 5MP still or 5MP video modes, otherwise the system will return an error). If you do not place any object on the rotating plate, the system will return the error message shown in figure , above the picture. Please put now the object to be scanned on the rotating plate.
Please click on the Test button, in order to verify if the Threshold value is a correct one. Please select the desired options while in SETTINGS, then move to SCAN and click on Start Scan, so to start the object scan: a preview of the real-time scan will appear on the monitor.
At the end of the operation a box will appear – with a miniature of the scanned object – from there it is possible to download the scan files in different formats.
The object may be seen again in 3D format, by clicking on the View button or it may be deleted by clicking on the Delete button.
If the scan reached a successful ending it may be exported, so that it may be opened later on a PC via the repair software. This figure shows the XYZ file related to a scan imported in MeshLab. The object has to be “cleaned” and repaired since – please keep it in mind – in order to have the 3D models printed and therefore to generate their STL file, they have to be hermetic (without “holes”).
The downloaded files may not be immediately used for the printing, however, since they contain some errors: the figure shows the import in Repetier Host and the errors being highlighted;
In figure shows the model as repaired and made hermetic.
Well, with this we have concluded; in the next installment we will see the scanner version with the video camera only.
3D scan systems
Nowadays it is possible to find both fixed scanners (that is to say, to be permanently mounted) and portable ones available for sale: the most renowned one is GoScan 3D, that is a manual scanner that has be pointed towards the objects while revolving around them so to acquire the whole surface; it is supplied with a self-positioning system that compensates the errors due to the fact that the hand is not always stable and that, by rotating, the scanner’s height it changes. As for the scan it uses lasers and a video camera and it has a scan accuracy of 0.1 mm (the resolution is 0.2 mm).
Many scanners work just like GoScan 3D.
Another solution – and certainly a very affordable one – for carrying out 3D scans consists in using devices that are born for other purposes, such as Microsoft Kinect or equivalent ones (for example, Asus Xtion Pro) for modern gaming consoles, capable of detecting the player’s movements and of sending them to the system so that he may be able to command his own avatar in a videogame or to transmit the movements to an interactive program. Kinect works like this: the infrared projector projects a specific pattern, made of equidistant dots. By analyzing the image obtained by means of the IR video camera, Kinect determines the the distances among the various points, and from them it acquires the distance and the inclination of the lighted object. Since the IR beam starts from a restricted area and it gradually broadens as the distance increases (it is more or less conical…), where the dots prove to be very close among each other, it means that the object is close to the sensor; vice versa, if the distance among the dots is a remarkable one, it means that the object is farther away. In order to understand this better, imagine to place a polka dot blanket on a surface of an object: it is possible to identify the shape of the said item on the basis of how the dots are arranged, as the blanket gradually wraps the item itself. In order to acquire with Kinect and similar devices, you need a Personal Computer and the ReconstructMe software with the appropriate software for the sensor that has been used. A program that may be an alternative to ReconstructMe is Kscan3D, but in this case the Trial version does not allow to save the model, therefore it would not allow you to reach the printing stage (it is used only to evaluate its functions).
In order to carry out the scan via Kinect and similar devices the object must be placed before it on plate or a rotating stool, after that please place Kinect on a stable tripod.
In addition to these techniques, there is a laser and video camera scan (the lasers are two) of the rotating object, that is the subject of this article.
A technology that produces excellent results is – on the other hand – given by the fusion of stereoscopic and photometric data that, for example, is implemented on the Fuel3D Scanify scanner; there are still two lasers, but the video camera is a stereoscopic one and is calibrated on them. During the scan it supplies two kinds of data: 3D images and corresponding photometric features; the whole occurs in less than a tenth of a second. Afterwards, it processes the two pieces of data and compares them, so to have a very high accuracy. Such a system is ideal in order to acquire human faces, cloth weaves or natural elements such as flowers and plants.
There is also the valued technique of the structured light scanning: a scan projects a known light diagram – typically having horizontal and vertical parallel lines – on the surface to be acquired. The deformation induced by the object’s surface is acquired by means of the video camera and it is taken advantage of, for the purpose of the calculation of the three-dimensional coordinates. Such systems are named full-field systems since for every sensitive dot of the acquisition system’s CCD or CMOS, three dots (x,y,z) in the space are acquired. Such a system allows the digitization of many dots at a time: according to the video camera’s resolution we may reach even different hundreds of thousands of dots.
By projecting a narrow light band on a three-dimensionl object a luminous line is obtained: from different observation points from the projector, it appears as distorted and it may be used for a correct geometric reconstruction of the lighted surface’s shape (luminous section). “Triangulation” is the name given to the procedure with which the shape of the object hit is reconstructed. A faster and more versatile method is the projection of luminous diagrams that consist in many lines at a single time, or of arbitrary luminous fringes. The light strips may be generated by means of interference of laser sources or via projection method. In the first case, two planar light sources are let to interfere between each other: the result is the creation of regular and equidistant lines. The size of the fringes may be modified by changing the angle between the two beams. This method allows to generate a very accurate pattern that has a great depth, but it is an expensive one, it suffers from reflection and from the typical flaws of the laser sources (speckles). The projection method takes advantage of means that generate incoherent light, that is to say the projectors; if on a side some small discontinuities are found in the scan (due to the pixel edges that compose the picture), on the other one they may be diminished by lens focusing. In both cases, the picture that is gradually created on the lighted surface is acquired by means of one or more video cameras.
From Openstore
=====================================================================