all the tests now pass except for MSER
This commit is contained in:
@@ -2099,7 +2099,7 @@ BriskLayer::BriskLayer(const BriskLayer& layer, int mode)
|
||||
void
|
||||
BriskLayer::getAgastPoints(int threshold, std::vector<KeyPoint>& keypoints)
|
||||
{
|
||||
fast_9_16_ = FastFeatureDetector::create(threshold);
|
||||
fast_9_16_->set(FastFeatureDetector::THRESHOLD, threshold);
|
||||
fast_9_16_->detect(img_, keypoints);
|
||||
|
||||
// also write scores
|
||||
|
@@ -380,6 +380,30 @@ public:
|
||||
KeyPointsFilter::runByPixelsMask( keypoints, mask );
|
||||
}
|
||||
|
||||
void set(int prop, double value)
|
||||
{
|
||||
if(prop == THRESHOLD)
|
||||
threshold = cvRound(value);
|
||||
else if(prop == NONMAX_SUPPRESSION)
|
||||
nonmaxSuppression = value != 0;
|
||||
else if(prop == FAST_N)
|
||||
type = cvRound(value);
|
||||
else
|
||||
CV_Error(Error::StsBadArg, "");
|
||||
}
|
||||
|
||||
double get(int prop) const
|
||||
{
|
||||
if(prop == THRESHOLD)
|
||||
return threshold;
|
||||
if(prop == NONMAX_SUPPRESSION)
|
||||
return nonmaxSuppression;
|
||||
if(prop == FAST_N)
|
||||
return type;
|
||||
CV_Error(Error::StsBadArg, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int threshold;
|
||||
bool nonmaxSuppression;
|
||||
int type;
|
||||
|
@@ -800,9 +800,12 @@ extractMSER_8uC3( const Mat& src, Mat& labels,
|
||||
double emean = 0;
|
||||
Mat dx( src.rows, src.cols-1, CV_32FC1 );
|
||||
Mat dy( src.rows, src.cols, CV_32FC1 );
|
||||
|
||||
Ne = preprocessMSER_8UC3( map, edge, emean, src, dx, dy, Ne, params.edgeBlurSize );
|
||||
emean = emean / (double)Ne;
|
||||
|
||||
std::sort(edge, edge + Ne, LessThanEdge());
|
||||
|
||||
MSCREdge* edge_ub = edge+Ne;
|
||||
MSCREdge* edgeptr = edge;
|
||||
TempMSCR* mscrptr = mscr;
|
||||
|
Reference in New Issue
Block a user