Calibration.cpp return-statement with a value, in function returning 'void'
kashimAstro opened this issue · comments
Hi @kylemcdonald,
with debian stretch and g++ version 4.9.2-10 one of function undistort, return-statement error,
because it tries to return a boolean, but it has been declared as a void.
I have modified these files to solve:
ofxCv/libs/ofxCv/include/ofxCv/Calibration.h line 74
bool undistort(cv::Mat img, int interpolationMode = cv::INTER_LINEAR);
ofxCv/libs/ofxCv/src/Calibration.cpp line 402
bool Calibration::undistort(Mat img, int interpolationMode) {
if(img.rows != undistortMapX.rows || img.cols != undistortMapX.cols){
ofLog(OF_LOG_ERROR, "undistort() Input image and undistort map not same size");
return false;
}
img.copyTo(undistortBuffer);
undistort(undistortBuffer, img, interpolationMode);
return true;
}
maybe it can be useful, greetings!
Dario
fixed