Skip to content

Could you explain why you compute the initial rotation vector like this? #15

@jimlinntu

Description

@jimlinntu

Hi, I found that you've tried to use the vertical vanishing point to give a good guess of the initial rotation vector.
Although you eventually commented out the theta_0 computed from the vanishing point, I am curious about why you computed the rotation vector like that.
(If possible, could you explain by an illustration?)

rebook/rebook/dewarp.py

Lines 1101 to 1104 in 4bc3920

xz_ratio = -f / vx # theta_x / theta_z
norm_theta_sq = (atan2(np.sqrt(vx ** 2 + f ** 2), vy) - pi) ** 2
theta_z = np.sqrt(norm_theta_sq / (xz_ratio ** 2 + 1))
theta_x = xz_ratio * theta_z

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions