renaming draw

pull/3325/head
AleksandrPanov 2 years ago
parent 774a91a0e6
commit 86fc959fe0
  1. 2
      modules/aruco/include/opencv2/aruco.hpp
  2. 2
      modules/aruco/misc/python/test/test_aruco.py
  3. 2
      modules/aruco/perf/perf_aruco.cpp
  4. 2
      modules/aruco/samples/create_board.cpp
  5. 2
      modules/aruco/samples/create_board_charuco.cpp
  6. 2
      modules/aruco/samples/create_marker.cpp
  7. 2
      modules/aruco/samples/tutorial_charuco_create_detect.cpp
  8. 4
      modules/aruco/src/aruco.cpp
  9. 2
      modules/aruco/src/charuco.cpp
  10. 2
      modules/aruco/test/test_aruco_utils.hpp
  11. 2
      modules/aruco/test/test_charucodetection.cpp
  12. 2
      modules/aruco/test/test_misc.cpp

@ -140,7 +140,7 @@ CV_EXPORTS_W void estimatePoseSingleMarkers(InputArrayOfArrays corners, float ma
const Ptr<EstimateParameters>& estimateParameters = makePtr<EstimateParameters>()); const Ptr<EstimateParameters>& estimateParameters = makePtr<EstimateParameters>());
/** @deprecated Use CharucoBoard::testCharucoCornersCollinear /** @deprecated Use CharucoBoard::checkCharucoCornersCollinear
*/ */
CV_EXPORTS_W bool testCharucoCornersCollinear(const Ptr<CharucoBoard> &board, InputArray charucoIds); CV_EXPORTS_W bool testCharucoCornersCollinear(const Ptr<CharucoBoard> &board, InputArray charucoIds);

@ -17,7 +17,7 @@ class aruco_test(NewOpenCVTests):
id = 2 id = 2
marker_size = 100 marker_size = 100
offset = 10 offset = 10
img_marker = cv.aruco.drawMarker(aruco_dict, id, marker_size, aruco_params.markerBorderBits) img_marker = cv.aruco.generateImageMarker(aruco_dict, id, marker_size, aruco_params.markerBorderBits)
img_marker = np.pad(img_marker, pad_width=offset, mode='constant', constant_values=255) img_marker = np.pad(img_marker, pad_width=offset, mode='constant', constant_values=255)
gold_corners = np.array([[offset, offset],[marker_size+offset-1.0,offset], gold_corners = np.array([[offset, offset],[marker_size+offset-1.0,offset],
[marker_size+offset-1.0,marker_size+offset-1.0], [marker_size+offset-1.0,marker_size+offset-1.0],

@ -90,7 +90,7 @@ public:
// canonical image // canonical image
const int markerSizePixels = static_cast<int>(imgMarkerSize/sqrt(2.f)); const int markerSizePixels = static_cast<int>(imgMarkerSize/sqrt(2.f));
aruco::drawMarker(dictionary, id, markerSizePixels, img, parameters.markerBorderBits); aruco::generateImageMarker(dictionary, id, markerSizePixels, img, parameters.markerBorderBits);
// get rvec and tvec for the perspective // get rvec and tvec for the perspective
const double distance = 0.1; const double distance = 0.1;

@ -120,7 +120,7 @@ int main(int argc, char *argv[]) {
// show created board // show created board
Mat boardImage; Mat boardImage;
board->draw(imageSize, boardImage, margins, borderBits); board->generateImage(imageSize, boardImage, margins, borderBits);
if(showImage) { if(showImage) {
imshow("board", boardImage); imshow("board", boardImage);

@ -120,7 +120,7 @@ int main(int argc, char *argv[]) {
// show created board // show created board
Mat boardImage; Mat boardImage;
board->draw(imageSize, boardImage, margins, borderBits); board->generateImage(imageSize, boardImage, margins, borderBits);
if(showImage) { if(showImage) {
imshow("board", boardImage); imshow("board", boardImage);

@ -103,7 +103,7 @@ int main(int argc, char *argv[]) {
} }
Mat markerImg; Mat markerImg;
aruco::drawMarker(dictionary, markerId, markerSize, markerImg, borderBits); aruco::generateImageMarker(dictionary, markerId, markerSize, markerImg, borderBits);
if(showImage) { if(showImage) {
imshow("marker", markerImg); imshow("marker", markerImg);

@ -17,7 +17,7 @@ static inline void createBoard()
//! [createBoard] //! [createBoard]
cv::Ptr<cv::aruco::CharucoBoard> board = cv::aruco::CharucoBoard::create(5, 7, 0.04f, 0.02f, dictionary); cv::Ptr<cv::aruco::CharucoBoard> board = cv::aruco::CharucoBoard::create(5, 7, 0.04f, 0.02f, dictionary);
cv::Mat boardImage; cv::Mat boardImage;
board->draw(cv::Size(600, 500), boardImage, 10, 1); board->generateImage(cv::Size(600, 500), boardImage, 10, 1);
//! [createBoard] //! [createBoard]
cv::imwrite("BoardImage.jpg", boardImage); cv::imwrite("BoardImage.jpg", boardImage);
} }

@ -31,7 +31,7 @@ void refineDetectedMarkers(InputArray _image, const Ptr<Board> &_board,
} }
void drawPlanarBoard(const Ptr<Board> &board, Size outSize, const _OutputArray &img, int marginSize, int borderBits) { void drawPlanarBoard(const Ptr<Board> &board, Size outSize, const _OutputArray &img, int marginSize, int borderBits) {
board->draw(outSize, img, marginSize, borderBits); board->generateImage(outSize, img, marginSize, borderBits);
} }
void getBoardObjectAndImagePoints(const Ptr<Board> &board, InputArrayOfArrays detectedCorners, InputArray detectedIds, void getBoardObjectAndImagePoints(const Ptr<Board> &board, InputArrayOfArrays detectedCorners, InputArray detectedIds,
@ -120,7 +120,7 @@ bool estimatePoseCharucoBoard(InputArray charucoCorners, InputArray charucoIds,
} }
bool testCharucoCornersCollinear(const Ptr<CharucoBoard> &board, InputArray charucoIds) { bool testCharucoCornersCollinear(const Ptr<CharucoBoard> &board, InputArray charucoIds) {
return board->testCharucoCornersCollinear(charucoIds); return board->checkCharucoCornersCollinear(charucoIds);
} }
/** /**

@ -497,7 +497,7 @@ void drawCharucoDiamond(const Ptr<Dictionary> &dictionary, Vec4i ids, int square
// create a charuco board similar to a charuco marker and print it // create a charuco board similar to a charuco marker and print it
Ptr<CharucoBoard> board = CharucoBoard::create(3, 3, (float)squareLength, (float)markerLength, *dictionary, tmpIds); Ptr<CharucoBoard> board = CharucoBoard::create(3, 3, (float)squareLength, (float)markerLength, *dictionary, tmpIds);
Size outSize(3 * squareLength + 2 * marginSize, 3 * squareLength + 2 * marginSize); Size outSize(3 * squareLength + 2 * marginSize, 3 * squareLength + 2 * marginSize);
board->draw(outSize, _img, marginSize, borderBits); board->generateImage(outSize, _img, marginSize, borderBits);
} }

@ -65,7 +65,7 @@ static inline void projectMarker(Mat& img, Ptr<aruco::Board> board, int markerIn
// canonical image // canonical image
Mat markerImg; Mat markerImg;
const int markerSizePixels = 100; const int markerSizePixels = 100;
aruco::drawMarker(board->getDictionary(), board->getIds()[markerIndex], markerSizePixels, markerImg, markerBorder); aruco::generateImageMarker(board->getDictionary(), board->getIds()[markerIndex], markerSizePixels, markerImg, markerBorder);
// projected corners // projected corners
Mat distCoeffs(5, 1, CV_64FC1, Scalar::all(0)); Mat distCoeffs(5, 1, CV_64FC1, Scalar::all(0));

@ -641,7 +641,7 @@ TEST(Charuco, testBoardSubpixelCoords)
Ptr<aruco::CharucoBoard> board = cv::aruco::CharucoBoard::create(4, 4, 1.f, .8f, dict); Ptr<aruco::CharucoBoard> board = cv::aruco::CharucoBoard::create(4, 4, 1.f, .8f, dict);
// generate ChArUco board // generate ChArUco board
board->draw(Size(res.width, res.height), gray, 150); board->generateImage(Size(res.width, res.height), gray, 150);
cv::GaussianBlur(gray, gray, Size(5, 5), 1.0); cv::GaussianBlur(gray, gray, Size(5, 5), 1.0);
aruco::DetectorParameters params; aruco::DetectorParameters params;

@ -20,7 +20,7 @@ TEST(CV_ArucoDrawMarker, regression_1226)
ASSERT_NO_THROW( ASSERT_NO_THROW(
{ {
board->draw(sz, mat, 0, 1); board->generateImage(sz, mat, 0, 1);
}); });
} }

Loading…
Cancel
Save