OpenCV 立体视觉:校准与矫正全解析
在计算机视觉领域,立体视觉技术对于获取场景的深度信息至关重要。本文将详细介绍使用 OpenCV 进行立体相机校准和图像矫正的相关技术,包括畸变校正、对极线计算、立体校准和立体矫正等内容。
1. 畸变校正与图像显示
在处理立体图像之前,首先需要对相机的畸变进行校正。以下是一段用于构建畸变校正映射并显示原始图像和校正后图像的代码:
// Build the undistort map which we will use for all
// subsequent frames.
//
cv::Mat map1, map2;
cv::initUndistortRectifyMap(
intrinsic_matrix_loaded, // Our camera matrix
distortion_coeffs_loaded, // Our distortion coefficients
cv::Mat(), // (Optional) Rectification, don't
// need.
intrinsic_matrix_loaded, // "New" matrix, here it's the same
// as the first argument.
image_size, // Size of undistorted image we want
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



