opencv_contrib icon indicating copy to clipboard operation
opencv_contrib copied to clipboard

A possible bug in cv::omnidir::stereoReconstruct function.

Open wtyuan96 opened this issue 1 year ago • 0 comments

Detailed description

I am confused about the implementation of absolute depth calculation in omnidir.cpp, which is different from the original paper (Binocular Spherical Stereo).

specifically, the depth is calculated as follows:

float depth = float(baseline * f /realDis.at<float>(j, i));

but in the original paper (Binocular Spherical Stereo), the absolute depth is calculated as follows: image

where is the depth of left image.

By the way, another repository pdi which provides a solution to get the panorama depth image from a single fisheye stereo image pair, uses the above equation from original paper to calculate depth.

I am wondering if I am missing something? or are these two implementations equivalent? or is it just a bug?

Looking forward to your reply !

Issue submission checklist

  • [x] I report the issue, it's not a question
  • [x] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • [x] I updated to the latest OpenCV version and the issue is still there
  • [ ] There is reproducer code and related data files: videos, images, onnx, etc

wtyuan96 avatar May 27 '23 18:05 wtyuan96