Sample calibration.cpp wrong lines?

asked 2015-08-30 12:13:28 -0600

LBerger gravatar image

Hi, I start working on calibration using sample calibration.cpp. I have copied following line for my own example and I don't understand parameter CV_16SC2 with remap(view, rview, map1, map2, INTER_LINEAR);

if( !capture.isOpened() && showUndistorted )
{
    Mat view, rview, map1, map2;
    Size imageSize2(1.1*imageSize.width,1.1*imageSize.height);
    initUndistortRectifyMap(cameraMatrix, distCoeffs, Mat(),
                            getOptimalNewCameraMatrix(cameraMatrix, distCoeffs, imageSize, 1, imageSize, 0),
                            imageSize2, CV_16SC2, map1, map2);

    for( i = 0; i < (int)imageList.size(); i++ )
    {
        view = imread(imageList[i], 1);
        if(view.empty())
            continue;
        //undistort( view, rview, cameraMatrix, distCoeffs, cameraMatrix );
        remap(view, rview, map1, map2, INTER_LINEAR);

I think it must be CV_16SC1 with remap(view, rview, map1, map2, INTER_LINEAR); or CV_16SC2 with remap(view, rview, map1, Mat(), INTER_LINEAR); Is it right?

edit retag flag offensive close merge delete