Build 3D Scanner System based on Binocular Stereo Vision

Similar documents
3D Scanner using Line Laser. 1. Introduction. 2. Theory

PHOTOGRAMMETRIC TECHNIQUES FOR MEASUREMENTS IN WOODWORKING INDUSTRY

MassArt Studio Foundation: Visual Language Digital Media Cookbook, Fall 2013

Super-resolution method based on edge feature for high resolution imaging

An Experimental Study on Pixy CMUcam5 Vision Sensor

A Method of Caption Detection in News Video

Face detection is a process of localizing and extracting the face region from the

Self-Calibrated Structured Light 3D Scanner Using Color Edge Pattern

Manufacturing Process and Cost Estimation through Process Detection by Applying Image Processing Technique

ENGN D Photography / Winter 2012 / SYLLABUS

Lecture 12: Cameras and Geometry. CAP 5415 Fall 2010

Algorithm for License Plate Localization and Recognition for Tanzania Car Plate Numbers

Modelling, Extraction and Description of Intrinsic Cues of High Resolution Satellite Images: Independent Component Analysis based approaches

Medical Image Segmentation of PACS System Image Post-processing *

Digital Imaging and Multimedia. Filters. Ahmed Elgammal Dept. of Computer Science Rutgers University

The Role of Size Normalization on the Recognition Rate of Handwritten Numerals

How To Filter Spam Image From A Picture By Color Or Color

Canny Edge Detection

Building an Advanced Invariant Real-Time Human Tracking System

VECTORAL IMAGING THE NEW DIRECTION IN AUTOMATED OPTICAL INSPECTION

Poker Vision: Playing Cards and Chips Identification based on Image Processing

Analecta Vol. 8, No. 2 ISSN

BCC Multi Stripe Wipe

Circle Object Recognition Based on Monocular Vision for Home Security Robot

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

A System for Capturing High Resolution Images

Method of Mesh Fabric Defect Inspection Based on Machine Vision

JPEG compression of monochrome 2D-barcode images using DCT coefficient distributions

How To Fix Out Of Focus And Blur Images With A Dynamic Template Matching Algorithm


An Iterative Image Registration Technique with an Application to Stereo Vision

An Efficient Geometric feature based License Plate Localization and Stop Line Violation Detection System

Scanners and How to Use Them

Shape Measurement of a Sewer Pipe. Using a Mobile Robot with Computer Vision

5.5. Solving linear systems by the elimination method

LIST OF CONTENTS CHAPTER CONTENT PAGE DECLARATION DEDICATION ACKNOWLEDGEMENTS ABSTRACT ABSTRAK

Cloud tracking with optical flow for short-term solar forecasting

Terrain Traversability Analysis using Organized Point Cloud, Superpixel Surface Normals-based segmentation and PCA-based Classification

Automatic Labeling of Lane Markings for Autonomous Vehicles

Geometric Camera Parameters

Palmprint Recognition. By Sree Rama Murthy kora Praveen Verma Yashwant Kashyap

Overview Image Acquisition of Microscopic Slides via Web Camera

Signature Region of Interest using Auto cropping

Virtual Fitting by Single-shot Body Shape Estimation

INTRODUCTION TO RENDERING TECHNIQUES

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

Navigation Aid And Label Reading With Voice Communication For Visually Impaired People

Three-dimensional vision using structured light applied to quality control in production line

CS635 Spring Department of Computer Science Purdue University

Computational Foundations of Cognitive Science

Mouse Control using a Web Camera based on Colour Detection

Locating and Decoding EAN-13 Barcodes from Images Captured by Digital Cameras

How an electronic shutter works in a CMOS camera. First, let s review how shutters work in film cameras.

Klaus Goelker. GIMP 2.8 for Photographers. Image Editing with Open Source Software. rocky

Synthetic Sensing: Proximity / Distance Sensors

An Energy-Based Vehicle Tracking System using Principal Component Analysis and Unsupervised ART Network

3D SCANNING: A NEW APPROACH TOWARDS MODEL DEVELOPMENT IN ADVANCED MANUFACTURING SYSTEM

REAL TIME TRAFFIC LIGHT CONTROL USING IMAGE PROCESSING

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

Announcements. Active stereo with structured light. Project structured light patterns onto the object

Saving Mobile Battery Over Cloud Using Image Processing

Arrangements And Duality

USING THE XBOX KINECT TO DETECT FEATURES OF THE FLOOR SURFACE

Measuring Line Edge Roughness: Fluctuations in Uncertainty

DAMAGED ROAD TUNNEL LASER SCANNER SURVEY

Implementation of Canny Edge Detector of color images on CELL/B.E. Architecture.

How To Fuse A Point Cloud With A Laser And Image Data From A Pointcloud

3D Position Tracking of Instruments in Laparoscopic Surgery Training

Automatic Traffic Estimation Using Image Processing

Morphological segmentation of histology cell images

Bildverarbeitung und Mustererkennung Image Processing and Pattern Recognition

Database Modeling and Visualization Simulation technology Based on Java3D Hongxia Liu

Low-resolution Character Recognition by Video-based Super-resolution

Geometric Optics Converging Lenses and Mirrors Physics Lab IV

Definition 8.1 Two inequalities are equivalent if they have the same solution set. Add or Subtract the same value on both sides of the inequality.

A Method for Controlling Mouse Movement using a Real- Time Camera

Real-time 3D Scanning System for Pavement Distortion Inspection

Automotive Applications of 3D Laser Scanning Introduction

Assessment. Presenter: Yupu Zhang, Guoliang Jin, Tuo Wang Computer Vision 2008 Fall

Solving Systems of Linear Equations Using Matrices

ROBOTRACKER A SYSTEM FOR TRACKING MULTIPLE ROBOTS IN REAL TIME. by Alex Sirota, alex@elbrus.com

Understanding Line Scan Camera Applications

Computer vision. 3D Stereo camera Bumblebee. 25 August 2014

Introduction to GIS (Basics, Data, Analysis) & Case Studies. 13 th May Content. What is GIS?

DYNAMIC RANGE IMPROVEMENT THROUGH MULTIPLE EXPOSURES. Mark A. Robertson, Sean Borman, and Robert L. Stevenson

A Comprehensive Set of Image Quality Metrics

Application of Face Recognition to Person Matching in Trains

A Study on M2M-based AR Multiple Objects Loading Technology using PPHT

Graphical Integration Exercises Part Four: Reverse Graphical Integration

10.1. Solving Quadratic Equations. Investigation: Rocket Science CONDENSED

Using MATLAB to Measure the Diameter of an Object within an Image

Investigation of Color Aliasing of High Spatial Frequencies and Edges for Bayer-Pattern Sensors and Foveon X3 Direct Image Sensors

Relating Vanishing Points to Catadioptric Camera Calibration

3D MODEL DRIVEN DISTANT ASSEMBLY

Copyright 2011 Casa Software Ltd. Centre of Mass

Computer Graphics and Image Processing Introduction

DEVELOPMENT OF HYBRID VECTORIZING SOFTWARE FOR DIGITIZATION OF CADASTRAL MAPS

Correcting the Lateral Response Artifact in Radiochromic Film Images from Flatbed Scanners

Chapter 2 The Research on Fault Diagnosis of Building Electrical System Based on RBF Neural Network

A technical overview of the Fuel3D system.

Transcription:

JOURNAL OF COMPUTERS, VOL. 7, NO., FEBRUARY 01 399 Build 3D Scanner System based on Binocular Stereo Vision Zhihua Lv College of Information Engineering, Northwest A&F University, Yangling, 71100, China Email: phantomtyry@16.com Zhiyi Zhang* College of Information Engineering, Northwest A&F University, Yangling, 71100, China Email: zhangzhiyi@nwsuaf.edu.cn Abstract This paper presents such a low-cost and simple 3D Scanner System. The necessary hardware is a hand-held line laser and two same standard cameras. The System can obtain 3D information of object and importantly this method is simple and effective. So it is very easy-to-use, and the results can be satisfied for normal users. Index Terms scanner, binocular stereo vision, pinhole camera model, Sobel Operator I. INTRODUCTION The 3D Scanner is a device which can obtain the 3D information of object or scene. The purpose of a 3D scanner is usually to create a point cloud of geometric samples on the surface of the subject [1]. These points can be processed and reconstructed the shape of the object. If color information of each point is also able to be collected, the surface of the object which has colors can be reconstructed. The result called three dimensional models. There are a lot of methods for obtaining the 3D information of objects. According to different methods, it is usually divided into two types: contact and non-contact 3D scanners [1]. Contact 3D scanners need physical touch to get the 3D information. They usually has high precise. But they often need a long time to scan and it may damages the scanned object. Non-contact 3D scanners usually uses laser or structured lighting [] to irradiate an object and get its reflection to calculate the 3D information. Compare to contact 3D scanner, its scanning is fast, its operation is simple, more importantly, it will not damage the scanned subject. But the disadvantage is that it maybe not precise. There are a lot of methods can finish 3D scanning. Each method has its different limitations, advantages and costs. The paper proposes a non-contact and low-cost 3D laser scanner system. This process will involve many technologies such as that how to make cameras able to get images, camera calibration, image processing, getting the center line from image and so on. But it is not necessary to discuss all technologies in this paper. In this system the necessary hardware is a hand-held line laser and two standard cameras. Two cameras are put at a straight line and they can't be moved when scanning. And the line laser irradiates an object vertically. Two images can be respectively got by using two cameras. There is a laser line in each image at the same time. With the position of laser line in two images, we can calculate the real position of points that lying on the laser line. By moving the laser like a paintbrush, the 3D data of the object are acquired until the scan results are smooth or satisfied for users. II. THE PRINCIPLE OF BINOCULAR STEREO VISION Binocular stereo vision is a way of getting 3D information from two D images. As we all know, the pinhole camera model how 3D scene points are transformed into D image points. The pinhole camera is a simple linear model for perspective projection as shown in Figure 1. Figure 1. Pinhole camera model In Figure 1, C, D points and A, B points can be constituted a straight line respectively. And two lines have a intersection. In this model, the obtained images are inverted images. In other words, the object image is upside down. In order to make problem convenient, the pinhole and the image plane can be swapped as shown in Figure [3]. doi:10.4304/jcp.7..399-404

400 JOURNAL OF COMPUTERS, VOL. 7, NO., FEBRUARY 01 And by the equation of the O 1 P 1 straight line in equation (1), the P(X,Y,Z) can be presented as following equation (3): Figure. Swap pinhole and image plane As shown in Figure 3, set up a coordinate system. The left camera is at the origin of coordinates and the right camera is at the x-axes. The y-axes take the downward direction as positive. Two cameras look toward the positive direction of z-axes. P 1, P are the P in left, right camera on the imaging point, respectively. L is the distance of two cameras. Figure 3. Binocular Stereo Vision O 1, O are at the x-axes, and the two cameras are the same type. We can know Y 1 = Y easily. In other words, O 1 P 1 and O P are on the same plane so that they have an intersection. In Figure 3, the intersection is point P. By mathematical relations, the equation of two straight lines is: X Y Z O1P1 : = = = t X 1 Y1 Z1 X L Y Z O P : = = = s X L Y Z (1) Our target is to calculate the coordinate of point P. It is necessary to know the value of t or s. By equation (1), the value of t can be calculated as following: YL t = X1Y X Y1 + LY1 () X = X 1t Y = Y1t Z = Z1t (3) From equation () and (3), the coordinate of point P can be calculated. III. TECHNICAL SCHEME The binocular stereo vision system is usually divided into five parts: Image Acquisition, Camera Calibration, Image Pre-processing and Feature Extraction, Stereo Matching, Distance Determination [4][5][6]. These five parts have their main influencing factor and technique respectively. Every part can use different methods. In order to make problem simple, in this paper, we divide system into four parts: Image Acquisition, Getting Necessary Parameters of Cameras, Image Pre-processing and The Center of Line Structure Laser Extracting, Points Matching and Distance Determination. These four parts use these names which are easier to be known. Because some parts of this system are not so complicated as usually. A. Image Acquisition Acquiring D image is the first step to obtain the 3D information of an object in stereo vision. The result is more precise with the higher resolution of image. But the higher resolution image will cost much time so that making the system slow. In this paper, the 30 * 40 size images are used for scanning. But in practical application, 640 * 480 size images at least are necessary. If the system wants to adapt to complex environment, it needs to modify the acquiring images with some image property such as brightness, contrast, sharpness and so on. In this system, two cameras are put at a straight line as shown in Figure 3. The distance can be known by measuring. B. Getting Necessary Parameters of Cameras In general, a 3D scanner system needs very complex calibration. More importantly, this work needs user to complete, but user often cannot finish it. So we want to simplify this process as possible. As shown in Figure 3, we know that the necessary parameters are the distance of two cameras and the focal length of cameras. Z 1, Z are equal to focal length. The distance of two cameras can be known easily. In general, we set this parameter to 5cm 10 cm. Next is surveying focal length. Many cheap cameras have a fixed focal length and we can know it directly. If the camera has automatic focus, we need to survey it. In this paper, the method of surveying focal length is not discussed. C. Image Pre-processing and The Center of Line Structure Laser Extracting The images from cameras include a variety of noise and distortion. In order to highlight useful information and limit useless information, it is necessary to

JOURNAL OF COMPUTERS, VOL. 7, NO., FEBRUARY 01 401 preprocess the original image. There are two purposes. Firstly, improve the definition of images. Secondly, make images more easy to process by computer and convenient for feature analysis. In general, the scanned subject only has about 1/3 in the image. So it is necessary to limit the scanning range. It can improve the scanning speed. More importantly, we can eliminate the background effectually. The simple method is to draw a rectangle in the image. We consider that out of rectangle is background. The laser provides a sharp contrast to the environment. But it is also difficult to find out which pixel is the laser and which pixel is the background in two images. Here we provide two methods to get the center of line structure laser. The two methods have a common step, convert image to grayscale. The source image is 3-channels (RGB), and it needs to be converted to 1-channel. It can use the average value of R, G, B to instead of every pixels. 1) Simple Method: The first method is simple and fast, but precise is low. Image Binarization is typically a thresholding operation on a grayscale image. The thresholding is given by user when scanning. If a pixel value is greater than the thresholding, it will be set to max-value, or be set to zero. After binarization, the max-value pixels can be considered as the laser line. But the laser has width and only the center line is necessary. As shown in Figure 4, with scanning every row of an image as the red arrow, the left boundary and right boundary of can be obtained. Then it can be considered that the true center is close to this rough center. Because the rough center is not precise, there are many methods to find it. This paper provides a simple method [7]. As shown in Figure 5, the red (high color) is a 1*3 size mask. To every row, the mask move from left to right and calculate the sum of pixel value. And the max sum place can be found out. Then the middle of this place can be consider as the rough center. But it is also possible that there is not laser line at a row. So user can give a thresholding. Only if the center pixel value of the window is greater than the thresholding, it can be consider as the rough center. Figure 5. The red is the window to find rough center b) Find the left boundary and right boundary with sobel operator: The ideal laser line is a gaussian distribution in a row. Next problem is how to find a range and the pixel values in this range are the most possible to reflect the Gaussian Distribution. This paper uses the sobel operator to find boundary. The Sobel Operator is used in image processing, particularly within edge detection algorithms [8]. 1 0 + 1 1 1 0 + 0 0 0 1 0 + 1 + 1 + + 1 Figure 6. The left is vertical operator, the right is horizontal operator [9] Since all laser lines are vertical in this paper, the vertical operator is used to calculate the boundaries. If the laser lines are horizontal on images, we can use the horizontal operator. At (a) step above, the rough center has been found out. As shown in Figure 7, w is a half of range. In general, w can be 15 (pixels). Then in this range, from left to right, every pixel is calculated by vertical Sobel Operator. Figure 4. Simple Method to find the center of laser line L is the left boundary, and R is the right boundary. The center of line can be calculated as equation (4). It is easily to be known that the result is an integer or a half of an integer. So it is not precise. L + R C = (4) ) The Center-of-Gravity Method based on Sobel Operator: The second method can get higher precise, but will reduce the speed. This method is divided into three steps as following: a) Roughly find the center: In order to know the precise center, the first step is to find a rough center. Figure 7. The range of using Sobel Operator As shown in Figure 8, it s a pixel matrix. Every element is the pixel value. The middle element is present element. From this matrix and vertical Sobel Operator, the result can be presented as following equation (5). lu u ru l m r ld d rd Figure 8. Example ( ru + rd lu ld ) + ( r l) S = (5)

40 JOURNAL OF COMPUTERS, VOL. 7, NO., FEBRUARY 01 In equation (5), S can be considered as the rate of pixel change. Here a thresholding is necessary. In the range of using Sobel Operator, the leftmost place that S is greater than the thresholding is the left boundary, and the rightmost place is the right boundary. c) Calculate the center with the Center-of-Gravity Method [10]: The left boundary and right boundary has been known in every rows. The precise center is calculated as following equation (6): C = rp i= lp Pi N Ni (6) D. Points Matching and Distance Determination At this step, the first problem is how to find matching points. This problem has been argued over several decades in computer vision. It is the most important part in stereo vision. In general, this problem is very complex. In this paper, we simply this process. It is the reason why we put two cameras at the same line(x-axes). As shown in Figure 3 and mentioned above, Y 1 = Y. And the line laser irradiates the object vertically. As a result, a point in left image and the matching point in right image are at the same line in the image array. As shown in Figure 9, the point (1, 3) in left image is matching the point (1, 4) in right image. Figure 9. The green is laser line, the red is the center line In the Figure 10, u-axes and v-axes are the coordinate system of image. Left image and right image has this coordinate system, respectively. L is the distance of two cameras. In order to use equation (1)()(3) for calculating 3D information, it is necessary to transform D coordinate to 3D coordinate in space coordinate system. As shown in Figure 5, our purpose is to transform P 1 (U 1, V 1 ) and P (U, V ) into P 1 (X 1, Y 1, Z 1 ) and P (X, Y, Z ) in Figure 3. i Figure 10. -Dimensional points coordinate Transforming coordinate between D and 3D is a problem of linear algebra obviously. In following is the convert equation: w 1 0 X 1 U 1 (7) h = Y1 0 1 V1 Z 0 0 1 1 f w 1 0 + L X U (8) h = Y 0 1 V Z 0 0 1 f In equation (7) and (8), w is the width of image, h is the height of image. Then the 3D coordinate of P 1, P can be known. And as equation (1)()(3), the coordinate of P point can be calculated. By moving the laser, two cameras are able to get images continuously. Then the 3D data can be calculated until the scan results are satisfied by users. IV. EXPERIMENTAL RESULTS AND CONCLUSION The programs of this system are all developed in Qt Creator environment. The used library includes OpenCV and OpenGL. The two cameras are Logitech QuickCam Pro 9000. The laser is green. The computer is Pentium(R) Dual-Core CPU T4300 @.10GHz. Figure 11. The result of Getting center line

JOURNAL OF COMPUTERS, VOL. 7, NO., FEBRUARY 01 403 Figure 1. The result of Getting center line Figure 17. The result of the dinosaur model Figure 13. The result of Getting center line Figure 18. Scanning a cup Figure 14. The hardware Figure 15. Limit the scanning range by rectangle Figure 19. The result of the cup Figure 16. Image binarization From Figure 11 to Figure 13 shows the result of getting the center line. It using the Center-of-Gravity Method based on Sobel Operator. According to this result, we can know that the result is satisfied. Figure 14 shows the hardware of 3D scanner system. Figure 15 shows the images which limit the scanning range. Figure 16 shows the result of image binarization. Figure 17 shows the scanning result of the dinosaur model. Figure 18 shows another experiment which is scanning a cup. Figure 19 shows the scanning result of the cup model.

404 JOURNAL OF COMPUTERS, VOL. 7, NO., FEBRUARY 01 The scanning time is about 10-0s. As shown in Figure 17 and Figure 19, one side of the dinosaur model and cup model can be reconstructed. And the 3D laser scanner doesn t need complex calibration. According to the experimental result, we can know this method can reconstruct the 3D model basically. And the precision can be satisfied by normal users. In order to get better precision, there are two methods. A method is making environment black as possible when scanning. It will make laser and background more contrast. In image preprocessing, the results will be better. Another method is increasing the resolution of images. It will make images have more particulars of object so that the result model has more points. ACKNOWLEDGMENT This work was supported by the Scientific Research Foundation from Northwest Agriculture & Forest University of China No. Z1110071, the Special Fund from the Central Collegiate Basic Scientific Research Bursary No. Z10901004, Scientific Research Foundation for the Returned Overseas Chinese Scholars, State Education Ministry No. K31400901 and China National Undergraduates Innovating Experimentation Projection. Zhihua Lv GuangXi Province, China. Birthdate: Dec, 1989. is undergraduate in College of Information Engineering, Northwest A&F University. And research interests on Computer Graphics and Digital Image Processing. He is a junior student of College of Information Engineering, Northwest A&F University. Zhiyi Zhang ShanXi Province, China. Birthdate: Sep, 1974. is Electronic and Information Engineering Ph.D., graduated from Faculty of Engineering, Graduate School of Engineering Iwate University, Japan. And research interests on Computer Aided Design, Computer Aided Geometric Design, Computer Graphics. He is a associate professor of College of Information Engineering, Northwest A&F University. REFERENCES [1] http://en.wikipedia.org/wiki/3d_scanner [] Douglas Lanman, Gabriel Taubin: "Build Your Own 3D Scanner: 3D Photography for Beginners", SIGGRAPH 009 Course Notes, Wednesday, August 5, 009. [3] Gary Bradski, Adrian Kaebler, "Learning OpenCV - Computer Vision with the OpenCV Library", September 008: First Edition. [4] Ramesh.C.Jain, Thomas.O.Binford, "DIALOGUE Ignorance, Myopia, and Naivete in Computer Vision System", Vol. 53, No. 1, Jan, pp, 11-117, 1991 [5] Ron Mcclamrock, "Marr's Three Levels: A Re-Evaluation, Minds Mach", Vol.1, No., pp. 185-196, 1991 [6] Ling Li, "The research on 3-Dimensional reconstruction based on binocular stereo vision", Master, thesis, 005 [7] Wu Jiayong, Wang Pingjiang, Chen Jihong, Wu Mengliang, " Method of Linear Structured Light Sub-pixel Center Position Extracting Based on Gradient Barycenter", Journal of Image and Graphics, Jul. 009. 1006-8961(009)07-1354-07 [8] http://en.wikipedia.org/wiki/sobel_operator [9] Xiong Huiyuan, Zong Zhijian, Gao Qun, Chen Chenghe, "Precise method for extracting center of structured light stripe", Computer Engineering and Applications, 009, 45(10): 35-37 [10] Li Zhongwei, Wang Congjun, Shi Yusheng, "An Algorithm for Detecting Center of Structured Light Stripe Combining Gradient Sharpening with Barvcenter Method", Journal of Image and Graphics, 1006-8961(008) 01-0064-05