Connect with Facebook
Forums | Browse Members  | Artworks  | Search  |
donate    register    home    albums    wiki    groups    help    contact   

Go Back   gfx elite forums | private gfx place > 3d Graphic Forums | The 3d Discussion Forums > 3d Animation

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old March 6, 2007, 21:36
NMILIOTI's Avatar
administrator
 
Join Date: May 2006
Location: Athens Greece
Posts: 226
Thanks: 4,294,967,290
Thanked 21 Times in 12 Posts
Reputation Power: 36
NMILIOTI NMILIOTI NMILIOTI
HOWTO: Modeling using a laser and a webcam

Here I will introduce a method that is not common to many people. How about instead of modeling your model that exists
in real life like (statue, person) just scanning with a laser and see the results in your monitor via a webcam.

It’s incredible what you’ll see and read in the next lines.
So let’s begin.
What will you need?

HARDWARE
  • A webcam
  • A Laser that projects a line Caution: not point (5 millwatt gives very good results)
  • Two light colored plains that you will create
  • A printer to print the calibration pattern

SOFTWARE
  • DAVID LaserScanner (DAVID is a freeware software that allows you to scan/digitize three-dimensionals objects)
  • Geomagic Studio 8


The object you want to scan has to be put into the corner of a room or in front of two planes with an exact angle of 90°.
The camera of course has to be pointed towards the object. The special thing about our solution is that you freely hold the laser
in your hand, "brushing" the laser line over the object. Meanwhile the computer automatically calculates 3D coordinates of the scanned object surface.

First we need to create the calibration corners:
You need a Calibration Corner for calibration of the camera and as background structure during scanning.
It must consist of two plain walls / boards which stand in an angle of exactly 90°.

This example consists of two white flat plastic boards, some adhesive tape, and a printout of the calibration pattern
(choose from the Calibpoints... .pdf files that came with the DAVID software). Theoretically, you can print the pattern scaled up or down to any size.

Click the image to open in full size.

You should measure and remember the "scale" length on the printout because you will need it during camera calibration.

Click the image to open in full size.

Cut the printout at the thin line marked with a scissors symbol very precisely. In the end, it is very important that
the cut edges of the two parts precisely touch each other.

Click the image to open in full size.

Stick the printouts to the boards so that, when the board will be set up in a 90° angle, the cut edges precisely touch each other.

Click the image to open in full size.
Click the image to open in full size.

Use any precisely rectangular object to set up the two boards in a precise 90° angle. The parts of the gray coordinate system
in the lower corner must fit together perfectly! The double marker must be in the lower right corner of the pattern (from the camera's point of view)!
!!! These requirements must be met during camera calibration and scanning !!!

Click the image to open in full size.

You should glue the boards together using adhesive tape, or better, using angle brackets and screws.

Click the image to open in full size.

Using Your Room's Walls
Alternatively, you can simply use the corner of a room as long as the walls are plain, have a precise 90° angle,
and allow you to attach the calibration pattern printout(s) so that the cut edges fit together perfectly.
Remember that the double marker in the calibration pattern must be in the lower right corner (of the camera image).
Reply With Quote
  #2 (permalink)  
Old March 6, 2007, 22:13
NMILIOTI's Avatar
administrator
 
Join Date: May 2006
Location: Athens Greece
Posts: 226
Thanks: 4,294,967,290
Thanked 21 Times in 12 Posts
Reputation Power: 36
NMILIOTI NMILIOTI NMILIOTI
Camera Calibration

Before you can scan objects, you have to calibrate the camera.

The following steps will guide you through the camera calibration dialog of DAVID:

Click the image to open in full size.

A) Make sure that the camera is connected to the PC and that the camera drivers are installed.
Your camera must support WDM Video Capture Driver (i.e. DirectShow-Driver) for Windows.

B) Click on the upper rollout-box and choose your camera device . If your camera is not listed,
try to reconnect it and press the "Update List" button. After you have chosen a camera device,
a new window with a camera live view appears.

Click the image to open in full size.


C) If the standard image format (e.g. resolution or frames per second (fps)) does not match your requirements,
you can change the image format by pressing the "Change Format" button.

D) Place your camera in front of the calibration corner,
in such a way that the calibration pattern is completely visible in the camera image.
The automatic camera calibration approach needs an image with a high contrast.
(Usually the calibration points are black and the background is white.
If you have bright points on dark background, check the "Invert" option.)
To get an adequate contrast, you have to adjust the camera setting
(by pressing the "Camera Settings" button and/or switching on a light source. A perfect camera image looks like this:

Click the image to open in full size.

Besides the 25 calibration markers, there should not be any too dark objects (image areas) in the camera image!

E) OPTIONAL: Use the Eraser to improve your calibration image!
If the calibration fails in automatic mode, look at the error message. Often DAVID has found too many markers.
You can easily help DAVID by selecting the "Eraser" calibration mode. Then use your left mouse button to "clean"
the camera image from false markers (dark image areas). You can "unerase" with the right mouse button.
The following screenshots show a not-optimal calibration image where the user has erased dark areas (bright white):

Click the image to open in full size.

F) OPTIONAL ADVANCED: Manual calibration mode (not recommended)
If you have a very difficult environment where even the Eraser Mode does not help, you can define the marker positions manually.
Select the manual mode. Use your mouse to define the calibration points:
Left mouse button: Select a marker (click) or move the selected marker (click and hold).
Right mouse button: Add a new marker (behind the selected marker)
Middle mouse button: Remove selected marker.
The order (0-24) is important! It must be like shown in the following image:

Click the image to open in full size.

You must position the markers precisely in the middle of each marker.

G) Assure that the scale of your printed calibration pattern is correct.
The value in the input field labeled "Scale of calib. points" and the distance (in mm)
between the centers of two printed calibration points should match perfectly.

H) Press the "Calibrate Camera" button . If the camera calibration is successful,
you should see small red crosses in the live image, which mark the centers of the calibration points:

Click the image to open in full size.


I) If the calibration failed , first try to readjust the camera image (aperture, exposure time, light conditions).
Use the Eraser Mode to clean "dirty" areas so that the 25 markers are the only dark image elements.(see steps D and E).
The calibration failure message should help you to find the problem.


Press "Next" button to enter the scanning dialog.
Reply With Quote
  #3 (permalink)  
Old March 6, 2007, 22:45
NMILIOTI's Avatar
administrator
 
Join Date: May 2006
Location: Athens Greece
Posts: 226
Thanks: 4,294,967,290
Thanked 21 Times in 12 Posts
Reputation Power: 36
NMILIOTI NMILIOTI NMILIOTI
3D Laser Scanning

The following steps will guide you through the 3d laser scanning dialog of DAVID:

Click the image to open in full size.

A) Place the object that you want to scan between the camera and the Calibration Corner
(close to the Calibration Corner). It should be visible in the middle of the camera image.
In the left and right third of the image, the Calibration Corner must be visible:

Click the image to open in full size.

B) Switch on the laser and point it into the scene. Adjust the camera settings (aperture, exposure),
the position of the laser, and the light conditions in your room so that the laser line is clearly and brightly
visible in the image, while the rest of the image is as dark as possible:

Click the image to open in full size.

Furthermore, it is important to switch off all automatic image enhancements
(like auto-exposure, auto-gain, auto-white-balance, ...) . The light conditions in your room
should not change too much from now on!

C) Switch OFF the laser (or at least do not let it point into the scene), then press "Start"!

D) Switch ON the laser, hold it in your hand and scan the object by "brushing" the laser line over the object:

Click the image to open in full size.

Some very important tips:
  • The laser line MUST be visible on the Calibration Corner in the left and right part of the image,
    and on the object in the middle AT THE SAME TIME.
  • The distance between the camera and the laser plane (i.e. the triangulation angle) should be
    as large as possible for high precision. Otherwise, you will see a warning "INTERSECTION ANGLE TOO LOW".
  • Depending on your camera's exposure settings, you should not move the laser line too fast.
  • In the "Scan results" window, you can always see which parts of the object you have scanned,
    and where you should "brush over" again:

    Click the image to open in full size.

    The brightness of the pixels in this window is automatically adjusted; it represents the distance
    of the corresponding surface point from the camera! This distance will also be displayed
    in the "Scan results" window when you move the mouse over it (bottom of the window, "value", in mm).
  • You can scan as long and often over the object as you want. Theoretically, you can move
    your laser hand around as you wish, but practically, you may get better results
    if you try to keep it at the same position and just rotate the laser.
  • In most applications, you do not need to scan EVERY pixel (see following screenshot for a typically sufficient "Scan result"):

    Click the image to open in full size.

E) After scanning, in most cases, it is a good idea to use the Averaging and then the Interpolation filters
by pressing the corresponding buttons once. The effect of these filters may not be apparent in the
"Scan results" image, but they will be when you update the 3D view (see next step).

Click the image to open in full size.

F) To see or update the scanned object in 3D, press the "Show 3D" button.
In the 3D window, you can use the right mouse button to rotate the object.
You can also use the left mouse button to move and the mouse wheel to zoom your view.

Click the image to open in full size.

G) You can continue scanning anytime, or restart by pressing "Erase".

H) When you are satisfied, you can Export the scanned data into an .OBJ-file by pressing the "Save Mesh" button.
The Alias Wavefront OBJ format is a standard mesh format, which can be read by many 3d applications.
The 3d vertex coordinates and triangle list (indexed face set) a stored in a plain text file.
(If you need a different file format, it is possible to convert the OBJ-file using other available freeware tools.)
Reply With Quote
  #4 (permalink)  
Old March 6, 2007, 23:18
NMILIOTI's Avatar
administrator
 
Join Date: May 2006
Location: Athens Greece
Posts: 226
Thanks: 4,294,967,290
Thanked 21 Times in 12 Posts
Reputation Power: 36
NMILIOTI NMILIOTI NMILIOTI
Here are the results of scanning a statue owl.

Place the statue in 4 positions. Each position must me scanned separately.
Also take a picture (snapshot) from the camera in order to use it as a texture later. Remember that it is 1x1 the ratio for the UV Coordinates.


BACK POSITION SCANNING

Click the image to open in full size.
Click the image to open in full size.

FRONT POSITION SCANNING

Click the image to open in full size.
Click the image to open in full size.

LEFT POSITION SCANNING

Click the image to open in full size.
Click the image to open in full size.

RIGHT POSITION SCANNING
Click the image to open in full size.
Click the image to open in full size.


Each .obj has about 60.000 polygons. Don't even think to load into MAX.
As you see we produce 4 different files (.obj). The front, left, right, and back.

So, we need to collapse each side together in order to make a unique model and reduce the polygons.

You may doubt if those sides which has holes, difference results will create a good 3d model.

For this reason we will use the Geomagic Studio 8.
An awesome application for doing such things.
Reply With Quote
The Following User Says Thank You to NMILIOTI For This Useful Post:
saku0320 (March 22, 2009)
  #5 (permalink)  
Old March 13, 2007, 12:16
NMILIOTI's Avatar
administrator
 
Join Date: May 2006
Location: Athens Greece
Posts: 226
Thanks: 4,294,967,290
Thanked 21 Times in 12 Posts
Reputation Power: 36
NMILIOTI NMILIOTI NMILIOTI
Using Geomagic Studio 8

Open Geomagic Studio
File --> Import: (select all .obj from DAVID (use millimeters in prompt))

Click the image to open in full size.

Click the image to open in full size.

In your left side it will provide you with an hierarchy of the files that you have uploaded.

Here are the shortcuts:

Right-Click->Hide (to hide an object from the viewport)
Right-Click->Pin (to lock the movement of an object in the viewport)

Inside the viewport
Middle-Click: Orbit
Alt-Right-Click: Pan
Shift-Right-Click: Zoom in/Out


Hide the obj (back, right)
Select the obj left and choose Tools --> Transform --> Edit Transform...
It will show you a panel where you have to correct the position and rotation of both objects.

Click the image to open in full size.

Select "Front" and "Left" with Ctrl.
Goto Tools --> Registration --> Global Registration (Apply)
This will automatically adjust the position and rotation in more accuracy.

Right Click the "Front" and select "Pin" in order to lock the movement.
Select the "Right" and follow the same procedure to correct the position and rotation between "Right" and "Front".
Apply the Registration as above to automatically adjust in more accuracy the position.

Click the image to open in full size.

Pin the "Right" and repeat the registration for "Back" and "Right"

Click the image to open in full size.

Select all objects "Back", "Front", "Left", "Right".
Unpin all
choose Polygons --> Merge

Click the image to open in full size.

Select the following from the panel:
Local Noise Reduction: None
uncheck: Global Registration
Global Noise Reductions: None
Target Triangles: 150,000
Press the "OK" button

This will produce in hierarchy a new object with the name "Merged"
We don't want the other objects anymore. So deleted with (Right-Click->Delete for "Left", "Right", "Back", "Front")

Click the image to open in full size.

Click the image to open in full size.
Reply With Quote
  #6 (permalink)  
Old March 13, 2007, 12:33
NMILIOTI's Avatar
administrator
 
Join Date: May 2006
Location: Athens Greece
Posts: 226
Thanks: 4,294,967,290
Thanked 21 Times in 12 Posts
Reputation Power: 36
NMILIOTI NMILIOTI NMILIOTI
Now you have in hierarchy only one object.
select the "Merged" object.
select Polygons --> Decimate (to reduce the polygons)

Click the image to open in full size.

select Polygons --> Relax (to relax the surface)

Click the image to open in full size.

select Polygons --> Sandpaper (relax & clean manually)

Click the image to open in full size.

select Polygons--> Fill Holes , (select each hole seperate with the mouse and it will automatically fill the gap)

Click the image to open in full size.

Press the "OK" button

After the fill Process:

Click the image to open in full size.


Select Edit --> Phase --> Point Phase (This will convert the polygon to points)

Select Points --> Uniform Samples (This will readjust the points and will automatically edit the holes)

Click the image to open in full size.

Select Points --> Wrap (To Create the Surface)
Wrap Type: Surface

Click the image to open in full size.

Press the "OK" button

Delete the "point merged"
Reply With Quote
  #7 (permalink)  
Old March 13, 2007, 12:42
NMILIOTI's Avatar
administrator
 
Join Date: May 2006
Location: Athens Greece
Posts: 226
Thanks: 4,294,967,290
Thanked 21 Times in 12 Posts
Reputation Power: 36
NMILIOTI NMILIOTI NMILIOTI
Here is the final results:

Click the image to open in full size.

Click the image to open in full size.

The final results depends of how good you scan the model with the laser.

With bad results of scanning we have the above results.

Now,
Right-Click the obj from the left panel and select Save->Saveas: wavefront file (*.obj) or *.3ds if you haven't a lot of polygons

In 3ds Max select Import obj --> Single.

I will post later the render with texture. I will use the images that took with the camera when scanning. Remember that it holds allready the UV. It is 1:1.
Reply With Quote
  #8 (permalink)  
Old March 13, 2007, 18:56
NMILIOTI's Avatar
administrator
 
Join Date: May 2006
Location: Athens Greece
Posts: 226
Thanks: 4,294,967,290
Thanked 21 Times in 12 Posts
Reputation Power: 36
NMILIOTI NMILIOTI NMILIOTI
Software

Geomagic Studio 8

Code:
http://www.gfxelite.de/forum/showthread.php/geomagic-studio-8-17928.html
DAVID-Laserscanner 1.2
Code:
http://www.gfxelite.de/forum/showthread.php/david-laserscanner-1-2-17929.html

Note: A laser hardware costs about 100 euro in case you are interesting.
Reply With Quote
  #9 (permalink)  
Old March 17, 2007, 23:38
advanced member
 
Join Date: May 2006
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation Power: 26
speedydsl
Hello,

i have an Lasiris SNF laser with 1 Laserline and a second with 33 Laserline . Is it possible to use the 33 Laserline laser with David and inprove the result.

thanks for your efforts
Reply With Quote
  #10 (permalink)  
Old March 18, 2007, 11:38
NMILIOTI's Avatar
administrator
 
Join Date: May 2006
Location: Athens Greece
Posts: 226
Thanks: 4,294,967,290
Thanked 21 Times in 12 Posts
Reputation Power: 36
NMILIOTI NMILIOTI NMILIOTI
DAVID software reads from the webcamera the laser line. If you have 33 lines logically it will read all lines.
You may try it and post the results.
I think that in your case you will have to make less passes in your model as it will read the information from all lines.
Note: All lines (33) must be paraller.
Reply With Quote
Reply

Tags
howto, laser, modeling, webcam


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump



Club Cooee

All times are GMT +2. The time now is 11:56.


Powered by vBulletin® Version 3.8.1 and the GFX Community Copyright ©2000 - 2012, Jelsoft Enterprises Limited.

DrNoXx Special Edition | Copyright ©2006 - 2012