Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Fisheye has been not declared in this scope error

$
0
0
I am trying to call cv::fisheye::undistortImage for removing distortion from image but in the compilation time its showing fisheye not declared in this scope . How to resolve this error? #include #include #include #include "opencv2/calib3d/calib3d.hpp" using namespace std; using namespace cv; using namespace fisheye; int main (int argc, const char * argv[]){ Mat img; img = imread(argv[1]); // Read the file Mat new_image; /// creating cameramatrix Mat cameraMatrix = Mat::zeros(3, 3, CV_64F); Mat distCoeff = Mat::zeros(1, 8, CV_64F); distCoeff.at(0,0) = -0.3682; distCoeff.at(0,1) = 0.2848; cameraMatrix.at(0, 0) = 611.18; /* 0*/ cameraMatrix.at(0, 2) = 515.31; /*0*/ cameraMatrix.at(1, 1) = 611.06; cameraMatrix.at(1, 2) = 402.07; /*0*/ /*0*/ cameraMatrix.at(2, 2) = 1; Mat newCameraMatrix; cameraMatrix.copyTo(newCameraMatrix); fisheye::undistortImage(img, new_image, cameraMatrix, distCoeff, newCameraMatrix); cout << cameraMatrix << endl << endl; imshow("new_image", new_image); waitKey(0); return 0; } Error: Fisheye is not a namespace name Error in main: Fisheye has not been declared in this scope

Viewing all articles
Browse latest Browse all 19555

Latest Images

Trending Articles



Latest Images