3D Scanning - A New View On Things

By: B.J. Rao

Abstract: 3D scanning is the art of converting the geometric essence of tangible objects and or scenes into numerical data. Like most other vision technologies have done in the past, the impact of 3D scanning on business, industry and society can be profound. This article provides a brief overview on 3D scanning technology as well as an introduction to a new 3D scanner application called GRASP that was created with Delphi.

“Hi, we would like to 3D scan David Intersimone’s face during his upcoming visit. Is that ok?”. -David I- was going to be in town again for a “meet and greet”, something that we can all appreciate and look forward to. The response we got was; “Sounds interesting. But what does this have to do with CodeGear?”. We replied; “The app was entirely written in Delphi”.

Hide image
Click to see full-sized image

Textured 3D Scan of David I made on June 9th 2009 Brussels

3D scanning is the art of converting the geometric essence of tangible objects and or scenes into numerical data. Think of it as making a photo only now its 3D instead of just 2D. Once digitized, this data can be viewed, modified, stored and exchanged just like any other data.

Art and Applications

By today’s standards creating a 3D primitive such as a cube in a graphics program is not a big deal. But try creating something more intrinsic like a face or better yet the face of an actual person. Chances are this will not be an easy task. Fortunately, 3D scanning can offer solution here.

3D scanning is actually a part of a larger group of range mapping technologies. The techniques may differ significantly, but basically the method is to map points in 3 dimensions along the surface of an object by some or other means. The more points mapped and the greater the accuracy of each registered point the closer the resulting range map will resemble the actual object or scene. There are many techniques to choose from, each having their own merit and limitations. The idea is to choose the right technique for the job.

Today we have the technology to can scan anything from large surfaces of the earth to large molecules. And, like most vision technologies have done in the past, the impact of 3D scanning on business, industry and society can be profound. 3D scanning offers technical solution to many different industries and markets for many different reasons. Some of the better known applications are within dentistry, ear mold making for hearing aids, diamond industry, movie and gaming production, heritage and materials production (rapid prototyping, CAD, CAM, CNC). The range of applications is steadily increasing as the demand for better and faster means to capture and store real world data increases.

Interestingly, 3D scanning technology is not something new. The core technologies are typically more than 25 years old. What is new is the increasing performance of our desktop computational power, the need for more intrinsic data and the level of sophistication of API’s and development tools that allow us put our ideas into practice. Together these elements are stimulating the path towards making our cyber world more closely resemble our real world.

Range Mapping Techniques

Probably the best way to categorize range mappers is to divide them between contact and non-contact techniques. Contact type systems use a probe connected to a motion control system of some kind to touch their way over the surface of an object, registering point positions as they go along. The types of probe sensors employed differ, most are passive but some, in particular the kinds used in MEMS and Micro Systems technologies, are active probes. In this case, the idea is to mechanically vibrate the probe at a resonating high frequency. When the sensor nears the surface (micrometers) the air in between dampens the system causing the frequency to drop and when it actually semi-touches the surface the frequency crashes. 3D Point taken.

Non-contact type range mappers on the other hand can be, in special systems, nearly as accurate as the contact type although usually prone to some degree of false positive point registration. Yet, non-contact range mappers allow for magnitudes faster registration and much greater range which has greatly stimulated their development over the years. Still, these types of range mappers are complex and require that several technologies work in a harmonic fashion to produce effective results. 3D scanning typically involves high levels of processing and creates very large data sets which most always require some degree of post processing.

Probably the most popular non-contact system is the 3D laser scanner. The basic idea is to use a laser which projects a thin line of light. This line is swept over an object at a certain known angle while a camera views this scene from a known position. Each camera frame displays the laser line on the object. The laser line follows the contour of the object revealing its shape. The frames from the camera are each processed by a computer which distills the 3D point positions along the reflected laser line on the object via triangulation. A complete range map of the object is produced by sweeping the line over the entire object.

Range mappers capture 3 point positions, and these points are connected to form triangles which represent surfaces. Triangles are the building blocks of all 3D models. Each triangle also includes 1 or more normal vectors. These vectors are typically perpendicular to the triangle surface plane and are used to determine the degree of lighting/shading that the triangles will receive in relation to a virtual light source. Graphic API’s such as OpenGL allow you to visualize the triangulated rangemap in 3D in an efficient manner and well as easily handle many of the shading properties needed.

Hide image
Click to see full-sized image

Wire frame view of the connected 3D points as triangles that make up a 3D model

Development Tools

Interestingly, our company does not consist of IT people. We are precision engineers with academic and professional backgrounds in optics, mechatronics, lithography and micro systems technologies. Still, our application development takes up about 60% of our overall development time. A large chunk of this is testing and testing. New algorithms and constructs to do the same thing in a better way needed to be fully tested and examined, easily and with minimal overhead. In addition the ability to interface with OpenGL, DirectX and other 3rd party API’s, high speed bitmap processing and video processing meant that we needed a development environment that was completely versatile and in touch with the latest standards. This degree of time allocation and other requirements was foreseen from the start which made selecting the right development tool paramount to achieving success.

Despite having worked with several other development tools we quickly found ourselves using Delphi more and more. What was apparent was that it permitted us to do what we wanted the way we wanted with minimal effort, in particular, when prototyping new algorithms and interfaces. Delphi allowed us to achieve results very quickly with easy high level programming but without sacrificing the ability to dig down into low level when required. In addition Delphi had a healthy spectrum of third party component vendors as well as many more sites that supplied code examples and a very loyal and passionate following.

These days our investment in Delphi seems to be paying off. The lost terrain is being regained and the CodeGear marketing team now finally launches an offensive from the outside-in with a roadmap consisting of Mac OSX and Linux support and a 64bit version in the making. So from both a technical as well as a business point of view Delphi will soon allow us to do more and go farther, making it probably one of the best investments that we made thus far.

GRASP

The application used to scan in David Intersimone’s face is called GRASP, which is a topographical 3D laser scanner. One of the most apparent features of GRASP is that the layout requires the absolute bare minimum in hardware; a good camera, a laser line and some common materials and you are ready to start scanning. Still, 3D scanning is a bit of an art requiring a good focus on the adjustment of many parameters. GRASP makes most of the process very easy to perform with an interactive means to monitor and adjust the process.

In order to scan an object GRASP needs to understand the pose of the sweeping laser line over the object at all times during the scanning process. This is achieved using markers of known geometry and position. These are placed in the scanning scene and are illuminated by the projection device during the scan process of the object. For the 3D face scan of David I we built a self supporting marker made of 2 rectangular panels joined to form a T shaped construction. This was placed next to David I while he, patiently, sat in a chair during the scan process.

Design

Probably one of most complex and important tasks is developing your applications GUI. For a vision system such as a 3D scanner you want to make the viewing area as big as possible without compromise. But you are also faced with the fact that the user needs to adjust and maintain many parameters prior to and post scanning. Lastly, you don’t want to move too far away from contemporary design as this may confuse your users and make for an unnecessarily steeper learning curve. These requirements can be conflicting and in many cases we resorted to using floating panels and icons in an effort to meet requirements.

Floating panels are great for positioning functionality on your screen’s real estate the way you want. But it can quickly lead to congestion and many mouse clicks/drags each time you want to comfortably interact with the main viewing area. Icons are good, in particular when your app is available in many different languages. But icons, even with the helpful hints, take time getting familiar with.

Hide image
Click to see full-sized image

Hide image
Click to see full-sized image Hide image
Click to see full-sized image

The GRASP 3D Scanner GUI

For GRASP we decided not to use the contemporary main menu as well as limit the use of icons and floating panels. Instead, the GRASP GUI design uses something similar to the old Delphi VCL toolbar, but in an expanded fashion. We use a rectangular sized TPageControl at the upper region of the GUI. Each tab contains controls. Each Tab actually hosts a TFrame with controls in order to separate the Tab’s components interface from the main unit. This was extremely important when you take into account that an app like this contains many thousands of lines of code. Strong organization is a must and again Delphi provided some way to conceptualize, overview and achieve this easily using, in this case, TFrames. Above the PageControl is a button which allows the user to hide the entire PageControl and maximize the viewing area.

This simple construct made the overview, interactivity and use so much more clear and easy. What was more pleasing was when we put this to the test; new users adapted and understood how things worked very quickly. In addition we copied most of the important functions in a popup menu so that the user can work without always having to move back to the PageControl.

The Scan Process

Making a basic 3D scan as well as rendering the result is straightforward. A video camera is used to view the object that is to be scanned. The camera is set to provide a near orthographic view of the scene in order to minimize errors due to lens deficiencies. The camera is also placed sufficiently far away from the scene to allow for enough Depth Of Focus while maximizing the area of interest in the viewing field. A marker object is placed in the video scene of which the geometry and size is known. Points on the marker are selected and defined in GRASP. The marker allows GRASP to understand the pose of the laser line at each stage of the laser sweep over the marker and object. This information is needed in order to triangulate the 3D position of each registered point along the laser line during scanning. The laser line is projected onto the scene and the video brightness and contrast settings are adjusted in order to best extract the laser line. A stacked picture under normal lighted conditions is made of the scene which will serve as the color or texture of the scan. The ambient lighting is turned down to low or off and the laser is swept over the object in a docile fashion and at an angle of about 45 degrees. Video frames are grabbed and the laser line position is extracted from each frame. Points along the line are registered and are directly visible in the view panel area of GRASP. At the end of the sweep a 3D model of the object is built. This model can be directly viewed and exported to a desired file format for further processing.

Hide image
Click to see full-sized image

GUI during scan session showing main graphics window and pip of video with laser over object

3D Scanning for All

As mentioned, vision technologies such as 3D scanning relate to a very wide spectrum of applications. Yet, until recently, 3D scanning was reserved for only specialized use. The high level of complexity and processing, the large data sets and high cost of equipment made it applicable for the fortunate few. In addition, most suppliers in this arena target, for their own good reasons, the corporate level only.

Our company believes that a bottom-up approach will yield greater merit for all by focusing on “cost effective” 3D scanning solutions and services. Our mission is to make 3D scanning accessible to all, in part, by reducing cost and complexity while maintaining quality. This equals out to reducing the reliance on high cost hardware and developing more robust scanning technologies as well as allowing others to take part in the development process. We now have several patents pending for new 3D scan methods and hardware as well as distribution points in the US, Europe and Asia.

At the time of this writing (mid 2009) GRASP was still in an ALPHA state of its development. Most of the core functionality is in place but there is still a lot to complete as well as add while we work towards the BETA release. More information about GRASP and its workings can be found at the URL’s listed below.

intricad provides cost effective 3D scanning products, services and solutions.

www.grasp3d.com

www.intricad.com

Screencast of David I 3D face scan can be found at: www.grasp3d.com/video/intricad_Davidi3D_SC/intricad_Davidi3D_SC.html

Screencast of basic 3D scan process can be found at: http://www.grasp3d.com/video/saintscanrecordingx/saintscanrecordingx.html

Very special thanks to David I and Pawel Glowacki from Embarcadero Technologies as well as Mrs. Margreet van Muyden of Barnsten Business Solutions BV Netherlands.

Geometry Rendering And Scanning Program


Server Response from: ETNASC01