"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/tmo/mantiuk06/pfstmo_mantiuk06.cpp" between
pfstools-2.1.0.tgz and pfstools-2.2.0.tgz

About: pfstools are a set of command line programs (and one GUI program) for reading, writing, manipulating, and viewing high-dynamic range (HDR) images and video frames (similar as the netpbm package does for low-dynamic range images).

pfstmo_mantiuk06.cpp  (pfstools-2.1.0.tgz):pfstmo_mantiuk06.cpp  (pfstools-2.2.0.tgz)
skipping to change at line 96 skipping to change at line 96
float saturationFactor = 0.8f; float saturationFactor = 0.8f;
bool cont_map = false, cont_eq = false, bcg = false; bool cont_map = false, cont_eq = false, bcg = false;
int itmax = 200; int itmax = 200;
float tol = 1e-3; float tol = 1e-3;
//--- process command line args //--- process command line args
static struct option cmdLineOptions[] = { static struct option cmdLineOptions[] = {
{ "help", no_argument, NULL, 'h' }, { "help", no_argument, NULL, 'h' },
{ "verbose", no_argument, NULL, 'v' }, { "verbose", no_argument, NULL, 'v' },
// { "bcg", no_argument, NULL, 'b' }, { "bcg", no_argument, NULL, 'b' },
{ "factor", required_argument, NULL, 'f' }, { "factor", required_argument, NULL, 'f' },
{ "saturation", required_argument, NULL, 's' }, { "saturation", required_argument, NULL, 's' },
// { "itmax", required_argument, NULL, 'm' }, { "itmax", required_argument, NULL, 'm' },
// { "tol", required_argument, NULL, 't' }, { "tol", required_argument, NULL, 't' },
{ "quiet", no_argument, NULL, 'q' }, { "quiet", no_argument, NULL, 'q' },
{ "equalize-contrast", required_argument, NULL, 'e' }, { "equalize-contrast", required_argument, NULL, 'e' },
{ NULL, 0, NULL, 0 } { NULL, 0, NULL, 0 }
}; };
int optionIndex = 0; int optionIndex = 0;
while( 1 ) { while( 1 ) {
int c = getopt_long (argc, argv, "vhf:s:e:q", cmdLineOptions, &optionIndex); int c = getopt_long (argc, argv, "vhf:s:e:qbm:t:", cmdLineOptions, &optionIn dex);
if( c == -1 ) break; if( c == -1 ) break;
switch( c ) { switch( c ) {
case 'h': case 'h':
printHelp(); printHelp();
throw QuietException(); throw QuietException();
case 'q': case 'q':
quiet = true; quiet = true;
break; break;
case 'v': case 'v':
verbose = true; verbose = true;
skipping to change at line 145 skipping to change at line 145
cont_map = true; cont_map = true;
scaleFactor = (float)strtod( optarg, NULL ); scaleFactor = (float)strtod( optarg, NULL );
if( scaleFactor < 0.0f || scaleFactor > 1.0f ) if( scaleFactor < 0.0f || scaleFactor > 1.0f )
throw pfs::Exception("incorrect contrast scale factor, accepted range is (0..1)"); throw pfs::Exception("incorrect contrast scale factor, accepted range is (0..1)");
break; break;
// case 'i': // case 'i':
// interpolate_method = atoi( optarg ); // interpolate_method = atoi( optarg );
// if (interpolate_method < 1 || interpolate_method > 3) // if (interpolate_method < 1 || interpolate_method > 3)
// throw pfs::Exception("incorrect interpolation method, accepted values are 1, 2 or 3."); // throw pfs::Exception("incorrect interpolation method, accepted values are 1, 2 or 3.");
// break; // break;
// case 'm': case 'm':
// itmax = atoi( optarg ); itmax = atoi( optarg );
// if (itmax < 1) if (itmax < 1)
// throw pfs::Exception("incorrect maximum number of iterations."); throw pfs::Exception("incorrect maximum number of iterations.");
// break; break;
// case 't': case 't':
// tol = (float)strtod( optarg, NULL ); tol = (float)strtod( optarg, NULL );
// if( tol < 0.0f || tol > 1.0f ) if( tol < 0.0f || tol > 1.0f )
// throw pfs::Exception("incorrect convergence tolerance, accepted range throw pfs::Exception("incorrect convergence tolerance, accepted range i
is (0..1)"); s (0..1)");
// break; break;
case '?': case '?':
throw QuietException(); throw QuietException();
case ':': case ':':
throw QuietException(); throw QuietException();
} }
} }
if( cont_eq && cont_map ) if( cont_eq && cont_map )
throw pfs::Exception( "the 'factor' parameter cannot be used in combination with contrast equalization" ); throw pfs::Exception( "the 'factor' parameter cannot be used in combination with contrast equalization" );
 End of changes. 4 change blocks. 
15 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)