Skip to content
Snippets Groups Projects
Commit 36cb6228 authored by tw00275's avatar tw00275
Browse files

Added clearance around the border

parent 692aa499
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -319,9 +319,11 @@ std::vector<cv::Mat> charucoAlignment(std::vector<cv::Mat> materialImages, int n
rvecs.push_back(rvec);
tvecs.push_back(tvec);
int borderWidth = height * 2.0/ySquares;
int clearance = borderWidth * 0.1;
int windowWidth = height * (ySquares-4.0)/(ySquares-2.0);
int windowHeight = height * (ySquares-4.0)/(xSquares-2.0);
cv::Rect crop = cv::Rect(borderWidth, borderWidth, windowWidth, windowHeight);
//cv::Rect crop = cv::Rect(borderWidth, borderWidth, windowWidth, windowHeight);
cv::Rect crop = cv::Rect(borderWidth + clearance, borderWidth + clearance, windowWidth - 2*clearance, windowHeight - 2*clearance);
//std::cout << "ChArUco board width: " << width << ", ChArUco board height: " << height << ", Border width: " << borderWidth << ", Window width: " << windowWidth << ", Window height: " << windowHeight << std::endl;
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment