PIXELBANKv9.1.0
Menu

Essential Matrix Constraint Check

Verify if a matrix satisfies the essential matrix constraint.

The essential matrix E encodes the relative pose between two calibrated cameras. It must satisfy:

  1. Determinant constraint: det⁑(E)=0\det(E) = 0
  2. Singular value constraint: Two singular values are equal, one is zero

For this problem, we check only the determinant constraint. A valid essential matrix is rank-2 (determinant = 0) because it represents a degenerate transformation (all epipolar lines pass through a single point - the epipole).

The 3Γ—3 determinant is computed using the rule of Sarrus or cofactor expansion:

det⁑(E)=e00(e11e22βˆ’e12e21)βˆ’e01(e10e22βˆ’e12e20)+e02(e10e21βˆ’e11e20)\det(E) = e_{00}(e_{11}e_{22} - e_{12}e_{21}) - e_{01}(e_{10}e_{22} - e_{12}e_{20}) + e_{02}(e_{10}e_{21} - e_{11}e_{20})

Example:

Input:
is_essential([[0,0,0],[0,0,-1],[0,1,0]], 0.01)
Output:
True
Reasoning:

Computing determinant of the given matrix:

  • det = 0Γ—(0Γ—0 - (-1)Γ—1) - 0Γ—(0Γ—0 - (-1)Γ—0) + 0Γ—(0Γ—1 - 0Γ—0)
    • = 0Γ—1 - 0Γ—0 + 0Γ—0
    • = 0 Since |0| < 0.01, the matrix satisfies the essential matrix constraint.

Constraints:

  • E: 3x3 matrix
  • tolerance: threshold for considering det β‰ˆ 0
  • Return True if |det(E)| < tolerance
πŸ”’

Editor locked

The code editor is locked for Pro problems. It is only available for free problems. Please upgrade to gain access to the code editor for all problems.

solution.py

Test Results

0/0
Run code to see test results.