fixed several test failures; currently 9 out of 73 tests fail
This commit is contained in:
@@ -187,6 +187,28 @@ namespace cv
|
||||
}
|
||||
}
|
||||
|
||||
void write(FileStorage& fs) const
|
||||
{
|
||||
fs << "descriptor" << descriptor;
|
||||
fs << "descriptor_channels" << descriptor_channels;
|
||||
fs << "descriptor_size" << descriptor_size;
|
||||
fs << "threshold" << threshold;
|
||||
fs << "octaves" << octaves;
|
||||
fs << "sublevels" << sublevels;
|
||||
fs << "diffusivity" << diffusivity;
|
||||
}
|
||||
|
||||
void read(const FileNode& fn)
|
||||
{
|
||||
descriptor = (int)fn["descriptor"];
|
||||
descriptor_channels = (int)fn["descriptor_channels"];
|
||||
descriptor_size = (int)fn["descriptor_size"];
|
||||
threshold = (float)fn["threshold"];
|
||||
octaves = (int)fn["octaves"];
|
||||
sublevels = (int)fn["sublevels"];
|
||||
diffusivity = (int)fn["diffusivity"];
|
||||
}
|
||||
|
||||
int descriptor;
|
||||
int descriptor_channels;
|
||||
int descriptor_size;
|
||||
|
@@ -2099,7 +2099,7 @@ BriskLayer::BriskLayer(const BriskLayer& layer, int mode)
|
||||
void
|
||||
BriskLayer::getAgastPoints(int threshold, std::vector<KeyPoint>& keypoints)
|
||||
{
|
||||
fast_9_16_->set("threshold", threshold);
|
||||
fast_9_16_ = FastFeatureDetector::create(threshold);
|
||||
fast_9_16_->detect(img_, keypoints);
|
||||
|
||||
// also write scores
|
||||
|
@@ -60,6 +60,11 @@ void Feature2D::detect( InputArray image,
|
||||
std::vector<KeyPoint>& keypoints,
|
||||
InputArray mask )
|
||||
{
|
||||
if( image.empty() )
|
||||
{
|
||||
keypoints.clear();
|
||||
return;
|
||||
}
|
||||
detectAndCompute(image, mask, keypoints, noArray(), false);
|
||||
}
|
||||
|
||||
@@ -97,6 +102,11 @@ void Feature2D::compute( InputArray image,
|
||||
std::vector<KeyPoint>& keypoints,
|
||||
OutputArray descriptors )
|
||||
{
|
||||
if( image.empty() )
|
||||
{
|
||||
descriptors.release();
|
||||
return;
|
||||
}
|
||||
detectAndCompute(image, noArray(), keypoints, descriptors, true);
|
||||
}
|
||||
|
||||
|
@@ -132,6 +132,26 @@ namespace cv
|
||||
}
|
||||
}
|
||||
|
||||
void write(FileStorage& fs) const
|
||||
{
|
||||
fs << "extended" << (int)extended;
|
||||
fs << "upright" << (int)upright;
|
||||
fs << "threshold" << threshold;
|
||||
fs << "octaves" << octaves;
|
||||
fs << "sublevels" << sublevels;
|
||||
fs << "diffusivity" << diffusivity;
|
||||
}
|
||||
|
||||
void read(const FileNode& fn)
|
||||
{
|
||||
extended = (int)fn["extended"] != 0;
|
||||
upright = (int)fn["upright"] != 0;
|
||||
threshold = (float)fn["threshold"];
|
||||
octaves = (int)fn["octaves"];
|
||||
sublevels = (int)fn["sublevels"];
|
||||
diffusivity = (int)fn["diffusivity"];
|
||||
}
|
||||
|
||||
bool extended;
|
||||
bool upright;
|
||||
float threshold;
|
||||
|
@@ -145,7 +145,7 @@ int KAZEFeatures::Create_Nonlinear_Scale_Space(const Mat &img)
|
||||
*/
|
||||
void KAZEFeatures::Compute_KContrast(const Mat &img, const float &kpercentile)
|
||||
{
|
||||
options_.kcontrast = compute_k_percentile(img, kpercentile, options_.sderivatives, options_.kcontrast_bins, 0, 0);
|
||||
options_.kcontrast = compute_k_percentile(img, kpercentile, options_.sderivatives, options_.kcontrast_bins, 0, 0);
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
|
Reference in New Issue
Block a user