ClassFlowCNNGeneral.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #ifndef __CLASSCNNGENERAL__
  2. #define __CLASSCNNGENERAL__
  3. #include"ClassFlowDefineTypes.h"
  4. #include "ClassFlowAlignment.h"
  5. enum t_CNNType {
  6. AutoDetect,
  7. Analogue,
  8. Analogue100,
  9. Digital,
  10. // DigitalHyprid,
  11. DigitalHyprid10,
  12. DoubleHyprid10,
  13. Digital100,
  14. None
  15. };
  16. class ClassFlowCNNGeneral :
  17. public ClassFlowImage
  18. {
  19. protected:
  20. t_CNNType CNNType;
  21. std::vector<general*> GENERAL;
  22. float CNNGoodThreshold;
  23. string cnnmodelfile;
  24. int modelxsize, modelysize, modelchannel;
  25. bool isLogImageSelect;
  26. string LogImageSelect;
  27. ClassFlowAlignment* flowpostalignment;
  28. // ClassFlowPostProcessing *flowpostprocessing = NULL;
  29. bool SaveAllFiles;
  30. // bool extendedResolution;
  31. int ZeigerEval(float zahl, int ziffer_vorgaenger);
  32. int ZeigerEvalHybrid(float zahl, float zahl_vorgaenger, int eval_vorgaenger);
  33. bool doNeuralNetwork(string time);
  34. bool doAlignAndCut(string time);
  35. bool getNetworkParameter();
  36. public:
  37. ClassFlowCNNGeneral(ClassFlowAlignment *_flowalign, t_CNNType _cnntype = AutoDetect);
  38. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  39. bool doFlow(string time);
  40. string getHTMLSingleStep(string host);
  41. string getReadout(int _analog, bool _extendedResolution = false, int prev = -1);
  42. void DrawROI(CImageBasis *_zw);
  43. std::vector<HTMLInfo*> GetHTMLInfo();
  44. int getAnzahlGENERAL();
  45. general* GetGENERAL(int _analog);
  46. general* GetGENERAL(string _name, bool _create);
  47. general* FindGENERAL(string _name_number);
  48. string getNameGENERAL(int _analog);
  49. bool isExtendedResolution(int _number = 0);
  50. void UpdateNameNumbers(std::vector<std::string> *_name_numbers);
  51. t_CNNType getCNNType(){return CNNType;};
  52. string name(){return "ClassFlowCNNGeneral";};
  53. };
  54. #endif