Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion modules/saliency/doc/misc
Submodule misc deleted from 16789e
6 changes: 3 additions & 3 deletions modules/saliency/src/BING/CmFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bool CmFile::MkDir( std::string &_path )
if( _path.size() == 0 )
return false;
static char buffer[1024];
strcpy( buffer, _S( _path ) );
strcpy( buffer, _path.c_str() );
#ifdef _WIN32
for (int i = 0; buffer[i] != 0; i ++)
{
Expand All @@ -64,7 +64,7 @@ bool CmFile::MkDir( std::string &_path )
}
}

CreateDirectoryA(_S(_path), 0);
CreateDirectoryA(_path.c_str(), 0);
return true;
#else
for ( int i = 0; buffer[i] != 0; i++ )
Expand All @@ -76,7 +76,7 @@ bool CmFile::MkDir( std::string &_path )
buffer[i] = '/';
}
}
mkdir( _S( _path ), 0 );
mkdir( _path.c_str(), 0 );
return true;
#endif
}
Expand Down
1 change: 0 additions & 1 deletion modules/saliency/src/BING/kyheader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ enum
CV_FLIP_VERTICAL = 0,
CV_FLIP_HORIZONTAL = 1
};
#define _S(str) ((str).c_str())
#define CHK_IND(p) ((p).x >= 0 && (p).x < _w && (p).y >= 0 && (p).y < _h)
#define CV_Assert_(expr, args) \
{\
Expand Down
4 changes: 2 additions & 2 deletions modules/saliency/src/BING/objectnessBING.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ int ObjectnessBING::loadTrainedModel( std::string modelName ) // Return -1, 0,

if( !matRead( s1, filters1f ) || !matRead( sI, idx1i ) )
{
printf( "Can't load model: %s or %s\n", _S( s1 ), _S( sI ) );
printf( "Can't load model: %s or %s\n", s1.c_str(), sI.c_str() );
return 0;
}

Expand Down Expand Up @@ -401,7 +401,7 @@ void ObjectnessBING::getObjBndBoxesForSingleImage( Mat img, ValStructVec<float,
CStr fName = _bbResDir + "bb";
std::vector<Vec4i> sortedBB = finalBoxes.getSortedStructVal();
std::ofstream ofs;
ofs.open( _S( fName + ".txt" ), std::ofstream::out );
ofs.open( ( fName + ".txt" ).c_str(), std::ofstream::out );
std::stringstream dim;
dim << sortedBB.size();
ofs << dim.str() << "\n";
Expand Down