Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can someone explain why do I have a blue line drawn over my image while doing an ArUco Marker Detection using the drawDetectedMarkers() function?

image description

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.

Can someone explain why do I have a blue line drawn over my image while doing an ArUco Marker Detection using the drawDetectedMarkers() function?

image description

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:

fd = open(argv[2], O_RDWR);//accepts the name of the device as a string argument
if (fd == -1)
{
 perror("Opening video device");
 return 1;
}
if(print_caps(fd))
 return 1;

if(init_mmap(fd))
 return 1;

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) 
{
 image = capture_image(fd); 
 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;
}
close(fd);

cv::destroyWindow("Image View");
return 0;

}

Can someone explain why do I have a blue line drawn over my image while doing an ArUco Marker Detection using the drawDetectedMarkers() function?

image description

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:

fd = open(argv[2], O_RDWR);//accepts the name of the device as a string argument
if (fd == -1)
{
 perror("Opening video device");
 return 1;
}
if(print_caps(fd))
 return 1;

if(init_mmap(fd))
 return 1;

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) 
{
 image = capture_image(fd); 
cap >> image;
 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;
}
close(fd);

cv::destroyWindow("Image View");
return 0;

}

Can someone explain why do I have a blue line drawn over my image while doing an ArUco Marker Detection using the drawDetectedMarkers() function?

image description

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;
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;
}
close(fd);

cv::destroyWindow("Image View");
return 0;

}