📘
Stereo Rectification Check
EasyDepth Estimation
Verify that pairs of corresponding epipolar points from stereo images lie on the same horizontal scanline.
In a properly rectified stereo pair, all epipolar lines are horizontal, meaning corresponding points in the left and right images should have the same (or very close) y-coordinates. This is a fundamental requirement for efficient stereo matching.
Given two lists of corresponding points from the left and right images, check whether each pair satisfies the horizontal alignment condition within a given tolerance ϵ:
∣yleft−yright∣≤ϵ
Return a list of boolean values, one per pair, indicating whether the pair is properly rectified.
Example:
Input:
left_points = [[100, 200], [150, 300], [200, 400]] right_points = [[80, 200], [130, 301], [180, 410]] tolerance = 2.0
Output:
[True, True, False]
Reasoning:
- We iterate over the pairs of corresponding points from the left and right images:
left_pointsandright_points. - For each pair, we calculate the absolute difference in y-coordinates: ∣yleft−yright∣.
- We compare this difference to the given
toleranceof 2.0 and check if it satisfies the condition: ∣yleft−yright∣≤ϵ. - The results of these comparisons are collected in a list, where each element corresponds to a pair of points:
[True, True, False].
Constraints:
- left_points: List of [x, y] coordinates from left image
- right_points: List of [x, y] coordinates from right image
- tolerance: float (maximum allowed y-coordinate difference)
- Return: List of True/False values
- Use pure Python
Editor
Python 3.13.1
Test Results
0/0Run code to see test results.