49
Pyramids Lecture5

Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Embed Size (px)

Citation preview

Page 1: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Pyramids

Lecture‐5

Page 2: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence
Page 3: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence
Page 4: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Egyptian Pyramids• There are 138 pyramids discovered in Egypt as of 2008.• Most were built as tombs for the country's Pharaohs.  • The earliest known Egyptian pyramids are found at Saqqara, northwest of 

Memphis. – The earliest among these is the Pyramid of Djoser (constructed 2630 BCE–2611 BCE) . 

– This pyramid and its surrounding complex were designed by the architect Imhotep.– The estimate of the number of workers to build the pyramids range from a few 

thousands to up to 100,000.

• The most famous Egyptian pyramids are those found at Giza, on the outskirts of Cairo. Several of the Giza pyramids are counted among the largest structures ever built. 

• The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only one of the Seven Wonders of the Ancient World still in existence.

Page 5: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Pyramids

• Very useful for representing images.• Pyramid is built by using multiple copies of image.

• Each level in the pyramid is 1/4 of the size of previous level.

• The lowest level is of the highest resolution.• The highest level is of the lowest resolution.

Page 6: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Image Pyramid

Page 7: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Pyramid

Page 8: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Gaussian pyramid

Source: Forsyth

Page 9: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Laplacian pyramid

Source: Forsyth

Page 10: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Deformable Part Model (DPM)

Slide Credit: Pedro F. Felzenszwalb

Page 11: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Contents

• Gaussian and Laplacian Pyramids– Reduce– Expand

• Applications of Laplacian pyramids– Image  compression– Image composting

Page 12: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Cited by 5067

Page 13: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence
Page 14: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Gaussian Pyramids (reduce)

)2,2(),(),(2

2

2

21 njmignmwjig

m nll

][ 1 ll gREDUCEg

Level l

Page 15: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Convolution

Page 16: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Reduce (1D)

Page 17: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Reduce

0 1 2 3 4 5 6 7 8

0 1 2 3 4

0 1 2

Page 18: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Gaussian Pyramids (expand)

Page 19: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Expand (1D)

Page 20: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Expand (1D)

Page 21: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Expand

0 1 2 3 4 5 6 7 8

0 1 2 3 4

Page 22: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Expand

0 1 2 3 4 5 6 7 8

0 1 2 3 4

Page 23: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Convolution Mask

Page 24: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Convolution Mask

• Separable

•Symmetric

Page 25: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Convolution Mask

• The sum of mask should be 1.

•All nodes at a given level must contribute the same total weight to the nodes at the next higher level.

Page 26: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Convolution Mask

cc

bba

b

Page 27: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Convolution Mask

a=.4 GAUSSIAN, a=.5 TRINGULAR

Page 28: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Triangular

00.050.1

0.150.2

0.250.3

0.350.4

0.450.5

c b a b c

Triangular

a=.4 GAUSSIAN, a=.5 TRINGULAR

Page 29: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Approximate Gaussian

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

c b a b c

Gaussian

a=.4 GAUSSIAN, a=.5 TRINGULAR

Page 30: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Gaussian

Page 31: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Gaussian

-3 -2 -1 0 1 2 3

.011 .13 .6 1 .6 .13 .011

x

g(x)

Page 32: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence
Page 33: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Separability

Page 34: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Algorithm

• Apply 1‐D mask to alternate pixels along each row of image.

• Apply 1‐D mask to each pixel along alternate columns of resultant image from previous step.

Page 35: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Gaussian Pyramid

Page 36: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Laplacian Pyramids

.

Page 37: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Pierre‐Simon Laplace (1749–1827)

• Mathematician and astronomer • French Newton

• Laplacian• Laplace Transform• Celestial mechanics• Spherical harmonics

• On 15 March 1788 at the age of thirty-nine, Laplace married Marie-Charlotte de Courty de Romanges, a pretty eighteen-and-a-half-year-old girl from a good family in Besançon.

Page 38: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Laplacian Pyramids

• Similar to edge detected images.• Most pixels are zero.• Can be used for image compression.

Page 39: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence
Page 40: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Coding using Laplacian Pyramid

•Compute Gaussian pyramid

•Compute Laplacian pyramid

•Code Laplacian pyramid

Page 41: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Decoding using Laplacian pyramid

• Decode Laplacian pyramid.• Compute Gaussian pyramid from Laplacian pyramid.

• is reconstructed image.

Page 42: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Laplacian Pyramid

Page 43: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Image Compression (Entropy)

7.6

4.4

5.0

5.6

6.2

.77

1.9

3.3

4.2

Bits per pixel

Page 44: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Image Compression (Entropy)

7.6

4.4

5.0

5.6

6.2

.77

1.9

3.3

4.2

Bits per pixel

Page 45: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Image Compression

1.58

.73

Page 46: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Combining Apple & Orange

Page 47: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Combining Apple & Orange

Page 48: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Algorithm• Generate Laplacian pyramid Lo of orange image.

• Generate Laplacian pyramid La of apple image.

• Generate Laplacian pyramid Lc by – copying left half of nodes at each level from  apple and 

– right half of nodes from orange pyramids.• Reconstruct combined image from Lc.

Page 49: Pyramids - crcv.ucf.edu · • The Pyramid of Khufu at Giza is the largest Egyptian pyramid. It is the only It is the only one of the Seven Wonders of the Ancient World still in existence

Reading Material

• http://ww‐bcs.mit.edu/people/adelson/papers.html 

– The Laplacian Pyramid as a compact code, Burt and Adelson, IEEE Trans on Communication, 1983.

• Fundamental of Computer Vision, Section 4.5. http://www.cs.ucf.edu/courses/cap6411/book.pdf