Commit 5624ad2c authored by dmitriy.anisimov's avatar dmitriy.anisimov

slight updated ir_affine

parent 4000b35d
set(the_description "datasets tools")
ocv_define_module(datasetstools opencv_core)
ocv_define_module(datasetstools opencv_core opencv_features2d)
......@@ -78,13 +78,27 @@ void IR_affineImp::loadDataset(const string &path)
test.push_back(vector< Ptr<Object> >());
validation.push_back(vector< Ptr<Object> >());
// detect image extension
string ext;
vector<string> fileNames;
getDirList(path, fileNames);
for (vector<string>::iterator it=fileNames.begin(); it!=fileNames.end(); ++it)
{
string &name = *it;
if (name.length()>=8 && name.substr(0, 3)=="img")
{
ext = name.substr(name.length()-4, 4);
break;
}
}
for (unsigned int i=1; i<=6; ++i)
{
Ptr<IR_affineObj> curr(new IR_affineObj);
char tmp[2];
sprintf(tmp, "%u", i);
curr->imageName = path + "img" + tmp + ".ppm";
curr->imageName = path + "img" + tmp + ext;
if (i>1)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment