Home > Back-end >  Is there any function that calculate the ray direction using fisheye lens parameter in OpenCV
Is there any function that calculate the ray direction using fisheye lens parameter in OpenCV

Time:12-14

Given a pixel location, we can calculate the 3D xyz ray direction using the camera's intrinsic information.

But this problem is a little bit tricky with the fisheye lens model.

Is there any function that calculates the ray direction using the fisheye lens parameter in OpenCV?

Implementing this feature is not too difficult but I am asking to prevent reinventing the wheel.

CodePudding user response:

Use cv::fisheye::undistortPoints()

Pass an identity matrix for the new P camera matrix. That ought to yield suitable vectors (rays originating from the camera).

  • Related