mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-06 07:06:10 +00:00
t/calib: Tidy TermCriteria
This commit is contained in:
parent
645a45c167
commit
6bc617b8e3
|
@ -274,14 +274,15 @@ do_view(class Calibration &c,
|
||||||
|
|
||||||
// Improve the corner positions.
|
// Improve the corner positions.
|
||||||
if (found && c.subpixel_enable) {
|
if (found && c.subpixel_enable) {
|
||||||
cv::TermCriteria tcrit(cv::TermCriteria::Type::COUNT +
|
int crit_flag = 0;
|
||||||
cv::TermCriteria::Type::EPS,
|
crit_flag |= cv::TermCriteria::EPS;
|
||||||
30, 0.1);
|
crit_flag |= cv::TermCriteria::COUNT;
|
||||||
|
cv::TermCriteria term_criteria = {crit_flag, 30, 0.1};
|
||||||
|
|
||||||
cv::Size size(c.subpixel_size, c.subpixel_size);
|
cv::Size size(c.subpixel_size, c.subpixel_size);
|
||||||
cv::Size zero(-1, -1);
|
cv::Size zero(-1, -1);
|
||||||
|
|
||||||
cv::cornerSubPix(grey, view.current, size, zero, tcrit);
|
cv::cornerSubPix(grey, view.current, size, zero, term_criteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the checker board, will also draw partial hits.
|
// Draw the checker board, will also draw partial hits.
|
||||||
|
|
Loading…
Reference in a new issue