added empty() method to common features2d classes; fixed #831

This commit is contained in:
Maria Dimashova
2011-01-31 14:18:50 +00:00
parent fa446e7e35
commit 9b4c682623
7 changed files with 112 additions and 19 deletions

View File

@@ -860,8 +860,11 @@ int RTreeClassifier::countNonZeroElements(float *vec, int n, double tol)
void RTreeClassifier::read(const char* file_name)
{
std::ifstream file(file_name, std::ifstream::binary);
read(file);
file.close();
if( file.is_open() )
{
read(file);
file.close();
}
}
void RTreeClassifier::read(std::istream &is)