nie-lang / Multi-Grid-Deep-Homography

TCSVT2021 - Multi-Grid Deep Homogarphy
85 stars 7 forks source link

Doubt #10

Closed waveajay closed 2 years ago

waveajay commented 2 years ago

Hi I am going through the code have some doubts.

1) What is the purpose of scale transformation matrix .

M = np.array([[patch_size / 2.0, 0., patch_size / 2.0],
                  [0., patch_size / 2.0, patch_size / 2.0],
                  [0., 0., 1.]]).astype(np.float32)

It seems to me Matrix M also has translation component. 2)What is the this line doing? H1_mat = tf.matmul(tf.matmul(M_tile_inv, H1), M_tile)

(code snippets are from H_model.py,function name :H_model)

nie-lang commented 2 years ago

This matrix can help to scale the coordinate from [0, patch] to [-1, 1]. The homography warp is implemented in the coordinate system from -1 to 1.

waveajay commented 2 years ago

Thank you