opencv的几种畸变校正

一、单目校正:

OpenCV provides us with a ready-to-use undistortion algorithm that takes a raw
image and the distortion coefficients from cv::calibrateCamera() and produces a
corrected image. We can access this algorithm either through the function cv::undistort(), which does everything we need in one shot, or through the pair of routines cv::initUndistortRectifyMap() and cv::remap(), which allow us to handle things a little more efficiently for video or other situations where we have many images from the same camera.

也就是,cv::undistort()是一次性的,而cv::initUndistortRectifyMap() and cv::remap()这两个,相当于两步走。

rather than rectifying an entire image, you have a set of points you have collected from an image, and you care only  about the location of those points. In this case, you can use cv::undistortPoints() to compute the “correct” locations for your specific list of points

也就是,cv::undistortPoints() 用来稀疏校正。

二、双目校正

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
对于OpenCV中的畸变校正,有几个函数可以使用。其中包括undistort()函数、getOptimalNewCameraMatrix()函数和initUndistortRectifyMap()函数。 undistort()函数用于直接进行畸变校正。它接受原始图像、相机内参矩阵、相机畸变参数和可选的新相机内参矩阵作为输入,并输出校正后的图像。 getOptimalNewCameraMatrix()函数用于计算新的相机内参矩阵。它接受相机内参矩阵、相机畸变参数、图像尺寸、缩放比例和可选的校正后图像尺寸作为输入,并输出新的相机内参矩阵。 initUndistortRectifyMap()函数与getOptimalNewCameraMatrix()函数一起使用,用于初始化畸变校正的映射。它接受原相机内参矩阵、原相机畸变参数、可选的修正变换矩阵、新相机内参矩阵、去畸变后图像的尺寸和输出映射的类型作为输入,并输出两个映射。 因此,要进行OpenCV中的畸变校正,可以使用这些函数的组合,例如先使用getOptimalNewCameraMatrix()函数计算新的相机内参矩阵,然后使用initUndistortRectifyMap()函数初始化映射,最后使用remap()函数进行畸变校正。 #### 引用[.reference_title] - *1* *2* *3* [opencv畸变校正的两种方法](https://blog.csdn.net/qq_39619964/article/details/125784495)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值