You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
984 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef _COMPONENT_LABELING_H_INCLUDED
  2. #define _COMPONENT_LABELING_H_INCLUDED
  3. #include <vector>
  4. #include "BlobContour.h"
  5. #include "blob.h"
  6. #include "counted_ptr.h"
  7. //! Shared pointer to blob
  8. typedef counted_ptr<CBlob> BlobPtr;
  9. //! Blob vector definition
  10. typedef std::vector<BlobPtr> Blob_vector;
  11. //! Component labeling function
  12. bool ComponentLabeling( IplImage* inputImage,
  13. IplImage* maskImage,
  14. unsigned char backgroundColor,
  15. Blob_vector &blobs );
  16. //! Auxiliary functions
  17. void contourTracing( IplImage *image, IplImage *mask, CvPoint contourStart, t_labelType *labels,
  18. bool *visitedPoints, t_labelType label,
  19. bool internalContour, unsigned char backgroundColor,
  20. CBlobContour *currentBlobContour );
  21. CvPoint tracer( IplImage *image, IplImage *mask, CvPoint P, bool *visitedPoints,
  22. short initialMovement,
  23. unsigned char backgroundColor, short &movement );
  24. #endif //!_COMPONENT_LABELING_H_INCLUDED