Skip to content
Snippets Groups Projects
Commit 58a4fb02 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Support variable delay in calibration

parent 8836624a
No related branches found
No related tags found
No related merge requests found
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
"calibration": { "calibration": {
"board_size": [9,6], "board_size": [9,6],
"square_size": 50, "square_size": 50,
"frame_delay": 100, "frame_delay": 1.0,
"num_frames": 25, "num_frames": 35,
"assume_zero_tangential_distortion": true, "assume_zero_tangential_distortion": true,
"fix_aspect_ratio": true, "fix_aspect_ratio": true,
"fix_principal_point_at_center": true, "fix_principal_point_at_center": true,
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
"disparity": { "disparity": {
"algorithm": "rtcensus", "algorithm": "rtcensus",
"use_cuda": true, "use_cuda": true,
"minimum": 10, "minimum": 0,
"maximum": 208, "maximum": 208,
"tau": 0.0, "tau": 0.0,
"gamma": 0.0, "gamma": 0.0,
......
...@@ -35,7 +35,7 @@ class Calibrate { ...@@ -35,7 +35,7 @@ class Calibrate {
float squareSize; // The size of a square in your defined unit (point, millimeter,etc). float squareSize; // The size of a square in your defined unit (point, millimeter,etc).
int nrFrames; // The number of frames to use from the input for calibration int nrFrames; // The number of frames to use from the input for calibration
float aspectRatio; // The aspect ratio float aspectRatio; // The aspect ratio
int delay; // In case of a video input float delay; // In case of a video input
bool writePoints; // Write detected feature points bool writePoints; // Write detected feature points
bool writeExtrinsics; // Write extrinsic parameters bool writeExtrinsics; // Write extrinsic parameters
bool writeGrid; // Write refined 3D target grid points bool writeGrid; // Write refined 3D target grid points
......
...@@ -409,7 +409,7 @@ bool Calibrate::_recalibrate(vector<vector<Point2f>> *imagePoints, ...@@ -409,7 +409,7 @@ bool Calibrate::_recalibrate(vector<vector<Point2f>> *imagePoints,
found1 = findChessboardCorners( view[0], settings_.boardSize, pointBuf[0], chessBoardFlags); found1 = findChessboardCorners( view[0], settings_.boardSize, pointBuf[0], chessBoardFlags);
found2 = !local_->isStereo() || findChessboardCorners( view[1], settings_.boardSize, pointBuf[1], chessBoardFlags); found2 = !local_->isStereo() || findChessboardCorners( view[1], settings_.boardSize, pointBuf[1], chessBoardFlags);
if (found1 && found2 && local_->getTimestamp()-prevTimestamp > 0.5) // If done with success, if (found1 && found2 && local_->getTimestamp()-prevTimestamp > settings_.delay) // If done with success,
{ {
prevTimestamp = local_->getTimestamp(); prevTimestamp = local_->getTimestamp();
// improve the found corners' coordinate accuracy for chessboard // improve the found corners' coordinate accuracy for chessboard
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment