ClassFlowCNNGeneral.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #pragma once
  2. #ifndef CLASSFLOWCNNGENERAL_H
  3. #define CLASSFLOWCNNGENERAL_H
  4. #include "ClassFlowDefineTypes.h"
  5. #include "ClassFlowAlignment.h"
  6. enum t_CNNType
  7. {
  8. AutoDetect,
  9. Analogue,
  10. Analogue100,
  11. Digit,
  12. DigitHyprid10,
  13. DoubleHyprid10,
  14. Digit100,
  15. None
  16. };
  17. class ClassFlowCNNGeneral : public ClassFlowImage
  18. {
  19. protected:
  20. t_CNNType CNNType;
  21. std::vector<general *> GENERAL;
  22. float CNNGoodThreshold;
  23. std::string cnn_model_file;
  24. int model_x_size;
  25. int model_y_size;
  26. int model_channel;
  27. bool isLogImageSelect;
  28. std::string LogImageSelect;
  29. ClassFlowAlignment *flowpostalignment;
  30. int PointerEvalAnalog(float number, int numeral_preceder);
  31. int PointerEvalAnalogToDigit(float number, float numeral_preceder, int eval_predecessors, float AnalogToDigitTransitionStart);
  32. int PointerEvalHybrid(float number, float number_of_predecessors, int eval_predecessors, bool Analog_Predecessors = false, float AnalogToDigitTransitionStart = 9.2);
  33. bool doNeuralNetwork(std::string time_value);
  34. bool doAlignAndCut(std::string time_value);
  35. bool getNetworkParameter();
  36. public:
  37. ClassFlowCNNGeneral(ClassFlowAlignment *_flowalign, t_CNNType _cnntype = AutoDetect);
  38. bool ReadParameter(FILE *pfile, std::string &aktparamgraph);
  39. bool doFlow(std::string time_value);
  40. std::string getHTMLSingleStep(std::string host);
  41. std::vector<double> getMeterValues(int _number);
  42. std::string getReadout(int _number, bool _extendedResolution = false, int prev = -1, float _before_narrow_Analog = -1, float AnalogToDigitTransitionStart = 9.2);
  43. std::string getReadoutRawString(int _number);
  44. void DrawROI(CImageBasis *Image);
  45. std::vector<HTMLInfo *> GetHTMLInfo(void);
  46. int getNumberGENERAL(void);
  47. general *GetGENERAL(int _number);
  48. general *GetGENERAL(std::string _name, bool _create);
  49. general *FindGENERAL(std::string _name_number);
  50. std::string getNameGENERAL(int _number);
  51. bool isExtendedResolution(int _number = 0);
  52. void UpdateNameNumbers(std::vector<std::string> *_name_numbers);
  53. t_CNNType getCNNType() { return CNNType; };
  54. std::string name() { return "ClassFlowCNNGeneral"; };
  55. };
  56. #endif