3D from Photographs: Introduction Dr. Gianpaolo Palma - - PowerPoint PPT Presentation

3d from photographs introduction
SMART_READER_LITE
LIVE PREVIEW

3D from Photographs: Introduction Dr. Gianpaolo Palma - - PowerPoint PPT Presentation

3D from Photographs: Introduction Dr. Gianpaolo Palma gianpaolo.palam@isti.cnr.it 3D from Photographs 3D from photographs is a technology that allows us to do a 3D reconstruction of a real-world scene starting from a set of photographs as


slide-1
SLIDE 1

3D from Photographs: Introduction

  • Dr. Gianpaolo Palma

gianpaolo.palam@isti.cnr.it

slide-2
SLIDE 2

3D from Photographs

  • 3D from photographs is a technology that allows us to

do a 3D reconstruction of a real-world scene starting from a set of photographs as input.

  • We can see it as an alternative to 3D scanning but it

has some important issues:

  • It is not MEASURING tool!
  • We cannot know the result of a 3D reconstruction

beforehand.

slide-3
SLIDE 3

3D from Photographs

  • Advantages:
  • Fully automatic process.
  • Faster for creating models than modeling (e.g.

AutoCAD, Rhinoceros, etc.).

  • Good scalability: from tiny (e.g., a toy) to large models

(e.g., an entire city).

  • Unskilled users can create 3D models.
  • Economically cheap; i.e., a digital camera.
slide-4
SLIDE 4

3D from Photographs

  • Disadvantages:
  • Accuracy may be low; it can be improved with

expensive set-ups.

  • Some real-world objects cannot be captured.
  • A generated 3D model may not match ground

truth due to skew.

slide-5
SLIDE 5

3D from Photographs

  • The 3D model is generated using automatic

Computer Vision techniques.

  • The process has three main steps.
slide-6
SLIDE 6

3D model

3D from Photographs

Automatic Matching of Images

Camera Calibration Dense Matching

Photographs

Surface Reconstruction

slide-7
SLIDE 7

3D model

3D from Photographs

Automatic Matching of Images

Camera Calibration Dense Matching

Photographs

Surface Reconstruction

slide-8
SLIDE 8

Automatic Matching of Images

  • The entire process is based on finding matches

between images.

  • This means that you have to shoot pictures not too

far apart, so that the algorithm can match them easily.

slide-9
SLIDE 9

Automatic Matching of Images

  • For any object in an image, “interesting points” (or

corners) on the object can be extracted to provide a “feature description” (or descriptor) of the corner.

  • A descriptor of an object corner (extracted from an

image) can be employed to locate the object in another image containing many other objects.

slide-10
SLIDE 10

Automatic Matching of Images

slide-11
SLIDE 11

Automatic Matching of Images

slide-12
SLIDE 12

Automatic Matching of Images

slide-13
SLIDE 13

3D model

3D from Photographs

Automatic Matching of Images

Camera Calibration Dense Matching

Photographs

Surface Reconstruction

slide-14
SLIDE 14

Camera Calibration

  • No prior knowledge about camera calibration is available.
  • All information must be recovered from photographs.

  • It is crucial that we have enough information in photographs.

  • Important factors:
  • Motion of the camera
  • General structure of the scene
  • Enough overlap: only points that are visible in at least three

images are useful.

  • Note that what you want reconstruct and how you get the

photographs have great influence on the final reconstruction!

slide-15
SLIDE 15

Camera Calibration

PhotoTourism: having a set of (even heterogeneous) photographs, you can navigate the photo collection in a “spatially coherent” way.

slide-16
SLIDE 16

Camera Calibration

PhotoCloud is the Italian alternative to PhotoTourism made by CNR-ISTI. It requires a 3D model.

slide-17
SLIDE 17

3D model

3D from Photographs

Automatic Matching of Images

Camera Calibration Dense Matching

Photographs

Surface Reconstruction

slide-18
SLIDE 18

Dense Matching

  • After recovery of the camera calibration, we can compute

dense depth maps:

  • We need a pair of images for each depth map.
  • These contain the depth of every pixel and a quality

measure (how confident we are of each particular pixel).

slide-19
SLIDE 19

Dense Matching

Depth Map Input

slide-20
SLIDE 20

3D model

3D from Photographs

Automatic Matching of Images

Camera Calibration Dense Matching

Photographs

Surface Reconstruction

slide-21
SLIDE 21

Surface Reconstruction

Final 3D Model Dense Point Cloud

  • To compute an unique 3D surface by integration of the

all the depth maps of each image:

slide-22
SLIDE 22

Back to the Camera Model

slide-23
SLIDE 23

Camera Model: Image Formation

~ l x ~ nx Real-world Camera Light

slide-24
SLIDE 24

Camera Model: Image Formation

~ l x ~ nx Real-world Camera Light

slide-25
SLIDE 25

Camera Model: Image Formation

~ l x ~ nx Real-world Camera Light

slide-26
SLIDE 26

Camera Model: Pinhole Camera

world-space image-space

Yc Xc Zc f

Image Plane Hole

Yw Xw Zw

C

slide-27
SLIDE 27

Camera Model: Pinhole Camera

Yc Xc Zc f

Image Plane Hole

u v

C c0

slide-28
SLIDE 28

Camera Model: Image Plane

u v c0 = [u0, v0]> = C0

  • Pixels have different height and width; i.e., (ku, kv).
  • c0 is called the principal point.
  • The image plane has a finite size: w (width) and h (height)

w h

slide-29
SLIDE 29
  • This can be expressed in a matrix form with a non-

linear projection:

Camera Model: Pinhole Camera

P =   −fku u0 −fkv v0 1   = K[I|0] K =   −fku u0 −fkv v0 1  

m = P · M m0 = m/mz

slide-30
SLIDE 30
  • The perspective projection is defined as

Camera Model: Pinhole Camera

P = K[I|0]G = K[R|t] t =   t1 t2 t3   R =   r>

1

r>

2

r>

3

 

K =   −fku u0 −fkv v0 1  

m = P · M m0 = m/mz Intrinsic Matrix Extrinsic Matrix

slide-31
SLIDE 31

Camera Model: Thin Lens

Optical Axis C F D

slide-32
SLIDE 32

Camera Model: Thin Lens

C F D Z Z’ M M’ 1 Z + 1 Z0 = 1 D Image Plane

slide-33
SLIDE 33

Camera Model: Thin Lens

m = P · M m0 = m/mz m0 =   u v 1  

slide-34
SLIDE 34

Camera Model: Thin Lens

− · r2

d =

✓(u − u0) αu ◆2 + ✓(v − v0) αv ◆2 αu = −f · ku αu = −f · kv ( u0 = (u − u0) · (1 + k1r2

d + k2r4 d + . . . + knr2n d ) + u0

v0 = (v − v0) · (1 + k1r2

d + k2r4 d + . . . + knr2n d ) + v0

✓ ◆ ✓ ◆

n is set maximum to 3.

slide-35
SLIDE 35

Camera Model: Thin Lens

slide-36
SLIDE 36

Camera Model: Thin Lens

Barrel distortion

slide-37
SLIDE 37

Camera Model: Thin Lens

Pincushion distortion

slide-38
SLIDE 38

Best Practice

slide-39
SLIDE 39

Best Practice

  • How do we shoot pictures?
  • Practical suggestions and limitations to avoid

failures during reconstruction.

slide-40
SLIDE 40

Best Practice: A Good Sequence

  • We have to shoot a picture of the same location for

every step made in the shooting sequence.

  • Each picture needs to be of the same scene, but

captured from a slightly different point of view.

  • We have to walk with the camera in an arc around

the scene and keeping the entire scene all times.

  • We have to keep the same focal length, i.e., zoom!
slide-41
SLIDE 41

Best Practice: A Good Sequence

📸 📸 📸 📸 📸 📸

slide-42
SLIDE 42

Best Practice: A Good Sequence

  • We have to capture as many photographs as we

can:

  • The more the better.
  • We need at least 5-6 photographs for a very

basic reconstruction!

  • A reconstruction algorithm can fail if only four

photographs or less are given as input!

slide-43
SLIDE 43

Best Practice: Bad Sequences

📸

  • We have to avoid “pan”

sequences (panoramas sequences); i.e., capturing photographs

  • n a plane.
  • These sequences do not

have 3D information.

slide-44
SLIDE 44

Best Practice: Bad Sequences

📸

  • We have to avoid “pan”

sequences (panoramas sequences); i.e., capturing photographs

  • n a plane.
  • These sequences do not

have 3D information.

slide-45
SLIDE 45

Best Practice: Bad Sequences

📸 📸

  • We have to avoid photo

sequences in which we shoot toward/outward the scene to capture!

slide-46
SLIDE 46

Best Practice: Bad Sequences

📸 📸

  • We have to avoid photo

sequences in which we shoot toward/outward the scene to capture!

slide-47
SLIDE 47

Best Practice: Bad Sequences

📸 📸

  • If the angle between a

photograph and another is too small, the reconstruction algorithm may fail or produce low quality reconstruction! α = 30°

slide-48
SLIDE 48

Best Practice: Bad Sequences

📸 📸

  • If the angle between a

photograph and another is too small, the reconstruction algorithm may fail or produce low quality reconstruction! α = 30°

slide-49
SLIDE 49

Best Practice: Bad Sequences

📸

  • We cannot take

photographs by rotating the person/object using a turnable table!!

slide-50
SLIDE 50

Best Practice: Bad Sequences

📸

  • We cannot take

photographs by rotating the person/object using a turnable table!!

slide-51
SLIDE 51

Best Practice: Planar Objects

  • We cannot take

photographs of planar

  • bjects!
slide-52
SLIDE 52

Best Practices: Not Enough Textures

slide-53
SLIDE 53

Best Practices: Non Constant Appearance

slide-54
SLIDE 54

Best Practices: Non Constant Appearance

slide-55
SLIDE 55

Best Practices: Non Constant Appearance

slide-56
SLIDE 56

Best Practices: Dynamic Scenes

Moving people or objects appear/disappear!

slide-57
SLIDE 57

Best Practices: Dynamic Scenes

Moving people or objects appear/disappear!

slide-58
SLIDE 58

Best Practices: Blurry Photos

  • Blurry photos are caused by:
  • Movements in the scenes or of the camera; i.e.,

motion blur.

  • Camera is out-of-focus
  • These photos MUST be avoided!
  • They cause issues during reconstruction and/or

degrade the final result!

slide-59
SLIDE 59

Blurry Photos

slide-60
SLIDE 60

Blurry Photos

slide-61
SLIDE 61

Best Practices: Self-Occlusions

  • Self-occlusions have to

be treated with care!

  • We have to cover all

self-occluded parts.

slide-62
SLIDE 62

Best Practices: Lighting Conditions

Cloudy days are ideal because lighting is stable!

slide-63
SLIDE 63

Best Practices: Lighting Conditions

Avoid moving shadows!

slide-64
SLIDE 64

Software

slide-65
SLIDE 65

Software

Free Software:

  • Arc3D (discontinued)
  • PhotoSynthToolkit

(discontinued)

  • Visual SFM (discontinued)
  • Multi-View Environment
  • Regard 3D

Commercial Software:

  • 3DZephyr
  • Autodesk 123DCatch
  • PhotoScan
  • RealityCapture
slide-66
SLIDE 66

Software: Arc3D

  • Arc3D is a web-based service, which has been

developed with cultural heritage applications in mind.

  • It is based on Apero and MicMac.
  • It outputs a point cloud without normal:
  • Results can be either visualized on MeshLab
  • r ARC3D Model Viewer.
slide-67
SLIDE 67

Software: Arc3D

Photographs by Maurizio Forte (C), CNR, Roma

slide-68
SLIDE 68

Software: Photosynth Toolkit

  • Photosynth toolkit is a package that was

developed on the blog Visual Experiments.

  • It is based on Bundler (open source) for

photographs matching, camera calibration, and sparse point cloud generation.

  • Dense matching relies on CMVS and PMVS.
  • This tool works locally.
slide-69
SLIDE 69

Software: Photosynth Toolkit

slide-70
SLIDE 70

Software: VisualSFM

  • A GUI application for 3D reconstruction using

structure from motion.

  • It runs fast by exploiting multicore and GPU

parallelism for feature detection, feature matching, and bundle adjustment.

  • Dense matching relies on CMVS and PMVS.
  • This tool works locally:
  • http://ccwu.me/vsfm/
slide-71
SLIDE 71

Software: VisualSFM

slide-72
SLIDE 72

Software: Multi-View Environment

  • End-to-end pipeline for image-based geometry

reconstruction: Structure-from-Motion, Multi-View Stereo, and Surface Reconstruction.

  • Command line applications, but most features

are also available from our user interface UMVE.

  • Open-source (C++).
  • This tool works locally.
  • External tool for high resolution texturing:
  • http://www.gcc.tu-darmstadt.de/home/proj/mve/
slide-73
SLIDE 73

Software: Multi-View Environment

slide-74
SLIDE 74

Software: Regard3D

  • GUI application that integrates different open-

source libraries and tools (MVE, OpenMVG, and CMVS/PMVS).

  • Complete pipeline; from the Structure-from-

Motion to the Surface Reconstruction.

  • Open-source (C++).
  • This tool works locally.
  • http://www.regard3d.org/index.php
slide-75
SLIDE 75

Software: 3DZephyr

  • It is a local software that requires an one time

fee:

  • $149 Lite version.
  • $3,200 Pro version.
  • It creates high quality 3d meshes.
slide-76
SLIDE 76

Software: 123DCatch

  • It is a web service by Autodesk:

http://www.123dapp.com/catch

  • Main advantages:
  • It is robust; it works even with challenging

photo sequences.

  • It creates high quality results.
  • It works as mobile app, free for now…
  • It exports 3D models with color.
slide-77
SLIDE 77

Software: 123DCatch

slide-78
SLIDE 78

Software: PhotoScan

  • It is a local software by Agisoft that requires an
  • ne time fee:
  • $59 for students
  • $179 standard version
  • It is fast and creates high quality models with

color.

slide-79
SLIDE 79

Software: RealityCapture

  • It is a local software by Capture Reality with a

subscription fee:

  • $99 for 3 months, $7500 for one year
  • $15000 forever
  • The fastest software (recently a real-time capture

and reconstruction inside Unity), but very expensive.

slide-80
SLIDE 80

Acknowledgements

  • Some images on work by:
  • Dr. Matteo Dellepiane:
  • http://vcg.isti.cnr.it/~dellepiane/