Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cannot find ChArUco board corners properly

I have problem with finding ChArUco board corners properly effect below:

https://youtu.be/Qq9FH4kPwwI

My code below:

bool CharucoBoardCalibration::findAndDraw(cv::Mat& frame, cv::Mat& outputFrame, bool showResult) { std::vector<int> ids; std::vector<std::vector<cv::point2f>> corners, rejected; // detect markers cv::aruco::detectMarkers(frame, dictionary, corners, ids, detectorParams, rejected);

 // refind strategy to detect more markers
cv::aruco::refineDetectedMarkers(frame, board, corners, ids, rejected);
cv::Mat currentCharucoCorners, currentCharucoIds;
 // interpolate charuco corners
if(ids.empty() == true)
{
    cv::putText(frame, "No ChArUco found", cv::Point2i(20,40), CV_FONT_HERSHEY_SIMPLEX, 1, cv::Scalar(0x00, 0x00, 0xff), 3);
    return false;
}
else
{
    cv::putText(frame, "ChArUco board was found", cv::Point2i(20,40), CV_FONT_HERSHEY_SIMPLEX, 1, cv::Scalar(0x00, 0xff, 0x00), 3);
}
if(ids.size() > 0)
{
    cv::aruco::interpolateCornersCharuco(corners, ids, frame, charucoboard, currentCharucoCorners, currentCharucoIds);
}
if(showResult == true )
{
    if(ids.size() > 0)
    {
        cv::aruco::drawDetectedMarkers(frame, corners);
    }
    if(currentCharucoCorners.total() > 0)
    {
        cv::aruco::drawDetectedCornersCharuco(frame, currentCharucoCorners, currentCharucoIds);
    }
}
outputFrame = frame;
return true;

}

Cannot find ChArUco board corners properly

I have problem with finding ChArUco board corners properly effect below:

https://youtu.be/Qq9FH4kPwwI

My code below:

bool CharucoBoardCalibration::findAndDraw(cv::Mat& frame, cv::Mat& outputFrame, bool showResult)
{
   showResult){

 std::vector<int> ids;
    std::vector<std::vector<cv::point2f>> std::vector<std::vector<cv::Point2f>> corners, rejected;
  // detect markers
  cv::aruco::detectMarkers(frame, dictionary, corners, ids, detectorParams, rejected);

rejected);

 // refind strategy to detect more markers
cv::aruco::refineDetectedMarkers(frame, board, corners, ids, rejected);
cv::Mat currentCharucoCorners, currentCharucoIds;
 // interpolate charuco corners
if(ids.empty() == true)
{
    cv::putText(frame, "No ChArUco found", cv::Point2i(20,40), CV_FONT_HERSHEY_SIMPLEX, 1, cv::Scalar(0x00, 0x00, 0xff), 3);
    return false;
}
else
{
    cv::putText(frame, "ChArUco board was found", cv::Point2i(20,40), CV_FONT_HERSHEY_SIMPLEX, 1, cv::Scalar(0x00, 0xff, 0x00), 3);
}
if(ids.size() > 0)
{
    cv::aruco::interpolateCornersCharuco(corners, ids, frame, charucoboard, currentCharucoCorners, currentCharucoIds);
}
if(showResult == true )
{
    if(ids.size() > 0)
    {
        cv::aruco::drawDetectedMarkers(frame, corners);
    }
    if(currentCharucoCorners.total() > 0)
    {
        cv::aruco::drawDetectedCornersCharuco(frame, currentCharucoCorners, currentCharucoIds);
    }
}
outputFrame = frame;
return true;

}

Cannot find ChArUco board corners properly

I have problem with finding ChArUco board corners properly effect below:

https://youtu.be/Qq9FH4kPwwI

My code below:

 bool CharucoBoardCalibration::findAndDraw(cv::Mat& frame, cv::Mat& outputFrame, bool showResult){

showResult)
{
    std::vector<int> ids;
 std::vector<std::vector<cv::Point2f>>    std::vector<std::vector<cv::point2f>> corners, rejected;
  // detect markers
  cv::aruco::detectMarkers(frame, dictionary, corners, ids, detectorParams, rejected);

rejected);

 // refind strategy to detect more markers
cv::aruco::refineDetectedMarkers(frame, board, corners, ids, rejected);
cv::Mat currentCharucoCorners, currentCharucoIds;
 // interpolate charuco corners
if(ids.empty() == true)
{
    cv::putText(frame, "No ChArUco found", cv::Point2i(20,40), CV_FONT_HERSHEY_SIMPLEX, 1, cv::Scalar(0x00, 0x00, 0xff), 3);
    return false;
}
else
{
    cv::putText(frame, "ChArUco board was found", cv::Point2i(20,40), CV_FONT_HERSHEY_SIMPLEX, 1, cv::Scalar(0x00, 0xff, 0x00), 3);
}
if(ids.size() > 0)
{
    cv::aruco::interpolateCornersCharuco(corners, ids, frame, charucoboard, currentCharucoCorners, currentCharucoIds);
}
if(showResult == true )
{
    if(ids.size() > 0)
    {
        cv::aruco::drawDetectedMarkers(frame, corners);
    }
    if(currentCharucoCorners.total() > 0)
    {
        cv::aruco::drawDetectedCornersCharuco(frame, currentCharucoCorners, currentCharucoIds);
    }
}
outputFrame = frame;
return true;

}

Cannot find ChArUco board corners properly

I have problem with finding ChArUco board corners properly effect below:

https://youtu.be/Qq9FH4kPwwI

 bool CharucoBoardCalibration::findAndDraw(cv::Mat& frame, cv::Mat& outputFrame, bool showResult)
{
    std::vector<int> ids;
    std::vector<std::vector<cv::point2f>> corners, rejected;
    // detect markers
    cv::aruco::detectMarkers(frame, dictionary, corners, ids, detectorParams, rejected);

My code:

 // refind strategy to detect more markers
cv::aruco::refineDetectedMarkers(frame, board, corners, ids, rejected);
cv::Mat currentCharucoCorners, currentCharucoIds;
 // interpolate charuco corners
if(ids.empty() == true)
{
    cv::putText(frame, "No ChArUco found", cv::Point2i(20,40), CV_FONT_HERSHEY_SIMPLEX, 1, cv::Scalar(0x00, 0x00, 0xff), 3);
    return false;
}
else
{
    cv::putText(frame, "ChArUco board was found", cv::Point2i(20,40), CV_FONT_HERSHEY_SIMPLEX, 1, cv::Scalar(0x00, 0xff, 0x00), 3);
}
if(ids.size() > 0)
{
    cv::aruco::interpolateCornersCharuco(corners, ids, frame, charucoboard, currentCharucoCorners, currentCharucoIds);
}
if(showResult == true )
{
    if(ids.size() > 0)
    {
        cv::aruco::drawDetectedMarkers(frame, corners);
    }
    if(currentCharucoCorners.total() > 0)
    {
        cv::aruco::drawDetectedCornersCharuco(frame, currentCharucoCorners, currentCharucoIds);
    }
}
outputFrame = frame;
return true;

https://paste.ofcode.org/EW9CXsewPpVtn8GKhStzeS

}It seems that somethink with interpolation is wrong, but I used example from contribution samples... What is wrong ?

Cannot find ChArUco board corners properly

I have problem with finding ChArUco board corners properly effect below:

https://youtu.be/Qq9FH4kPwwI

My code:

https://paste.ofcode.org/EW9CXsewPpVtn8GKhStzeS

It seems that somethink something with interpolation is wrong, but I used example from contribution samples... What is wrong ?