Skip to content

Commit

Permalink
Fix bug in Micro QR pose estimation
Browse files Browse the repository at this point in the history
Summary: Fix order of finder pattern corners when passed to the pose estimation.

Reviewed By: enpe

Differential Revision:
D64263377

Privacy Context Container: L1191897

fbshipit-source-id: bd2fa636fa7f3f7082117c5e921d0f0e68da28ba
  • Loading branch information
thorntondr authored and facebook-github-bot committed Oct 14, 2024
1 parent b9aa7ec commit 0ce545c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions impl/ocean/cv/detector/qrcodes/MicroQRCodeDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,11 @@ bool MicroQRCodeDetector::computePosesAndProvisionalVersions(const AnyCamera& an

Vectors2 imagePoints;
imagePoints.reserve(numPoints);
imagePoints.push_back(finderPattern.position());
imagePoints.insert(imagePoints.end(), finderPattern.corners(), finderPattern.corners() + 4u);
imagePoints.emplace_back(finderPattern.position());
for (unsigned int i = 0u; i < 4u; i++)
{
imagePoints.emplace_back(finderPattern.corners()[(corner + i) % 4u]);
}
imagePoints.insert(imagePoints.end(), horizontalTimingCenters.begin(), horizontalTimingCenters.begin() + numHorizontalTimingModules);
imagePoints.insert(imagePoints.end(), verticalTimingCenters.begin(), verticalTimingCenters.begin() + numVerticalTimingModules);

Expand Down

0 comments on commit 0ce545c

Please sign in to comment.