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

Update baseline estimate

parent 629a10a1
No related branches found
No related tags found
1 merge request!32Resolves #76 calibration rework
Pipeline #11425 passed
...@@ -374,7 +374,8 @@ void ftl::calibration::align(map<string, string> &opt) { ...@@ -374,7 +374,8 @@ void ftl::calibration::align(map<string, string> &opt) {
float baseline2 = std::abs(tr.x - btr.x); float baseline2 = std::abs(tr.x - btr.x);
float baseline3 = std::abs(bl.x - bbl.x); float baseline3 = std::abs(bl.x - bbl.x);
float baseline4 = std::abs(br.x - bbr.x); float baseline4 = std::abs(br.x - bbr.x);
float baseline = (baseline1 + baseline2 + baseline3 + baseline4) / 4.0f; float boardWidth = (std::abs(tl.x-tr.x) + std::abs(btl.x - btr.x)) / 2.0f;
float baseline = ((baseline1 + baseline2 + baseline3 + baseline4) / 4.0f) / boardWidth * (boardSize.width*squareSize);
putText(anag, string("Baseline: ") + std::to_string(baseline) + string("m"), Point(10,150), FONT_HERSHEY_PLAIN, 2.0, Scalar(0,255,0), 2); putText(anag, string("Baseline: ") + std::to_string(baseline) + string("m"), Point(10,150), FONT_HERSHEY_PLAIN, 2.0, Scalar(0,255,0), 2);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment