如何在opencv 2.4.5的“featuredetector”的“simplebolbdetector”中设置过滤参数

时间:2014-02-13 13:56:28

标签: android opencv

private FeatureDetector  PupilBolbDetector;
public FeatureDetector BlobDetector()
{
    PupilBolbDetector = FeatureDetector.create(FeatureDetector.SIMPLEBLOB);
    return PupilBolbDetector;
}

如何在android opencv 2.4.5中设置simpleblobdetector的“thresholdStep”,“minThreshold”等过滤参数?我想使用simpleblobdetector进行瞳孔检测。上传代码是我生成simpleblobdetector的方法,所有参数都可以在Opencv的指导下找到,如下代码所示:

class SimpleBlobDetector : public FeatureDetector
{
    public:
    struct Params
{
    Params();
    float thresholdStep;
    float minThreshold;
    float maxThreshold;
    size_t minRepeatability;
    float minDistBetweenBlobs;

    bool filterByColor;
    uchar blobColor;

    bool filterByArea;
    float minArea, maxArea;

    bool filterByCircularity;
    float minCircularity, maxCircularity;

    bool filterByInertia;
    float minInertiaRatio, maxInertiaRatio;

    bool filterByConvexity;
    float minConvexity, maxConvexity;
};

SimpleBlobDetector(const SimpleBlobDetector::Params &parameters = SimpleBlobDetector::Params());

    protected:
    ...
};

0 个答案:

没有答案