Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric...

45
CE 59700: Digital Photogrammetric Systems Ayman F. Habib 1 Relative Orientation: Applications Image Resampling According Epipolar Geometry

Transcript of Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric...

Page 1: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib1

Relative Orientation: Applications

Image Resampling According EpipolarGeometry

Page 2: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib2

3D Reconstruction

Object Point (A)

Conjugate Points

• The position and orientation of each camera station have to be known.

a a´

Page 3: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib3

Image Matching• How can we determine conjugate points in overlapping

images?

Page 4: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib4

Terminology• Matching entity:

– The primitive that is being compared with similar primitives in overlapping images to find conjugate entities

• Conjugate entities:– Corresponding entities which are images of object space

features such as points, lines, and areas • Similarity measure:

– A quantitative measure of how well the matching entities correspond to each other

Page 5: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib5

Terminology• Matching method:

– Evaluate the similarity measure between the matching entities. Possible options include:

• Area-based matching,• Feature-based matching, and• Relational (symbolic) matching.

• Matching strategy:– Refers to the concept or overall scheme of the solution to the

matching problem. This entails the analysis of the matching environment, the selection of the matching method, and the quality control of the matching results.

Page 6: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib6

Problem Statement• The problem of image matching and surface

reconstruction can be summarized as follows:– Select a matching entity in one image,– Find the conjugate entity in the overlapping image,– Asses the quality of the match, and– Compute the three-dimensional location of the matched entity

in the object space.

• The second task is the most difficult to solve and is a major research area in the Photogrammetric and Computer Vision communities.

Page 7: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib7

Automatic Determination of Conjugate Points

Left Image Right Image

Page 8: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib8

Image Matching

TemplateSearch Window

Similarity Measure

Matching Window

Page 9: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib9

Image Matching

Template Matching WindowSearch Window

Page 10: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib10

Fundamental Issues in Image Matching• Search Space:

– How can we determine the location (the center) and the size of the search space?

– One should reduce the size of the search space to avoid combinatorial explosion which will be the case if the search space covers the whole image.

• The uniqueness of the Matching Entity:– The matching entity should be unique to avoid ambiguities in

the matching process.– Interest points are used to avoid this problem.

Page 11: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib11

Interest Points

Page 12: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib12

Automatic Determination of Conjugate Points

Left Image Right Image

Page 13: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib13

Normalized Image Generation

Image Resampling According to EpipolarGeometry

Page 14: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib14

Normalized Image Generation

• Ensure that conjugate points in overlapping images have the same y-coordinates.– Reducing matching ambiguities– Reducing search space/time

x

y

x’

y’

a I’a

b’Ib’

• Important Applications:– Automatic matching– Automatic aerial triangulation– Orthophoto generation

– Automatic DEM generation– Dense matching– Stereo viewing

Page 15: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib15

Original Images

Conjugate points do not have the same y-coordinates.

Page 16: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib16

Normalized Images

Conjugate points have the same y-coordinates.

Page 17: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib17

Normalized Images

Page 18: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib18

Normalized Image Generation: Why?• Normalized image generation is important for the

following reasons:– 3-D viewing of 2-D images can be established without the

need for photogrammetric plotters.• Photogrammetric plotters are expensive and need an experienced

operator to establish the orientation procedure.

– In automatic matching, the search space for conjugate points will be reduced from 2-D to 1-D.

• Save time and avoid matching ambiguities whenever dealing with repetitive patterns.

Page 19: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib19

3-D Viewing of 2-D imagery

Analog Photogrammetric Plotter

Page 20: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib20

3-D Viewing of 2-D imagery

Analytical Photogrammetric PlotterLeica Geosystems: SD2000/3000

Page 21: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib21

3-D Viewing of 2-D imagery

Digital Photogrammetric PlotterZ/I Image Station

Page 22: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib22

3-D Viewing of 2-D imagery

Digital Photogrammetric PlotterLeica Geosystems

Page 23: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib23

Epipolar Geometry

a a`

A

O O´

Epipolar Plane

Epipolar Line

Page 24: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib24

Epipolar Geometry

Page 25: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib25

Epipolar Geometry: Definitions

epipolar plane

p

OO’

base linee

epipolee’

epipoleIp’

p’

P

Page 26: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib26

Epipolar Geometry• Epipolar plane for a given object point is the plane

containing the perspective centers of a stereo-pair and the object point under consideration.

• Epipolar plane for a given image point is the plane containing the perspective centers of a stereo-pair and the image point under consideration.

• Epipolar line is the intersection of the epipolar plane with the image plane.

Page 27: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib27

Epipolar Geometry• The epipolar plane can be defined once we have:

– Relative Orientation Parameters (ROP) relating the two images of a stereo-pair, and

– Image coordinate measurements in either the left or right image.

• Epipole: The intersection of the base line with the image plane– All the epipolar lines pass through the epipole.

• Epipolar lines associated with different object points are not parallel except when:– The two images of a stereo-pair are parallel to the base line

(the line connecting the two perspective centers).

Page 28: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib28

Normalized Images• Concept:

– Create a new image at the same exposure station– This image is parallel to the base line.– The rows of the new image should be parallel to the base line.– The rows of the new image are the epipolar lines.

• This is commonly known as “Image Resampling according to Epipolar Geometry”.

• EOPs of the normalized image:– (Xo, Yo, Zo) are the same as the original image.– (n, n, n) are chosen in such a way that:

• The image plane is parallel to the base line, and• The rows are parallel to the base line.

Page 29: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib29

Normalized Image Generation

p

c

c’

p’I’p

Ip’

cn

P

O’

cn

cnO

Page 30: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib30

Original Image

OA

OA

OA

a

a

OT

i

ZZYYXX

rrrrrrrrr

cyx

VRv

333213

322212

312111

),,(

Where: is a scale factor

iO vRV ),,(/1

Page 31: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib31

Normalized Image

OA

OA

OA

na

a

OnnnTnni

ZZYYXX

rrrrrrrrr

cyx

VRv

nnn

nnn

nnn

n

n

n

332313

322212

312111

),,(

Where: n is a scale factor

ninnnnnO vRV ),,(/1

Page 32: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib32

Normalized Image

ninnnnnO vRV ),,(/1

iO vRV ),,(/1

ninnnnni vRvR ),,(/1),,(/1

innnTnni vRRv

n

),,(),,(/

innnni vMvn

),,,,,(/

Page 33: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib33

Normalized Image

cmymxmcmymxmcy

cmymxmcmymxmcx

aa

aaa

aa

aaa

n

n

333231

232221

333231

131211

Page 34: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib34

Normalized Image

ninnnT

ni vMv ),,,,,(/

cmymxmcmymxm

cy

cmymxmcmymxm

cx

nn

nn

nn

nn

aa

aaa

aa

aaa

332313

322212

332313

312111

Page 35: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib35

Rotation Matrix for the Normalized Images• Now we need to determine the rotation matrix .• There are different alternatives for deriving .• In the following discussion, we will present an approach

for directly deriving without the need to derive .

• Using the coordinates of the left and perspective centers, can we derive one of the columns of ?

• Yes, we can derive the first column of ( ).

Page 36: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib36

Rotation Matrix for the Normalized Images• Now, we need to derive the other two columns of .

• Note: The optical axis of the left image ( ) is represented by the third column of .

• Note: The optical axis of the right image ( ) is represented by the third column of .

is derived as the average of the third columns of and .

Page 37: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib37

Rotation Matrix for the Normalized Images

• The second column of ( ) can be derived through the cross product of and

• The third column of ( ) can be derived as the cross product of and .

• NOTE: Make sure to normalize the cross products (i.e., convert them to unit vectors).

Page 38: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib38

Rotation Matrix for the Normalized Images• Alternatively, can be derived as follows.

– ⁄ .

• NOTE: this is a different order of rotation than what we are used to.

Page 39: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib39

Normalized Image Generation

(xan, yan) Integer Location

Mathematical Function

(xa, ya) Non-Integer Location

Output ImageNormalized Image

Input ImageOriginal Image

Interpolate for the gray value at (xa, ya)

Assign Interpolated Gray value

cmymxmcmymxm

cy

cmymxmcmymxm

cx

nn

nn

nn

nn

aa

aaa

aa

aaa

332313

322212

332313

312111

Page 40: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib40

Normalized Image Generation• Procedure:

– Start from a certain pixel (xan, yan) in the normalized image,– Compute the corresponding (xa, ya) using the previous

equations,– Compute g (xa, ya) using image resampling,– g(xan, yan) = g (xa, ya), and– Repeat the above mentioned steps for every pixel in the

normalized image.

Page 41: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib41

3-D Viewing of 2-D Imagery

Page 42: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib42

3-D Viewing of 2-D Imagery

Page 43: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib43

3-D Viewing of 2-D Imagery

Page 44: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib44

3-D Viewing of 2-D Imagery

Page 45: Image Resampling According Epipolar Geometry · 2018. 11. 20. · CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Relative Orientation: Applications Image Resampling According

CE 59700: Digital Photogrammetric Systems Ayman F. Habib45

3-D Viewing of 2-D Imagery