|
|
|
@ -45,7 +45,7 @@ public: |
|
|
|
|
<< "Write_extrinsicParameters" << writeExtrinsics |
|
|
|
|
<< "Write_outputFileName" << outputFileName |
|
|
|
|
|
|
|
|
|
<< "Show_UndistortedImage" << showUndistorsed |
|
|
|
|
<< "Show_UndistortedImage" << showUndistorted |
|
|
|
|
|
|
|
|
|
<< "Input_FlipAroundHorizontalAxis" << flipVertical |
|
|
|
|
<< "Input_Delay" << delay |
|
|
|
@ -67,7 +67,7 @@ public: |
|
|
|
|
node["Calibrate_FixPrincipalPointAtTheCenter"] >> calibFixPrincipalPoint; |
|
|
|
|
node["Calibrate_UseFisheyeModel"] >> useFisheye; |
|
|
|
|
node["Input_FlipAroundHorizontalAxis"] >> flipVertical; |
|
|
|
|
node["Show_UndistortedImage"] >> showUndistorsed; |
|
|
|
|
node["Show_UndistortedImage"] >> showUndistorted; |
|
|
|
|
node["Input"] >> input; |
|
|
|
|
node["Input_Delay"] >> delay; |
|
|
|
|
node["Fix_K1"] >> fixK1; |
|
|
|
@ -214,7 +214,7 @@ public: |
|
|
|
|
bool calibFixPrincipalPoint; // Fix the principal point at the center
|
|
|
|
|
bool flipVertical; // Flip the captured images around the horizontal axis
|
|
|
|
|
string outputFileName; // The name of the file where to write
|
|
|
|
|
bool showUndistorsed; // Show undistorted images after calibration
|
|
|
|
|
bool showUndistorted; // Show undistorted images after calibration
|
|
|
|
|
string input; // The input ->
|
|
|
|
|
bool useFisheye; // use fisheye camera model for calibration
|
|
|
|
|
bool fixK1; // fix K1 distortion coefficient
|
|
|
|
@ -374,8 +374,8 @@ int main(int argc, char* argv[]) |
|
|
|
|
|
|
|
|
|
if( mode == CAPTURING ) |
|
|
|
|
{ |
|
|
|
|
if(s.showUndistorsed) |
|
|
|
|
msg = format( "%d/%d Undist", (int)imagePoints.size(), s.nrFrames ); |
|
|
|
|
if(s.showUndistorted) |
|
|
|
|
msg = cv::format( "%d/%d Undist", (int)imagePoints.size(), s.nrFrames ); |
|
|
|
|
else |
|
|
|
|
msg = format( "%d/%d", (int)imagePoints.size(), s.nrFrames ); |
|
|
|
|
} |
|
|
|
@ -387,7 +387,7 @@ int main(int argc, char* argv[]) |
|
|
|
|
//! [output_text]
|
|
|
|
|
//------------------------- Video capture output undistorted ------------------------------
|
|
|
|
|
//! [output_undistorted]
|
|
|
|
|
if( mode == CALIBRATED && s.showUndistorsed ) |
|
|
|
|
if( mode == CALIBRATED && s.showUndistorted ) |
|
|
|
|
{ |
|
|
|
|
Mat temp = view.clone(); |
|
|
|
|
if (s.useFisheye) |
|
|
|
@ -410,7 +410,7 @@ int main(int argc, char* argv[]) |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
if( key == 'u' && mode == CALIBRATED ) |
|
|
|
|
s.showUndistorsed = !s.showUndistorsed; |
|
|
|
|
s.showUndistorted = !s.showUndistorted; |
|
|
|
|
|
|
|
|
|
if( s.inputCapture.isOpened() && key == 'g' ) |
|
|
|
|
{ |
|
|
|
@ -422,7 +422,7 @@ int main(int argc, char* argv[]) |
|
|
|
|
|
|
|
|
|
// -----------------------Show the undistorted image for the image list ------------------------
|
|
|
|
|
//! [show_results]
|
|
|
|
|
if( s.inputType == Settings::IMAGE_LIST && s.showUndistorsed && !cameraMatrix.empty()) |
|
|
|
|
if( s.inputType == Settings::IMAGE_LIST && s.showUndistorted && !cameraMatrix.empty()) |
|
|
|
|
{ |
|
|
|
|
Mat view, rview, map1, map2; |
|
|
|
|
|
|
|
|
|