本文整理汇总了C++中CameraParameters::getDistor方法的典型用法代码示例。如果您正苦于以下问题:C++ CameraParameters::getDistor方法的具体用法?C++ CameraParameters::getDistor怎么用?C++ CameraParameters::getDistor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CameraParameters
的用法示例。
在下文中一共展示了CameraParameters::getDistor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vIdle
/*!
*
*/
static void vIdle()
{
if (capture)
{
//capture image
vCapturer.grab();
vCapturer.retrieve( inImg);
undImg.create(inImg.size(),CV_8UC3);
//transform color that by default is BGR to RGB because windows systems do not allow reading
//BGR images with opengl properly
// cv::cvtColor(inImg,inImg,CV_BGR2RGB);
//remove distorion in image
cv::undistort(inImg,undImg, camParams.getCamMatrix(), camParams.getDistor());
//detect markers
mDetector.detect(undImg,markers, camParams.getCamMatrix(),Mat(),msiz->dval[0]);
//resize the image to the size of the GL window
cv::resize(undImg,resImg,glSize);
}
glutPostRedisplay();
}
示例2: vIdle
/*!
*
*/
static void vIdle()
{
if (capture)
{
//capture image
vCapturer >> inImg;
assert(inImg.empty()==false);
undImg.create(inImg.size(),CV_8UC3);
//by default, opencv works in BGR, so we must convert to RGB because OpenGL in windows prefer
// cv::cvtColor(inImg,inImg,CV_BGR2RGB);
//remove distortion in image
cv::undistort(inImg,undImg, camParams.getCamMatrix(),camParams.getDistor());
//detect markers
mDetector.detect(undImg,markers,camParams.getCamMatrix(),Mat(),msiz->dval[0]);
//Detection of the board
board.second=bDetector.detect(markers, boardConfig,board.first, camParams,msiz->dval[0]);
//check the speed by calculating the mean speed of all iterations
//resize the image to the size of the GL window
cv::resize(undImg, resImg, glSize);
}
glutPostRedisplay();
}