Can someone explain why do I have a blue line drawn over my image while doing an ArUco Marker Detection using the drawDetectedMarkers() function?
As can be seen in the image,some of the detected markers have a blue line associated with them. Can anyone kindly explain why is this so?
Thanks in advance.
Here is the relevant part of the code:
cv::Ptr<cv::aruco::Dictionary> dictionary =
cv::aruco::getPredefinedDictionary(cv::aruco::DICT_6X6_250);
cv::Mat image;
std::vector<int> ids;
std::vector<std::vector<cv::Point2f> > corners;
//Clock Variables
clock_t begin, end;
double dt;
cv::namedWindow("Image View");
cv::moveWindow("Image View", 20,20);
double c_y, c_x;
double mean_x, mean_y, d_fm_ctr;
while (true)
{
cap >> image; // videocapture is used to take images from a camera in Real Time
begin = clock();
c_y = (image.rows - 1)/2;
c_x = (image.cols - 1)/2;
cv::aruco::detectMarkers(image, dictionary, corners, ids);
// if at least one marker detected
if (ids.size() > 0)
{
cv::aruco::drawDetectedMarkers(image, corners, ids);
}
end = clock();
dt = double(end - begin) / CLOCKS_PER_SEC;
//std::cout << 1/dt << std::endl;
cv::imshow("Image View", image);
char key = (char) cv::waitKey(1);
if (key == 27)
break;
}
cv::destroyWindow("Image View");
return 0;
}
Any chance you can post your code and input image?
os, opencv version ? reminds me of this
Its in principle one of your axis that is drawn incorrectly. First try the latest master branch, as @berak indicated, that might already solve it.