Add modules arguments - test with binarization

This commit is contained in:
jfmcarreira committed 2015-03-22 04:27:57 +00:00
1 parent 013a5a967c
commit 2072efd2d7
11 files changed
+79 -10

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ CONFIGURE_FILE( PlaYUVerConfig.cmake.in ${CMAKE_BINARY_DIR}/PlaYUVerConfig.cmake
ADD_LIBRARY( PlaYUVerLib STATIC ${plaYUver_Lib_SRCS} )
INCLUDE_DIRECTORIES( ${FFMPEG_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} )
TARGET_LINK_LIBRARIES( PlaYUVerLib ${FFMPEG_LIBRARIES} ${OpenCV_LIBRARIES} ${Boost_LIBRARIES} )
TARGET_LINK_LIBRARIES( PlaYUVerLib ${FFMPEG_LIBRARIES} ${OpenCV_LIBRARIES} )
INSTALL(FILES ${plaYUver_Lib_HEADERS} DESTINATION include )
# INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libPlaYUVerLib${CMAKE_STATIC_LIBRARY_SUFFIX} DESTINATION lib )
+26 -6
View File
@@ -67,10 +67,10 @@ Bool PlaYUVerCmdParser::parse()
// m_cParserOptions.setDefaults();
m_aUnhandledArgs = scanArgv( m_cParserOptions, m_iArgc, ( const Char** )m_ppArgv );
// for( std::list<const Char*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++ )
// {
// fprintf( stderr, "Unhandled argument ignored: `%s'\n", *it );
// }
// for( std::list<const Char*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++ )
// {
// fprintf( stderr, "Unhandled argument ignored: `%s'\n", *it );
// }
if( checkListingOpts() )
{
@@ -91,6 +91,28 @@ Bool PlaYUVerCmdParser::parse()
return true;
}
Bool PlaYUVerCmdParser::parse( Options& opts, Int argc, Char *argv[] )
{
try
{
// m_cParserOptions.setDefaults();
m_aUnhandledArgs = scanArgv( opts, argc, ( const Char** )argv );
}
catch( std::exception& e )
{
std::cerr << "error: "
<< e.what()
<< "\n";
return false;
}
catch( ... )
{
std::cerr << "Exception of unknown type!\n";
}
return true;
}
Bool PlaYUVerCmdParser::checkListingOpts()
{
Bool bRet = false;
@@ -111,7 +133,6 @@ Bool PlaYUVerCmdParser::checkListingOpts()
}
bRet |= true;
}
if( Opts()["quality_metrics"]->count() )
{
printf( "PlaYUVer supported quality metrics: \n" );
@@ -121,7 +142,6 @@ Bool PlaYUVerCmdParser::checkListingOpts()
}
bRet |= true;
}
return bRet;
}
+1
View File
@@ -40,6 +40,7 @@ public:
m_ppArgv = argv;
}
Bool parse();
Bool parse( Options& opts, Int argc, Char *argv[] );
std::list<const Char*>& getNoArgs();
Options& Opts();
private:
+4
View File
@@ -54,6 +54,7 @@ namespace plaYUVer
Options::Options( const std::string& name )
{
opt_name = name;
allow_unknow = false;
}
Options::~Options()
@@ -309,6 +310,8 @@ bool storePair( Options& opts, bool allow_long, bool allow_short, const string&
if( !found )
{
if( !opts.allow_unknow )
{
/* not found */
cerr << "Unknown option: `"
<< name
@@ -316,6 +319,7 @@ bool storePair( Options& opts, bool allow_long, bool allow_short, const string&
<< value
<< "')"
<< endl;
}
return false;
}
+2
View File
@@ -263,6 +263,8 @@ struct Options
NamesMap opt_short_map;
std::string opt_name;
Bool allow_unknow;
};
/* Class with templated overloaded operator(), for use by Options::addOptions() */