All modules (except ocl and gpu) compiles and pass tests

This commit is contained in:
Andrey Kamaev
2013-03-20 20:13:46 +04:00
parent 762aefd71b
commit 2ad7b97f1c
91 changed files with 606 additions and 604 deletions

View File

@@ -158,7 +158,7 @@ LatentSvmDetector::ObjectDetection::ObjectDetection( const Rect& _rect, float _s
LatentSvmDetector::LatentSvmDetector()
{}
LatentSvmDetector::LatentSvmDetector( const std::vector<std::string>& filenames, const std::vector<std::string>& _classNames )
LatentSvmDetector::LatentSvmDetector( const std::vector<cv::String>& filenames, const std::vector<cv::String>& _classNames )
{
load( filenames, _classNames );
}
@@ -182,7 +182,7 @@ bool LatentSvmDetector::empty() const
return detectors.empty();
}
const std::vector<std::string>& LatentSvmDetector::getClassNames() const
const std::vector<cv::String>& LatentSvmDetector::getClassNames() const
{
return classNames;
}
@@ -192,13 +192,13 @@ size_t LatentSvmDetector::getClassCount() const
return classNames.size();
}
static std::string extractModelName( const std::string& filename )
static cv::String extractModelName( const cv::String& filename )
{
size_t startPos = filename.rfind('/');
if( startPos == std::string::npos )
if( startPos == cv::String::npos )
startPos = filename.rfind('\\');
if( startPos == std::string::npos )
if( startPos == cv::String::npos )
startPos = 0;
else
startPos++;
@@ -210,7 +210,7 @@ static std::string extractModelName( const std::string& filename )
return filename.substr(startPos, substrLength);
}
bool LatentSvmDetector::load( const std::vector<std::string>& filenames, const std::vector<std::string>& _classNames )
bool LatentSvmDetector::load( const std::vector<cv::String>& filenames, const std::vector<cv::String>& _classNames )
{
clear();
@@ -218,7 +218,7 @@ bool LatentSvmDetector::load( const std::vector<std::string>& filenames, const s
for( size_t i = 0; i < filenames.size(); i++ )
{
const std::string filename = filenames[i];
const cv::String filename = filenames[i];
if( filename.length() < 5 || filename.substr(filename.length()-4, 4) != ".xml" )
continue;