void add( const Mat& descriptors );
const vector<Mat>& getDescriptors() const;
- int descripotorsCount() const;
+ int descriptorsCount() const;
virtual void clear();
-BOWTrainer::descripotorsCount
+BOWTrainer::descriptorsCount
---------------------------------
Returns the count of all descriptors stored in the training set.
-.. ocv:function:: int BOWTrainer::descripotorsCount() const
+.. ocv:function:: int BOWTrainer::descriptorsCount() const
while( images.size() > 0 )
{
- if( bowTrainer.descripotorsCount() > maxDescCount )
+ if( bowTrainer.descriptorsCount() > maxDescCount )
{
#ifdef DEBUG_DESC_PROGRESS
- cout << "Breaking due to full memory ( descriptors count = " << bowTrainer.descripotorsCount()
+ cout << "Breaking due to full memory ( descriptors count = " << bowTrainer.descriptorsCount()
<< "; descriptor size in bytes = " << descByteSize << "; all used memory = "
- << bowTrainer.descripotorsCount()*descByteSize << endl;
+ << bowTrainer.descriptorsCount()*descByteSize << endl;
#endif
break;
}
for( int i = 0; i < descCount; i++ )
{
- if( usedMask[i] && bowTrainer.descripotorsCount() < maxDescCount )
+ if( usedMask[i] && bowTrainer.descriptorsCount() < maxDescCount )
bowTrainer.add( imageDescriptors.row(i) );
}
}
#ifdef DEBUG_DESC_PROGRESS
cout << images.size() << " images left, " << images[randImgIdx].id << " processed - "
<</* descs_extracted << "/" << image_descriptors.rows << " extracted - " << */
- cvRound((static_cast<double>(bowTrainer.descripotorsCount())/static_cast<double>(maxDescCount))*100.0)
+ cvRound((static_cast<double>(bowTrainer.descriptorsCount())/static_cast<double>(maxDescCount))*100.0)
<< " % memory used" << ( imageDescriptors.empty() ? " -> no descriptors extracted, skipping" : "") << endl;
#endif
images.erase( images.begin() + randImgIdx );
}
- cout << "Maximum allowed descriptor count: " << maxDescCount << ", Actual descriptor count: " << bowTrainer.descripotorsCount() << endl;
+ cout << "Maximum allowed descriptor count: " << maxDescCount << ", Actual descriptor count: " << bowTrainer.descriptorsCount() << endl;
cout << "Training vocabulary..." << endl;
vocabulary = bowTrainer.cluster();