Using Converter class to use cv::undistort in Matlab

OpenCV function void undistort(const Mat& src, Mat& dst, const Mat& cameraMatrix, const Mat& distCoeffs, const Mat& newCameraMatrix=Mat()) Matlab dst=mexUndistort(src,cameraMatrix,distCoeffs) MEX function source To compile you need opencv and boost. Mex command I used with Matlab R2011a and VC9 goes like this: mex mexUndistort.cpp matcv.cpp -IC:OpenCV2.3buildinclude -ID:NinadToolsboost_1_47_0 -LC:OpenCV2.3buildx64vc9lib -lopencv_core230 -lopencv_imgproc230   …

Continue reading