Software bugs

Please Note >
Graduate students are expected to be able to debug their code. Nonetheless, debugging solutions you found may save others some time. If you find good ones, please let me know, and I'll post theme here.
 



Compilation Tips

  • Pedro Felzenszwalb's segmentation code should compile OK on Unix machines. Microsoft's Visual Studio, on the other hand, may present some problems, depending on what version of VS you use. Here are some fixes:
    • If std::min and std::max are not defined, replace them with min and max, and include windows.h
    • If random()is undefined, replace with rand()
    • VS 6.0 thinks that the second declaration of i in
      for (int i = 0; i < n; i++) { ... }
      for (int i = 1; i < m; i++) { ... }

      is a redeclaration of i in the same scope. To fix, replace with
      int i;
      for (i = 0; i < n; i++) { ... }
      for (i = 1; i < m; i++) { ... }