Stereo Rectification Check
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 :
Return a list of boolean values, one per pair, indicating whether the pair is properly rectified.
Example
left_points = [[100, 200], [150, 300], [200, 400]] right_points = [[80, 200], [130, 301], [180, 410]] tolerance = 2.0
[True, True, False]
- Inputs:
left_pointsandright_pointsare matched lists of pixel coordinates: pair is the same 3D point seen by the left and the right camera.toleranceis pixels of allowed vertical misalignment. - Only the values matter. The values differ by in every pair (, , ); that horizontal shift is disparity, which encodes depth and is expected.
- Pair 1: , so it is rectified →
True. - Pair 2: , a one-pixel drift within tolerance →
True. - Pair 3: , the points sit on different scanlines →
False. - Output: one boolean per pair, in input order:
[True, True, False]. Notice the test is inclusive: a gap of exactly still passes, so with only identical values count as rectified.
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