Skip to content

Commit

Permalink
Merge pull request opencv#3174 from AleksandrPanov:fix_gridboard_objP…
Browse files Browse the repository at this point in the history
…oints

Fix objPoints order in GridBoard and CharucoBoard

* fix gridBoard

* fix charucoBoard

* add rightBottomBorder

* add test_aruco_utils and code refactoring/fix tests

* fix axes and add charuco dict

* add axes test, remove drawAxis(), update tutorial
  • Loading branch information
andy-held committed Mar 23, 2022
1 parent c1ede68 commit b49a43f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions modules/aruco/src/aruco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,9 @@ static void _refineCandidateLines(std::vector<Point>& nContours, std::vector<Poi
cntPts[group].push_back(contour2f[i]);
}
for (int i = 0; i < 4; i++)
{
CV_Assert(cornerIndex[i] != -1);
}
// saves extra group into corresponding
if( !cntPts[4].empty() ){
for( unsigned int i=0; i < cntPts[4].size() ; i++ )
Expand Down
6 changes: 6 additions & 0 deletions modules/aruco/test/test_boarddetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ the use of this software, even if advised of the possibility of such damage.

namespace opencv_test { namespace {

enum class ArucoAlgParams
{
USE_DEFAULT = 0,
USE_ARUCO3 = 1
};

/**
* @brief Check pose estimation of aruco board
*/
Expand Down
2 changes: 1 addition & 1 deletion modules/aruco/test/test_charucodetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ TEST(Charuco, testBoardSubpixelCoords)
std::vector<int> ids;
std::vector<std::vector<cv::Point2f>> corners, rejected;

cv::aruco::detectMarkers(gray, dict, corners, ids, params, rejected, K);
cv::aruco::detectMarkers(gray, dict, corners, ids, params, rejected);

ASSERT_EQ(ids.size(), size_t(8));

Expand Down

0 comments on commit b49a43f

Please sign in to comment.