如何使用opencv获取所有未失真的图像 [英] how to get all undistorted image with opencv

查看:75
本文介绍了如何使用opencv获取所有未失真的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在取消cv::undistort的声音,但是会裁切图像.我想拥有所有未失真的图像,以便未失真的尺寸大于原始图像,如下所示:

I'm unsing cv::undistort but it crops the image. I'd like to have all the undistorted image, so that the undistorted size is bigger then the original one, like this:

我认为我需要使用cv::getOptimalNewCameraMatrix,但是我的试验没有运气..有帮助吗?

I think I need to use cv::getOptimalNewCameraMatrix but I had no luck with my trials.. some help?

推荐答案

仅作记录: 您应该使用 cv :: getOptimalNewCameraMatrix 并将aplha参数设置为1. Aplha 0仅显示图像上的有效点,alpha 1显示所有原始点以及黑色区域.

Just for the record: You should use cv::getOptimalNewCameraMatrix and set the aplha parameter to 1. Aplha 0 only shows valid points on the image, alpha 1 shows all the original points as well as black regions.

这篇关于如何使用opencv获取所有未失真的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆