0

我正在尝试使用http://keystone.umd.edu/html/markergen.html使用标记生成器

但检测到的标记有错误的 ID。

这是我的代码

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;
    }
4

1 回答 1

0

您是否尝试镜像来自相机的图像?这有时会导致“错误地”检测到 ID。

于 2016-07-28T08:20:52.747 回答