ClassFlowCNNGeneral.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. int ZeigerEvalDigital(float zahl, float zahl_vorgaenger, int eval_vorgaenger);
  34. bool doNeuralNetwork(string time);
  35. bool doAlignAndCut(string time);
  36. bool getNetworkParameter();
  37. public:
  38. ClassFlowCNNGeneral(ClassFlowAlignment *_flowalign, t_CNNType _cnntype = AutoDetect);
  39. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  40. bool doFlow(string time);
  41. string getHTMLSingleStep(string host);
  42. string getReadout(int _analog, bool _extendedResolution = false, int prev = -1);
  43. void DrawROI(CImageBasis *_zw);
  44. std::vector<HTMLInfo*> GetHTMLInfo();
  45. int getAnzahlGENERAL();
  46. general* GetGENERAL(int _analog);
  47. general* GetGENERAL(string _name, bool _create);
  48. general* FindGENERAL(string _name_number);
  49. string getNameGENERAL(int _analog);
  50. bool isExtendedResolution(int _number = 0);
  51. void UpdateNameNumbers(std::vector<std::string> *_name_numbers);
  52. t_CNNType getCNNType(){return CNNType;};
  53. string name(){return "ClassFlowCNNGeneral";};
  54. };
  55. #endif