*/
ORB(size_t n_features = 500, const CommonParams & detector_params = CommonParams());
+ /** destructor to empty the patterns */
+ ~ORB();
+
/** returns the descriptor size in bytes */
int descriptorSize() const;
{
// fill the extractors and descriptors for the corresponding scales
float factor = 1.0 / params_.scale_factor_ / params_.scale_factor_;
- int n_desired_features_per_scale = cvRound(n_features / ((std::pow(factor, (int)params_.n_levels_) - 1) / (factor - 1)));
+ int n_desired_features_per_scale = cvRound(n_features / ((std::pow(factor, int(params_.n_levels_)) - 1)
+ / (factor - 1)));
n_features_per_level_.resize(detector_params.n_levels_);
for (unsigned int level = 0; level < detector_params.n_levels_; level++)
{
}
}
+/** destructor to empty the patterns */
+ORB::~ORB()
+{
+ for (std::vector<OrbPatterns*>::const_iterator pattern = patterns_.begin(), pattern_end = patterns_.end(); pattern
+ != pattern_end; ++pattern)
+ if (*pattern)
+ delete *pattern;
+}
+
/** returns the descriptor size in bytes */
int ORB::descriptorSize() const
{