Download presentation
Presentation is loading. Please wait.
Published byRose Stephens Modified over 7 years ago
1
Project Splinescan Open Source 3D Scanning for Everyone Andrew Lewis, 2006 ** Released Under Creative Commons **
2
Introduction ● What is Project Splinescan? – 3D Scanner Toolkit – Platform Independent (MacOS/Win32/Linux) – Open-source – GPL ● Splinescan is NOT a 3D Scanner – Many 3D Scanners Already – Some Expensive, Some Cheap – 3D Scanning Technology is Well Established in Industry
3
3D Scanning Hardware ● Large number of devices in the wild:
4
Splinescan in Detail ● Software Toolkit for: – Fixed Sensor – Non-Contact (aka. Passive) – Visible Laser Line 3D Scanning ● Facilities for: – Computer Control or Time-Based Analysis – Linear or Rotary Target Motion – Single or Multiple Laser Emitters – Client / Server Interfacing
5
Useful OSS Tools ● Coding: – Python ● Python Imaging Language ● Numerical Python ● PySerial and PyParallel ● Blender API – Perl – Bluefish HTML & PHP – QT/PyQT – C
6
Useful OSS Tools ● Visualisation: – Blender ● Blender API for Script-Fu ● Converts Different Formats ● Has Animation Support – OpenDX – Gimp ● Other Tools – Linux – The Free Operating System – Streamer / VirtualDUB – XAMPP
7
A Typical Rotary Scanning Rig
8
Laser Emitters Camer a Clien t Serve r Jac k Turntab le
9
Client / Server Technology ● Server: – Carries out Processing / Motor Control – Can be Remotely Located – Can Support Multiple Access – Win32/Linux/OSX ● Client: – HTML based GUI or SSH Connection – Platform Independent – Can be on Same Machine as Server
10
Framework Example Graphical Interface Physical Storage Control Script Imag e Capt ure Line Detecti on Hole Fillin g Mesh Generati on Log Files
11
Server Side Technology ● Language Independent – Generally Interpreted (python/perl/java) – Compiled is OK, too (Streamer/Virtualdub) – SSH Server – Apache Webserver (XAMPP Platform) ● Pathways and Filters – Filter: A small application that performs a specific task – Pathway: A route through the filters from input ---> output
12
How Does it Work? Input Raster Data ● Captured Sequence: – Known Order – One Revolution – Colour images – Evenly Lit – Fixed Laser Position – Known COR ● Mathematically: – Matrix of [x,y,c] tuples – Stored as ordered set
13
Basic Algorithm: Finding the Laser Line ● Many Possible Options – Chroma or Luminosity based – Contrast, Range or Threshold – Inner Edge, Outer Edge, Mean ● Many Different Implementations – Brute Force – Line / Edge Following – Hybrid Methods
14
Basic Algorithm: Finding the Laser Line ● Many Possible Options – Chroma or Luminosity based – Contrast, Range or Threshold – Inner Edge, Outer Edge, Mean ● Many Different Implementations – Brute Force ● Left to Right,Top to Bottom ● Inefficient ● Thorough
15
Basic Algorithm: Finding the Laser Line ● Many Possible Options – Chroma or Luminosity based – Contrast, Range or Threshold – Inner Edge, Outer Edge, Mean ● Many Different Implementations – Line/Edge Following ● Scan area near line or edge ● Fast ● Problems with broken lines ● Needs a starting point
16
Basic Algorithm: Finding the Laser Line ● Many Possible Options – Chroma or Luminosity based – Contrast, Range or Threshold – Inner Edge, Outer Edge, Mean ● Many Different Implementations – Hybrid Methods ● Combine Multiple Approaches ● Compromise - Speed Vs. Efficiency ● Can be Tailored to Specific Applications ● Google “Line Detection Algorithms”
17
How Does it Work? Initial Processing – For each Y position ● Find the laser line ● Measure distance from COR ● Store X for each Y ● Repeat for each image X Y – Distortion ● Problem: Laser is at an angle ● Result: X value is incorrect ● Solution: Distortion is Uniform, correct it later with an anamorphic transform.
18
How Does it Work? Making 2D into 3D ● We have a stored X value for each Y position in every image ● The first step is to take the 2D line data and revolve it around the y-axis to generate a 'cage' – Basic 3D Rotation around Y axis: ● Y = y ● X = z(sin(r)) + x(cos(r)) ● Z = z(cos(r)) - x(sin(r)) note: r = angle of rotation around the y-axis =(360/NumImages)ImageNum
19
How Does it Work? Speeding up the Process ● We can do something quite clever here. – The scanner always starts with a 2D image – FOR EACH CASE: z = 0 ● The formula gets even more basic: – X = 0(sin(r)) + x(cos(r)) ---> X = x(cos(r)) – Z = 0(cos(r)) - x(sin(r)) ---> Z = -x(sin(r))
20
How Does it Work? Generating Meaningful Output ● We have a basic [x,y,z] matrix (aka. 'point cloud') for the object ● Model may be incomplete: – Missing Data (occlusion, reflection, transparency) – Noise (laser speckle, lighting, surface texture, interlacing) – Distortion (camera pitch, camera roll, optics, bad COR) ● Improvements: – Point Cloud is not much use – there is no surface attached to it – Try to fix missing data, noise, distortion, etc....
21
Noise and Occlusion Oscillation on Y axis Laser Speckle Occlusion Interlaced Source Footage Variable Lighting
22
Recovering Missing Data Noise ● Occurs when an undesirable effector distorts raw data ● Laser speckle – A quantum effect, best handled with time-space analysis – Requires multiple revolutions when not using motor control ● Reflection/Refraction – Chalk dust or poster paint can minimise the effect ● Other effects – Interlacing can be removed with de-interlace filters – Different laser frequencies can sometimes help (green/red)
23
Recovering Missing Data Occlusion ● Occurs when a prominence obscures part of laser line ● Angle of laser relative to object can reduce this effect ● A contralateral laser will also minimise this problem ● A hole in the [x,y] data – Treatment depends on magnitude of hole in 2D and 3D – Small holes can be 'smoothed out' with averaging – Large Holes can be solved as equations in 3D – Some meshing algorithms deal with this automatically – Vectorising laser line ???
24
Recovering Missing Data Distortion ● Occurs when a rigging is misconfigured ● Distortion is usually uniform ● Can be fixed ● Better to fix hardware and then rescan
25
Generating a Mesh ● Point cloud is disparate, it has no surfaces defined: – Can not be textured – Can not be 'closed' – Has no integumentary boundaries ● Mesh algorithms create a surface – Too many algorithms to explore in 12 lectures – Meshing is a 'Hot Topic' in computer graphics – Sometimes erroneously called a 'triangulation algorithm'
26
Basic Algorithm: Voronoi Diagram ● The voronoi diagram encapsulates each point from the cloud into a polygon called a Dirichlet region – Each region contains only one point – Each region is closer to its own generator point than any other point on the surface – A Voronoi diagram is associated with 2D not 3D ● A Voronoi diagram is sometimes called a Dirichlet Tesselation – The tesselation pattern is closely linked to Delaunay Triangulation Images from: Eric W. Weisstein. "Voronoi Diagram." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/VoronoiDiagram.htmlMathWorld http://mathworld.wolfram.com/VoronoiDiagram.html
27
Basic Algorithm: Delaunay Triangulation ● Very simple instructions – Join the points into triangles – The Circumcircle of each triangle should be empty ● Simple theory: Complex implementation – Brute force approach is inefficient – Dozens of implementations – Simpler to implement for regular data – Google 'delaunay algorithm' Images from: Eric W. Weisstein. "Voronoi Diagram." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/VoronoiDiagram.htmlMathWorld http://mathworld.wolfram.com/VoronoiDiagram.html
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.