Skip to content

Commit

Permalink
fix bugs in checker_detector.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorcius authored and gursimarsingh committed Jan 27, 2025
1 parent 1fd94a7 commit de8a6e0
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions modules/mcc/src/checker_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -453,9 +456,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() + innerRegion.tl());

restore_box.emplace_back(corner);
}
checker->setBox(restore_box);
{
cv::AutoLock lock(mtx);
m_checkers.push_back(checker);
Expand Down Expand Up @@ -1363,4 +1369,4 @@ float CCheckerDetectorImpl::
}

} // namespace mcc
} // namespace cv
} // namespace cv

0 comments on commit de8a6e0

Please sign in to comment.