question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Rectification of stereo image pairs.

See original GitHub issue

🚀 Feature

To complete the stereo pipeline in Kornia, we need functionality for rectifying images captured by a stereo camera setup.

This will be somewhat similiar to the OpenCV function cv2.initUndistortRectifyMap, but I don’t think we would initialize the rectification maps first. Instead we would just have the signature be:

def rectify(image, camera_matrix, R))
     return ...

def rectify_stereo_pair(left_image_batch, right_image_batch, left_camera_matrix, right_camera_matrix, R_left, R_right):
     left_image_batch_rectified = rectify(left_image_batch, left_camera_matrix, R_left)
     right_image_batch_rectified  = rectify(right_image_batch, right_camera_matrix, R_right)
     return left_image_batch_rectified, right_image_batch_rectified

Optionally we would also return the rectified camera matrices.

Note that OpenCV will undistortion and rectification in one step. I am unsure if this should be part of this first feature, but might be the way to go.

The kornia.geometry.undistort_points might be helpful here.

Motivation

To complete the stereo pipeline in Kornia, we need rectification functionality. That will allow the full stereo pipeline: Bayer Image -> Color Image -> Undistort -> Rectify -> Disparity map -> Point Cloud to be supported by Kornia.

Pitch

See above. I need to find good material for a rectification algorithm.

Here’s a starting point:

https://www.cs.cmu.edu/~16385/s17/Slides/13.1_Stereo_Rectification.pdf

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
ducha-aikicommented, Nov 9, 2021

It is very needed indeed! I agree that the best way is to create such functions alone and integrate later.

0reactions
copaahcommented, Dec 11, 2021

Added first go a reimplementing the algorithm from the paper. I get approximately same results, but need data from a real stereo rig to verify.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understand and Apply Stereo Rectification for Depth Maps ...
Image rectification wraps both images. The result is that they appear as if they have been taken only with a horizontal displacement. This ......
Read more >
Stereo rectification of calibrated image pairs ... - MECS Press
simple and convenient rectification method of calibrated image pairs based on geometric transformation is proposed, which can avoid the complicated calculation ...
Read more >
Stereo rectification of calibrated image pairs ... - ResearchGate
The objective of stereo rectification is to make the corresponding epipolar lines of image pairs be parallel to the horizontal direction, ...
Read more >
Rectifying a sequence of stereo images - Google Patents
A method of rectifying stereo images includes providing a plurality of pairs of sets of keypoints extracted from a pair of current stereo...
Read more >
Stereo rectification of pushbroom satellite images by robustly ...
Stereo rectification is one of the most important steps for stereo matching and subsequently for digital surface model generation from satellite ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found