SourceForge: enblend/enblend: changeset 605:c2b918407a36
Let us skip the optimizer with the #define SKIP_OPTIMIZER.
authorDr. Christoph L. Spiel <cspiel@freenet.de>
Mon Nov 09 14:22:20 2009 +0100 (7 weeks ago)
changeset 605c2b918407a36
parent 604 a4d94da42373
child 606 6ebb15e8b376
Let us skip the optimizer with the #define SKIP_OPTIMIZER.
We neither skip the initial seam-line generation nor the final
conversion of the seam line back to a pixel mask.
Patch by Yuval Levy.
VERSION
src/mask.h
     1.1 --- a/VERSION	Mon Nov 09 14:14:33 2009 +0100
     1.2 +++ b/VERSION	Mon Nov 09 14:22:20 2009 +0100
     1.3 @@ -1,1 +1,1 @@
     1.4 -4.0-f2f608b8ddb4
     1.5 +4.0-a4d94da42373
     2.1 --- a/src/mask.h	Mon Nov 09 14:14:33 2009 +0100
     2.2 +++ b/src/mask.h	Mon Nov 09 14:22:20 2009 +0100
     2.3 @@ -1020,6 +1020,7 @@
     2.4                                      Arg3(),
     2.5                                      Param(NumericTraits<MismatchImagePixelType>::max())));
     2.6  
     2.7 +#ifndef SKIP_OPTIMIZER
     2.8      // Strategy 1: Use GDA to optimize placement of snake vertices
     2.9      int segmentNumber;
    2.10      for (ContourVector::iterator currentContour = contours.begin();
    2.11 @@ -1116,7 +1117,7 @@
    2.12  
    2.13              // Print an explanation if every vertex in a closed contour ended up in the
    2.14              // max-cost region after annealing.
    2.15 -            // FIXME explain how to fix this problem in the error message!
    2.16 +            // FIXME: explain how to fix this problem in the error message!
    2.17              if (snake->empty()) {
    2.18                  cerr << endl
    2.19                       << command
    2.20 @@ -1133,6 +1134,7 @@
    2.21               << ": info: strategy 2:";
    2.22          cerr.flush();
    2.23      }
    2.24 +#endif // !SKIP_OPTIMIZER
    2.25  
    2.26      // Adjust cost image for the shortest path algorithm.
    2.27      // Areas outside the union region have epsilon cost.
    2.28 @@ -1154,6 +1156,7 @@
    2.29                                          Arg3()));
    2.30      }
    2.31  
    2.32 +#ifndef SKIP_OPTIMIZER
    2.33      Rect2D withinMismatchImage(mismatchImageSize);
    2.34  
    2.35      // Use Dijkstra to route between moveable snake vertices over mismatchImage.
    2.36 @@ -1250,6 +1253,7 @@
    2.37      if (Verbose >= VERBOSE_MASK_MESSAGES) {
    2.38          cerr << endl;
    2.39      }
    2.40 +#endif // !SKIP_OPTIMIZER
    2.41  
    2.42      if (visualizeImage) {
    2.43          const std::string visualizeFilename =