3

I generate a series of aruco markers DICT_4X4_50 and I print them but when I launch the detector on this image for example, it doesn't work.. Though the marker is fairly visible:

enter image description here

int main(int argv, char** argc)
{
    Mat frame = imread(argc[1], CV_LOAD_IMAGE_COLOR);

    vector<int> markerIds;
    vector<vector<Point2f>> markerCorners, rejectedCandidates;

    Ptr<aruco::Dictionary> markerDictionary = aruco::getPredefinedDictionary(aruco::PREDEFINED_DICTIONARY_NAME::DICT_4X4_50);

    aruco::detectMarkers(frame, markerDictionary, markerCorners, markerIds);


    aruco::drawDetectedMarkers(frame, markerCorners, markerIds);
    imshow("Webcam", frame);
    waitKey(0);

}

Is the image not good enough or is there some parameters I can modify?

Ja_cpp
  • 2,426
  • 7
  • 27
  • 49

1 Answers1

2

I've checked the rejectedCandidates and I found out that it's detecting the marker but it was rejected for some reason!

So I moved to another marker which is Apriltags and it gives better result.. I don't know which library is the best out there but keep trying and see which one works for you well.

Ja_cpp
  • 2,426
  • 7
  • 27
  • 49