RAList.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*******************************************************
  2. Mean Shift Analysis Library
  3. =============================================
  4. The mean shift library is a collection of routines
  5. that use the mean shift algorithm. Using this algorithm,
  6. the necessary output will be generated needed
  7. to analyze a given input set of data.
  8. Region Adjacency List:
  9. =====================
  10. The Region Adjacency List class is used by the Image
  11. Processor class in the construction of a Region Adjacency
  12. Matrix, used by this class to applying transitive closure
  13. and to prune spurious regions during image segmentation.
  14. The prototype for the RAList class is provided below. Its
  15. defition is provided in "RAList.cc".
  16. The theory is described in the papers:
  17. D. Comaniciu, P. Meer: Mean Shift: A robust approach toward feature
  18. space analysis.
  19. C. Christoudias, B. Georgescu, P. Meer: Synergism in low level vision.
  20. and they are is available at:
  21. http://www.caip.rutgers.edu/riul/research/papers/
  22. Implemented by Chris M. Christoudias, Bogdan Georgescu
  23. ********************************************************/
  24. #ifndef RALIST_H
  25. #define RALIST_H
  26. //define Region Adjacency List class prototype
  27. class RAList {
  28. public:
  29. //============================
  30. // *** Public Data Members ***
  31. //============================
  32. ////////////RAM Label//////////
  33. int label;
  34. ////////////RAM Weight/////////
  35. float edgeStrength;
  36. int edgePixelCount;
  37. ////////////RAM Link///////////
  38. RAList *next;
  39. //=======================
  40. // *** Public Methods ***
  41. //=======================
  42. /*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\*/
  43. /* Class Constructor and Destructor */
  44. /*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/
  45. //***Class Constrcutor***
  46. RAList( void );
  47. //***Class Destructor***
  48. ~RAList( void );
  49. /*/\/\/\/\/\/\/\/\/\/\/\/\*/
  50. /* RAM List Manipulation */
  51. /*\/\/\/\/\/\/\/\/\/\/\/\/*/
  52. //Usage: Insert(entry)
  53. int Insert(RAList*); //Insert a region node into the region adjecency list
  54. private:
  55. //=============================
  56. // *** Private Data Members ***
  57. //=============================
  58. ///////current and previous pointer/////
  59. RAList *cur, *prev;
  60. ////////flag///////////
  61. unsigned char exists;
  62. };
  63. #endif