Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bugs in checker_detector.cpp after resolving conflicts from PR #3599 #3877

Merged
merged 4 commits into from
Feb 3, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix bugs in checker_detector.cpp
Zorcius authored and gursimarsingh committed Jan 24, 2025
commit fe56753ce8d6aec26fca455e94abf4c9bc95cf79
16 changes: 11 additions & 5 deletions modules/mcc/src/checker_detector.cpp
Original file line number Diff line number Diff line change
@@ -232,9 +232,12 @@ bool CCheckerDetectorImpl::
#endif
for (Ptr<CChecker> checker : checkers)
{
for (cv::Point2f &corner : checker->getBox())
std::vector<cv::Point2f> restore_box;
for (cv::Point2f &corner : checker->getBox()){
corner += static_cast<cv::Point2f>(region.tl());

restore_box.emplace_back(corner);
}
checker->setBox(restore_box);
{
cv::AutoLock lock(mtx);
m_checkers.push_back(checker);
@@ -453,9 +456,12 @@ bool CCheckerDetectorImpl::
#endif
for (Ptr<CChecker> checker : checkers)
{
for (cv::Point2f &corner : checker->getBox())
corner += static_cast<cv::Point2f>(region.tl() + innerRegion.tl());

std::vector<cv::Point2f> restore_box;
for (cv::Point2f &corner : checker->getBox()){
corner += static_cast<cv::Point2f>(region.tl());
restore_box.emplace_back(corner);
}
checker->setBox(restore_box);
{
cv::AutoLock lock(mtx);
m_checkers.push_back(checker);