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

Pipeline.h 2.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //
  2. // Created by ׽ on 22/10/2017.
  3. //
  4. #ifndef SWIFTPR_PIPLINE_H
  5. #define SWIFTPR_PIPLINE_H
  6. #include "PlateDetection.h"
  7. #include "PlateSegmentation.h"
  8. #include "CNNRecognizer.h"
  9. #include "PlateInfo.h"
  10. #include "FastDeskew.h"
  11. #include "FineMapping.h"
  12. #include "Recognizer.h"
  13. #include "SegmentationFreeRecognizer.h"
  14. namespace pr{
  15. const std::vector<std::string> CH_PLATE_CODE{"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "³", "ԥ", "", "", "", "",
  16. "", "", "", "", "", "", "", "", "", "", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A",
  17. "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X",
  18. "Y", "Z","","ѧ","ʹ","","","","","","","","","","","","","","",""};
  19. const int SEGMENTATION_FREE_METHOD = 0;
  20. const int SEGMENTATION_BASED_METHOD = 1;
  21. class PipelinePR{
  22. public:
  23. GeneralRecognizer *generalRecognizer;
  24. PlateDetection *plateDetection;
  25. PlateSegmentation *plateSegmentation;
  26. FineMapping *fineMapping;
  27. SegmentationFreeRecognizer *segmentationFreeRecognizer;
  28. PipelinePR(std::string detector_filename,
  29. std::string finemapping_prototxt,std::string finemapping_caffemodel,
  30. std::string segmentation_prototxt,std::string segmentation_caffemodel,
  31. std::string charRecognization_proto,std::string charRecognization_caffemodel,
  32. std::string segmentationfree_proto,std::string segmentationfree_caffemodel
  33. );
  34. ~PipelinePR();
  35. std::vector<std::string> plateRes;
  36. std::vector<PlateInfo> RunPiplineAsImage(cv::Mat plateImage,int method);
  37. };
  38. }
  39. #endif //SWIFTPR_PIPLINE_H