0

I'm trying to use a marker generator using http://keystone.umd.edu/html/markergen.html

but the detected marker has a wrong Id.

here is my code

cv::Mat operator()(cv::Mat input)
    {
        cv::flip(input, input, 1);
        MDetector.setDictionary(aruco::Dictionary::ARUCO);
        iThresParam1 = MDetector.getParams()._thresParam1;
        iThresParam2 = MDetector.getParams()._thresParam2;
        MDetector.setThresholdParams(7, 7);
        MDetector.setThresholdParamRange(2, 0);

         //Ok, let's detect
        MDetector.detect(input,Markers,CamParam,-1);
        //for each marker, draw info and its boundaries in the image
        for (unsigned int i=0;i<Markers.size();i++) {
            Markers[i].draw(input,cv::Scalar(0,0,255),2);
        }

        cv::imshow("in",input);

        cv::imshow("thres", MDetector.getThresholdedImage());

        return input;
    }
andre
  • 1
  • 3

1 Answers1

0

Did you try to mirror the image coming from the camera? That sometimes leads to "incorrectly" detected ids.

Simon
  • 177
  • 5
  • Welcome to Stack Overflow! This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you [earn](http://meta.stackoverflow.com/q/146472/169503) sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment](http://stackoverflow.com/help/privileges/comment) on any post. If you have a related but different question, [ask a new question](http://stackoverflow.com/questions/ask) referencing this one if it will help provide context. – ddb Jul 28 '16 at 08:42