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 ¶meters = SimpleBlobDetector::Params());
protected:
...
};