The City Scanning Project :

69
The City Scanning Project : Validation and parallel algorithms Olivier Koch, Visitor from March to August 2002 Advisor : Seth Teller

description

The City Scanning Project :. Validation and parallel algorithms. Olivier Koch, Visitor from March to August 2002. Advisor : Seth Teller. Contents. 1/ Project overview 2/ code validation 3/ parallel algorithms 4/ a few ideas. - PowerPoint PPT Presentation

Transcript of The City Scanning Project :

Page 1: The City Scanning Project :

The City Scanning Project :

Validation and parallel algorithms

Olivier Koch,Visitor from March to August 2002

Advisor : Seth Teller

Page 2: The City Scanning Project :

Contents

1/ Project overview

2/ code validation

3/ parallel algorithms

4/ a few ideas

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 3: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Reconstruct a realistic 3D model of an urban environment from calibrated real-world images

Argus

Technology Square

Page 4: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• Nodes

Page 5: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• Edge detection

Page 6: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• assume edges are horizontal• determine corresponding orientation in 3D world

Camera centerGround plane

Camera plane

edge

Page 7: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• assume edges are horizontal• determine corresponding orientation in 3D world

Camera centerGround plane

Camera plane

edge

Page 8: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• assume edges are horizontal• determine corresponding orientation in 3D world

Camera centerGround plane

Camera plane

edge

Page 9: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• assume edges are horizontal• determine corresponding orientation in 3D world

Camera centerGround plane

Camera plane

Horizontal plane

Page 10: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• assume edges are horizontal• determine corresponding orientation in 3D world

Camera centerGround plane

Camera plane

Horizontal plane

Horizontal line

Page 11: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• assume edges are horizontal• determine corresponding orientation in 3D world

Camera centerGround plane

Camera plane

Horizontal plane

Horizontal line

Page 12: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• assume edges are horizontal• determine corresponding orientation in 3D world

Camera centerGround plane

Camera plane

Horizontal plane

horizontal line

horizontal line

Page 13: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• assume edges are horizontal• determine corresponding orientation in 3D world

Camera centerGround plane

Camera plane

Horizontal plane

Horizontal line

Page 14: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• assume edges are horizontal• determine corresponding orientation in 3D world

Camera centerGround plane

Horizontal line

Page 15: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• assume edges are horizontal• determine corresponding orientation in 3D world

Ground plane

Horizontal line

Page 16: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• assume edges are horizontal• determine corresponding orientation in 3D world

Ground plane

Horizontal line

X

Y

Z

= azimuth of 3D edge

Page 17: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• Edge detected…

Page 18: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• Edge detected… now have an azimuth !

• each azimuth is color-coded.

Page 19: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• histogram edges

0 360

azimuth

weight

Façade orientation wrt due east

Page 20: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• histogram horizontal edges

0 360

azimuth

weight

Page 21: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• histogram horizontal edges

0 360

azimuth

weight

Page 22: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• keep orientations that are supported by at least 3 nodes

0 360

azimuth

weight

Page 23: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• determine corresponding edges

0 360

azimuth

weight

Page 24: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

From : Extracting Textured Vertical Facades from Controlled Close-Range Imagery, S. Teller, S. Coorg in Proc. CVPR, pp. 625-632, June 1999.

Page 25: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

grid cell

correlation

projected edge

computed correlation value

step

Page 26: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

sweep step

grid cell

correlation

step

peak

Page 27: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

sweep step

grid cell

correlation

step

peak

Page 28: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

grid cell

correlation

step

peak

Page 29: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 30: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 31: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 32: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 33: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

11

1 1

11

2

2

2

Page 34: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 35: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 36: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 37: The City Scanning Project :

Project overview

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 38: The City Scanning Project :

Contents

1/ Project overview

2/ code validation

3/ parallel algorithms

4/ a few ideas

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 39: The City Scanning Project :

Code validation

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• edge detection improvement

automatic edges manual edges

Page 40: The City Scanning Project :

Code validation

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• edge detection improvement

automatic edges

manual edges

Page 41: The City Scanning Project :

Code validation

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• polygon filtering : remove polygons without support.

without filter with filter

Page 42: The City Scanning Project :

Code validation

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• debugging

warnings

bugs

Rational Purify

CVD

log files, class constructors, …

Page 43: The City Scanning Project :

Contents

1/ Project overview

2/ code validation

3/ parallel algorithms

4/ a few ideas

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 44: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• why parallelize ?not processed

being processed

processed

IRIX machine

grid cells

Page 45: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• why parallelize ?not processed

being processed

processed

IRIX machine

Page 46: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• why parallelize ?not processed

being processed

processed

IRIX machine

Page 47: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• why parallelize ?not processed

being processed

processed

> 7 hours on IRIX single processor=

Page 48: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• first method

Machine 1Machine 2

Machine 3

Machine 5

Machine 4

Page 49: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• first method• CPU speed varies across machines• time to process a cell is not constant

difficult optimization problem…

turpentineraytracemosaicacetonehuepanoramaorange

2285 sec.2678244321312711234217551939

Computing time : 45 min.Standard dev : 3.4 %

Static allocation

Page 50: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• second method

Machine 1Machine 2

Machine 3

Machine 5

Machine 4

Page 51: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• second method

Machine 1Machine 2

Machine 3

Machine 5

Machine 4

Page 52: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• second method

Machine 1Machine 2

Machine 3

Machine 5

Machine 4

Page 53: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• second method

Machine 1Machine 2

Machine 3

Machine 5

Machine 4

Page 54: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• second method

Machine 1Machine 2

Machine 3

Machine 5

Machine 4

Page 55: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• second method

Machine 1Machine 2

Machine 3

Machine 5

Machine 4

Page 56: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• second method

• master-worker model (MPI)

master

worker #1 worker #2

worker #3

worker #4worker #5

masterworker“I am free”

masterworker

“processcell #xx”

masterworker

“cell #xx hasbeen processed”

Communication scheme

Page 57: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• second method

panorama

turpentine

acetone

mosaic

trace

orangehueray

1246.31246.31248.51248.61250.01240.61250.31247.01243.01233.81249.11239.11250.51238.31255.61278.91276.01275.91277.21268.81230.4

• Computation time 21mn

(sec.)

• Idle time 6mn

• Communication time3mn

Standard deviation : 2.6 %

Page 58: The City Scanning Project :

Parallel algorithms

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Method 1(rectangles)

Method 2(queue)

Time Speed-up

• method 2 is faster and more flexible.• last step of reconstruction still needs to be parallelized

45 min. 10.0

30 min. 15.2

(takes ~10 minutes on a single processor IRIX)

Page 59: The City Scanning Project :

Contents

1/ Project overview

2/ code validation

3/ parallel algorithms

4/ a few ideas

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Page 60: The City Scanning Project :

A few ideas

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• high-frequency edge filtering

Page 61: The City Scanning Project :

A few ideas

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• high-frequency edge filtering

Page 62: The City Scanning Project :

A few ideas

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• high-frequency edge filtering

boolean image high-frequency detection

mask

- on courtesy of Alexis Charignon

Page 63: The City Scanning Project :

A few ideas

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• high-frequency edge filtering

Page 64: The City Scanning Project :

A few ideas

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• camera position refinement

Argus

Argus position

Argus position

Page 65: The City Scanning Project :

A few ideas

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• camera position refinement

Argus position

Argus position

• orange robots keep track of relative Argus motion.

Page 66: The City Scanning Project :

A few ideas

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

• using alternative sensors

IR imagery

Infrared Services Inc.

Page 67: The City Scanning Project :

Conclusion

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Infrared Services Inc.

Conclusion

• reconstruction code validated on Tech Square

• most CPU-intensive program parallelized

• speed-up = 15 on IRIX cluster

Next steps

• refining camera positions

• porting the code to Linux

Page 68: The City Scanning Project :

Acknowledgements

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Infrared Services Inc.

• Seth Teller

• Manish Jethwa, Neel Master

• Alexis, Yann, Stefane, Adnan

• MIT Graphics Group

Page 69: The City Scanning Project :

The End

The City Scanning Project – validation and parallel algorithms – July 2002 – [email protected]

Infrared Services Inc.

Thanks…

Questions ?