README 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ==================== C++ =================================
  2. Implementation of the segmentation algorithm described in:
  3. Efficient Graph-Based Image Segmentation
  4. Pedro F. Felzenszwalb and Daniel P. Huttenlocher
  5. International Journal of Computer Vision, 59(2) September 2004.
  6. The program [segment.cpp, note by A. Freytag] takes a color image (PPM format) and produces a segmentation
  7. with a random color assigned to each region.
  8. 1) Type "make" to compile "segment".
  9. 2) Run "segment sigma k min input output".
  10. The parameters are: (see the paper for details)
  11. sigma: Used to smooth the input image before segmenting it.
  12. k: Value for the threshold function.
  13. min: Minimum component size enforced by post-processing.
  14. input: Input image.
  15. output: Output image.
  16. Typical parameters are sigma = 0.5, k = 500, min = 20.
  17. Larger values for k result in larger components in the result.
  18. NOTE ( by Alexander Freytag )
  19. - only images with less then std::numeric_limits<int>::max() pixels are supported properly!
  20. =============== MATLAB ==============
  21. [Compilation]
  22. - run compileFelzenszwalbSegmentation.m
  23. [Demo]
  24. - run demoFelzenszwalbSegmentation.m (requires matlabs GUI to show images and segmentation results)
  25. - demo file shows how to setup variables, and how to call the underlying mex functions