Preview only show first 10 pages with watermark. For full document please download

Gradivo-vaja 9

   EMBED


Share

Transcript

LASER SCANNER MANUAL Version: 15.7.2015 Author: Drago Bračun Support: [email protected] http://www.lakos.fs.uni-lj.si .. Laboratory/Products/MCE 3D scanner 1.12.2015 Page 1 of 34 Table of contest 1  GETTING STARTED ........................................................................................................ 3  1.1  Introduction ................................................................................................................. 3  1.2  Tripod .......................................................................................................................... 5  1.3  Connection to the Computer ........................................................................................ 6  1.4  Troubleshooting ........................................................................................................... 7  2  USER INTERFACE ........................................................................................................... 8  2.1  CAMERA interface ..................................................................................................... 8  2.2  SCAN interface............................................................................................................ 9  2.3  3D IMAGE interface ................................................................................................ 10  2.4  EDIT interface ........................................................................................................... 12  3  FIRST MEASUREMENT ................................................................................................ 14  3.1  Selecting the exposure ............................................................................................... 14  3.2  Selecting the laser power ........................................................................................... 16  3.3  Measure ..................................................................................................................... 17  3.4  Preparing the 3D data for CNC milling ..................................................................... 18  3.5  Measuring uncertainty ............................................................................................... 19  DEVELOPERS SECTION ...................................................................................................... 20  4  DATA FORMATS............................................................................................................ 21  4.1  Xyz Data Format ....................................................................................................... 21  4.2  Xyzb Data Format ..................................................................................................... 21  4.3  Xyzbi Data Format .................................................................................................... 22  4.4  Bpr Binary Data Format ............................................................................................ 22  5  WORKING WITH DATA ................................................................................................ 24  5.1  Reading XYZB file .................................................................................................... 24  5.2  Reading XYZBi file................................................................................................... 24  5.3  Calculating triangles .................................................................................................. 25  5.4  Working with BPR data ............................................................................................. 27  5.5  Programing LaserScanner.......................................................................................... 29  6  FILES AND INSTALLATION ........................................................................................ 33  1.12.2015 Page 2 of 34 1 GETTING STARTED 1.1 Introduction Safety precautions: Caution before opening the case Carefully take the scanner from the protection case. Do not touch the glass windows. Figure 1: Glass windows Figure 2: Do NOT touch the glass windows. 1.12.2015 Page 3 of 34 Take care of the connection cables. 1 2 3 Figure 3: (1) Laser scanner; (2) USB connection cable; (3) Power supply adapter and power connection cable. The scanner is connected to the computer with a USB cable. Power for scanner operation is provided with a 12V DC adapter connected to the 220V AC electrical power outlet. 1.12.2015 Page 4 of 34 1.2 Tripod First read the instructions for the tripod and the head. Connect the head to the tripod (Figure 4-1). Figure 4: Installing instructions for the Manfrotto head. Gently fix the vertical knob of the head (to prevent incidental movements) and attach the laser scanner to the tripod. Figure 5: Laser scanner connected to the tripod 1.12.2015 Page 5 of 34 1.3 Connection to the Computer - Unpack the computer, connect the power supply and start it. For the user name use “scanner” and for the password use “scanner”. - Connect the scanner USB cable to the computer. Figure 6: Connection to the computer - Start the program LT3DMS. Shortcut is on the desktop – yellow triangle. Figure 7: LT3DMS user interface. If everything is OK, the status line at the bottom (Figure 7-red arrow) informs you about current device ID, image format and camera firmware. The device is ready for the first measurement. If the scanner is not connected, the message is “No device”. Without a connected device, importing, processing and exporting data works normally. 1.12.2015 Page 6 of 34 1.4 Troubleshooting When the message “No device” occurs: 1) Close LT3DMS program. Connect the scanner USB cable to the PC USB port. Start LT3DMS. You get message: device 1: cameraID 255, … problem is solved. 2) If the scanner is already connected, close the program LT3DMS. Disconnect the USB cable from the PC, connect the USB cable again and start the program again. It should work. 3) If it still does not work, restart the computer and repeat step 2. 4) Still does not work? Check if the driver is properly installed. Open Devices and Printers window. When the scanner is connected, the icon “OptoMotive Cameleon” icon is located under the unspecified devices (see figure 8). The “OptoMotive Cameleon” is the name of the FPGA camera in the scanner. Figure 8: When the connection between the computer and the laser scanner is active, the icon “OptoMotive Cameleon” is located under the unspecified devices (marked with a red circle). If the driver does not work (exclamation mark next to the icon), right click on the icon, select properties / driver / update driver / and show location of the drivers (*.sys and *.inf files). Driver files are located in “LaserScanner” subfolder named “DewesoftUSBDrivers_v3_1”. The driver files are deweusb.cat, deweusb.inf, deweusb_32.sys, deweusb_64.sys. 1.12.2015 Page 7 of 34 2 USER INTERFACE 2.1 CAMERA interface 6 2 4 5 3 1 Figure 9: CAMERA interface 1. STATUS LINE: display the events (camera status, file name, scanning and camera parameters). 2. MODE SELECTION TAB: switch between the camera, scan, 3D image and edit 3D image. 3. IMAGE PREVIEW: camera image can be saved with a right mouse button click on the image. If the button “Cent. zoom” is pressed, a magnified detail of the image centre is displayed. Useful for fine tuning of the camera parameters. 4. CAMERA EXPOSURE: set camera exposure. 5. LASER POWER: set laser power in percent of full power. 6. CAMERA GAIN: set camera gain (from 3 to 47). This parameter influences amplification of the camera electronic. It can be adjusted in parallel with the camera exposure (4) to achieve proper image brightness. 1.12.2015 Page 8 of 34 2.2 SCAN interface 8 9 10 7 Figure 10: SCAN interface 7. FILE PATH AND TITLE SETUP: Should be set before measurement. The measurement is automatically saved to disk with this file name in raw binary format “bpr”. If the number before file type is set larger than 0, this number is automatically incremented after each measurement. 8. SCANNING ANGLE: set measurement angle in degrees from 1 to 30°. 9. SCANNING SPEED: set measurement speed in steps from 8 to 90. This parameter is not actually speed. It defines how many steps of stepping motor (used for scanning movement) are done between each image. The camera always operates at frame rate of 65 images per second. If a higher value is set, the scanning will be faster, and the distance between the measured profiles will be larger. 10. IMAGE PROCESSING ON PC: images are normally processed in scanner by FPGA processor. By selecting this option, images are transferred to the PC and processed by the PC. The computer processor is loaded. 11. START: start of measurement. 12. FILE NAME: here specify file name and path – before you start measurement. 1.12.2015 Page 9 of 34 2.3 3D IMAGE interface Figure 11: 3D IMAGE interface This viewer is graphical ActiveX control (abc.ocx) embedded in the LT3DMS program. By clicking in the white (graphic) area all mouse and keyboard events are transferred to this graphic control. Events in the graphic area (coordinates of the picked points, results of data processing, etc) are listed in the lower left corner. In the top left corner, status and mode information are listed. Data manipulation in graphic area: - rotation: hold left mouse button and move; keyboard arrows or numbers 1-6; - scaling: mouse wheel; keyboard +,-, *(fit) - translation: hold right mouse button and move; keyboard page up, page down, home, end. - 1.12.2015 main MENU: press ctrl on keyboard and click right mouse button; from this menu data can be edited and exported from “bpr” or “xyzb” type of data in many other data types “stl”, “ply”, etc. Page 10 of 34 - keyboard: H – help for keyboard commands, X, Y, Z – view data from x, y and z axis, K - show coordinate system, select sphere, triangulation geometry, S – show selected points in different modes, D – dynamic view. During rotation, the graphics render only a reduced amount of points; useful for large measurements, L- show label (imported from *.plt file type), P – show planes, F2 – switch between different types of data display (points, triangles), F6, F7 – reduce, increase size of the select sphere. T – alternate display of text C – show data in original gray color or in RGB (when function recolor was initially applied. - set center of rotation: double click with right mouse button. - smooth data: MENU/Filter/Mean/Z or X or Y. - fill holes: MENU/Fill holes. - fit plane to selected points: MENU/Selected points/ & press P to show planes. - create line: click two points; MENU/Line/2 points. - etc 1.12.2015 Page 11 of 34 2.4 EDIT interface Figure 12: EDIT interface Measurements are originally in the scanner coordinate system (origin is inside the scanner). X axis is parallel with laser plane (red line in viewer). Y axis shows scanning direction (green line) and Z axis (blue line) shows distance from the scanner. In order to rotate, translate and scale measurement, the group of “Transform” functions are used. - T: translate - R: rotate - S: scale - Amount: of T, R, S (see example) - X,Y,Z: axis of transform Examples for translation: (1) Specific point in measurement should become new origin: - with left mouse button click on specific point in measurement; - within transform group select Show; - press T button. (2) Translate data along specific axis: - select axis e.g. X; - check mark at Axis; - enter the Amount of translation along axis e.g. 1mm; - press T button. Examples for rotation: (3) Rotate data around specific axis: 1.12.2015 Page 12 of 34 - select axis e.g. X; - check mark at Axis; - enter the Amount of rotation along axis e.g. 1 degree; - press R button. Examples for scale: (4) Scale data in all three axes equally: - remove check mark at Axis; - enter the Amount of scale (e.g. 0.1 = 10% of initial size); - press S button. (5) Scale data in specific axis: - select axis e.g. X; - check mark at Axis; - enter the Amount of scale along axis (e.g. 0.1 = 10% of initial size); - press S button. Box group In order to prepare data for CNC milling, the box helps to position measurement in rectangular work piece. The coordinate system of the box is in the top left corner. Negative direction of Z axis goes from top left to bottom left corner; in work piece material same as Z axis in NC code. By selecting the check mark Show the box or work piece is displayed. The size in millimeters can be set for each axis. The bottom of the box is displayed in green. Fill holes Fill holes smaller than specified value. Measurement is assembled from profiles. Profiles are assembled from points (750 points per profile). The holes are filled along the profiles. Selecting and cleaning the measurement Selecting data of interest with select sphere: The simplest way is with the select sphere. By clicking on the graphic area and pressing keyboard K two times, the select sphere is displayed. The select sphere is positioned by clicking on the measurement. Data within sphere is selected by pressing the button Select SPHERE. The selected data is colored in red. The size of sphere with respect to the measurement can be changed in two ways. (1) Scale the view of the measurement by rolling the mouse wheel. This way sphere remains the same, but its relative size to the data is smaller. (2) By pressing F6 or F7 on keyboard the sphere size is changed. Selecting data of interest with box: See Box Group. Useful when preparing the data for CNC milling. Select data within the box by pressing the button “SelectBOX”. Then press button “DeleteUNSEL” to delete unselected points. Only selected data can be exported in “stl” format for preparing the NC code. Select all data by pressing the button “SelectALL”. Clear all selected data by pressing the button “ClearALL”. Delete selected data by pressing the button “DeleteSEL”. Delete unselected data by pressing the button “DeleteUNSEL”. Additional functions can be found in MENU under SELECT and FILTER submenu. 1.12.2015 Page 13 of 34 3 FIRST MEASUREMENT Each measurement should start at the CAMERA tab. Observe the camera image. Most of the image should be black, except the narrow bright stripe. This is reflection of the laser light from the measured object as the camera acquires it. This bright stripe should be located approximately in the middle of the image. That means the object is located in the center of the measuring field. What if you don’t see a bright stripe? That means that the measured object is not within the measuring field. Position the object approximately from 0.7 to 1m in front of the scanner (see Figure 12). Ensure that the laser is on (move the laser slider). Observe the image for easier positioning. MEASURING FIELD SIDE VIEW MEASURED OBJECT TOP VIEW Figure 13: Position the object approximately 0.7-1m in front of the scanner. 3.1 Selecting the exposure Carefully observe the image. If the scene in the background of the measured object is slightly visible, that means the image exposition is too long (see Figure 14-a). Decrease the exposure in small steps until the background is almost black (except the laser profile) (see Figure 14-b). Keep the gain low. The gain influences amplification of the camera electronic. When the exposure is short and gain high, a lot of image noise is present. Keep gain low. 1.12.2015 Page 14 of 34 a) Exposition is to long b) Good exposition c) Background illumination – bad arrangement Figure 14: Adjusting the camera exposure The background light interferes with profile detection and causes noise in measurement. This is especially problematic in situations where strong light sources (windows, direct sun illumination, etc) or their reflections are at the back of the measured object (see Figure 14-c). Avoid such arrangements and place the measured object in front of the uniform background (wall, parts of the furniture, etc). 1.12.2015 Page 15 of 34 3.2 Selecting the laser power Safety precaution: do not steer into a laser source when adjusting the scene! Adjust the laser power in a way that laser profile is sharp, not too bright or too dark. See examples in Figures 14. Laser plane Resulting measurement a) Laser profile is too dark Holes, dark texture b) Good illumination Texture has full gray color map c) Laser profile is too bright Noise, moiré fringes, bright texture Figure 15: Adjusting the laser power 1.12.2015 Page 16 of 34 If the laser profile is too dark, the scan has many holes. When calculating a 3D scene, a color threshold is used to remove background noise. If the color intensity is low as is the case in Figure 15-a, many points are below the threshold and are removed from the measurement. In the opposite case, when the laser profile is too bright, profile detection is not accurate, Moiré fringes are visible and the scan has a lot of background noise. In good scenario (Figure 15-b), the laser profile should have Gaussian shaped intensity distribution in direction perpendicular to the profile, with maximum values less than 255 (in case of 8 bit digitalization). The profile should have thickness of 3-5 pixels. 3.3 Measure Now proceed to the SCAN tab. Here scan angle and scan speed can be set. The scan angle influences measurement size and can be adjusted from 1-30°. Set scan speed in steps from 8 to 90. This value influences measurement resolution perpendicular to the laser plane. Scan speed is not actually speed. It defines how many steps of stepping motor (used for scanning movement) are done between each image. The camera always operates at frame rate of 65 images per second. If a higher value is set, the motion is faster, and the distances between the measured profiles are also larger. Select file path and file name BEFORE MEASUREMENT. The data will be saved to this file. -Click START. When scan is done, status line informs you about saved file name, number of acquired profiles and acquisition time. -Now proceed to the 3D IMAGE tab. Measurement is automatically loaded. Now click in the white (graphic) area and rotate data (left mouse button click + motion). As previously described, data can be cleaned and processed in 3D viewer or exported in other data formats. Supported export types: - Stanford polygon format “*.ply” - Stereo lithographic format “*.stl” - Virtual Reality Modeling Language “*.wrl” - AutoCad DXF “*.dxf” – only points. - Object file “*.obj” - 3D points and color “*.xyzb” - 3D points and color indexed “*.xyzbi” - 3D points “*.xyz” These data formats can be loaded in many powerful editors (e.g. MeshLab: http://meshlab.sourceforge.net/). Raw profiles and calibration data can also be exported in “ascii” format for custom calculation of the 3D scene. 1.12.2015 Page 17 of 34 3.4 Preparing the 3D data for CNC milling Raw measurements need preprocessing before importing in milling software e.g. CamBam, Mastercam, etc. To help beginners, we recommend the following steps: 1. 2. make good measurement; clean measurement: erase noise and unwanted objects. Use selection tools as described in “Selecting and cleaning the measurement” in Chapter 2.4.; 3. fill holes: see Chapter 2.4.; 4. position measurement in a box: see Chapter 2.4 – box group. Box shows rectangular work piece. Set the box size same or little larger than the actual work piece. Position the measurement in a box with the use of transform tools; 5. export data in ply format; 6. open data in MeshLab (see desktop icon); 7. filter the data: go to Filters/Smoothing/ and select Laplacian Smooth (surface preserve); 8. reduce the number of triangles: Filters/Remeshing and use Quadratic Edge Collapse Decimation (approx 50%); 9. export the data is stl format; 10. import the data in milling software e.g. CamBam; The data is already positioned (because of the box tool). If the triangle normals are not properly oriented, they can be inverted in MeshLab (Filters/Normals/Invert Faces Orientation) or in LT3DMS (MENU/View/Object/Invert faces orientation); 11. set milling parameters: see CamBam help; example parameters are demonstrated in the following picture: 12. -generate NC code. Short procedure: steps (1-4), (5) export the data in stl format, steps (10-12). 1.12.2015 Page 18 of 34 3.5 Measuring uncertainty Laser scanner is calibrated in MCE laboratory. Calibration data is stored in “Calibration.dat” file. Do not change this file! Measuring the uncertainty of the laser scanner is estimated as 0.65 mm. This estimation is done from the reprojection error – see figure 16. Reprojection errors [mm]: X(0.56285) Z(0.65357) 0.2 0.1 std z:0.11266[mm] 0 -0.1 -0.2 -0.3 -0.3 -0.2 -0.1 0 0.1 std x:0.092126[mm] 0.2 0.3 0.4 Figure 16: Reprojection errors. Fresh calibration is required only when the scanner was open and the optic configuration were changed e.g. rotation of the lens focus ring, any modification in laser or in reflecting mirror. For fresh calibration contact support. 1.12.2015 Page 19 of 34