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 CharuCo slowdown #25507

Open
wants to merge 1 commit into
base: 4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ class CV_EXPORTS_W_SIMPLE CharucoBoard : public Board {

/** @brief get CharucoBoard::chessboardCorners
*/
CV_WRAP std::vector<Point3f> getChessboardCorners() const;
CV_WRAP std::vector<Point3f>& getChessboardCorners() const;

/** @brief get CharucoBoard::nearestMarkerIdx, for each charuco corner, nearest marker index in ids array
*/
CV_PROP std::vector<std::vector<int> > getNearestMarkerIdx() const;
CV_PROP std::vector<std::vector<int> >& getNearestMarkerIdx() const;

/** @brief get CharucoBoard::nearestMarkerCorners, for each charuco corner, nearest marker corner id of each marker
*/
CV_PROP std::vector<std::vector<int> > getNearestMarkerCorners() const;
CV_PROP std::vector<std::vector<int> >& getNearestMarkerCorners() const;

/** @brief check whether the ChArUco markers are collinear
*
Expand Down
6 changes: 3 additions & 3 deletions modules/objdetect/src/aruco/aruco_board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,17 +634,17 @@ bool CharucoBoard::checkCharucoCornersCollinear(InputArray charucoIds) const {
return true;
}

std::vector<Point3f> CharucoBoard::getChessboardCorners() const {
std::vector<Point3f>& CharucoBoard::getChessboardCorners() const {
CV_Assert(impl);
return static_pointer_cast<CharucoBoardImpl>(impl)->chessboardCorners;
}

std::vector<std::vector<int> > CharucoBoard::getNearestMarkerIdx() const {
std::vector<std::vector<int> >& CharucoBoard::getNearestMarkerIdx() const {
CV_Assert(impl);
return static_pointer_cast<CharucoBoardImpl>(impl)->nearestMarkerIdx;
}

std::vector<std::vector<int> > CharucoBoard::getNearestMarkerCorners() const {
std::vector<std::vector<int> >& CharucoBoard::getNearestMarkerCorners() const {
CV_Assert(impl);
return static_pointer_cast<CharucoBoardImpl>(impl)->nearestMarkerCorners;
}
Expand Down