Skip to content
Snippets Groups Projects

Delete obsolete code and comment to make `get3DPoint` more understandable

All threads resolved!

Restructuring of get3DPoint to be more easily understood. See the following survey comment for the used approach of the code.

Since we change from double to float mid-calculation, I couldn't rewrite everything as I wanted without breaking tests.

/* Basic Idea:
     * All points projecting onto a point on the image plane lie on the same
     * line (cf. pinhole camera model). We can determine this line in the form:
     *
     * g: x = lambda * v
     *
     * This line exists in camera coordinates. Let v be the projection with
     * depth 1 (i.e. v_3 = 1). Then lambda is the depth of the resulting point.
     * We'll continue to call lambda z instead, to show this.
     * We now want to determine the depth at which the resulting point has height h
     * in world coordinates. The transformation from cam to world is:
     *
     * W = R * C - T
     * W   := Point in World Coords
     * C   := Point in Cam Coords
     * R,T := Rotation and Translation of Cam
     *
     * By putting in our x = z * v, we get:
     *     W          = R * (z * v) - T
     * <=> W          = z * Rv - T
     * <=> W + T      = z * Rv
     * <=> (W + T)/Rv = z
     * We select the third row of this to solve for z. Finally g(z) is transformed
     * into World Coords.
     */

Closes #118 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • d.kilic added 1 commit

    added 1 commit

    • 8a2554eb - Change get3DPoint to const method

    Compare with previous version

  • Schrödter, Tobias approved this merge request

    approved this merge request

  • d.kilic added 28 commits

    added 28 commits

    • 8a2554eb...911f0ec5 - 16 commits from branch master
    • 7f36e2e2 - Deleted debug output and old method
    • 9b926239 - Write rotation vector directly, without c-array
    • fc73e6c1 - Tranlation vector as cv::Vec3d
    • 142c9924 - Restructure calculation of z
    • 11ff031e - Rotate translation vector later
    • 602695ff - Change to Matx instead of Mat for rot
    • f196f1ce - Clarified comment
    • 0f74e0c0 - More comments
    • 1b497f80 - Take const parameter get3DPoint
    • 51c5d8e0 - Change comments to argue about lines in pinhole model
    • 1b949f45 - Delete now unused function transformRT
    • 7aefd9c6 - Change get3DPoint to const method

    Compare with previous version

  • Schrödter, Tobias resolved all threads

    resolved all threads

  • d.kilic enabled an automatic merge when the pipeline for 7aefd9c6 succeeds

    enabled an automatic merge when the pipeline for 7aefd9c6 succeeds

  • merged

  • d.kilic mentioned in commit c2b62bd0

    mentioned in commit c2b62bd0

  • Please register or sign in to reply
    Loading