ClassFlowCNNGeneral.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #pragma once
  2. #include "ClassFlowImage.h"
  3. #include "ClassFlowAlignment.h"
  4. enum t_CNNType {
  5. AutoDetect,
  6. Analogue,
  7. Digital,
  8. DigitalHyprid,
  9. None
  10. };
  11. struct roi {
  12. int posx, posy, deltax, deltay;
  13. float result;
  14. int resultklasse;
  15. string name;
  16. CImageBasis *image, *image_org;
  17. };
  18. struct general {
  19. string name;
  20. std::vector<roi*> ROI;
  21. };
  22. class ClassFlowCNNGeneral :
  23. public ClassFlowImage
  24. {
  25. protected:
  26. t_CNNType CNNType;
  27. std::vector<general*> GENERAL;
  28. string cnnmodelfile;
  29. int modelxsize, modelysize;
  30. bool isLogImageSelect;
  31. string LogImageSelect;
  32. ClassFlowAlignment* flowpostalignment;
  33. bool SaveAllFiles;
  34. bool extendedResolution;
  35. int ZeigerEval(float zahl, int ziffer_vorgaenger);
  36. int ZeigerEvalHybrid(float zahl, float zahl_vorgaenger, int eval_vorgaenger);
  37. bool doNeuralNetwork(string time);
  38. bool doAlignAndCut(string time);
  39. public:
  40. ClassFlowCNNGeneral(ClassFlowAlignment *_flowalign, t_CNNType _cnntype = AutoDetect);
  41. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  42. bool doFlow(string time);
  43. string getHTMLSingleStep(string host);
  44. string getReadout(int _analog);
  45. void DrawROI(CImageBasis *_zw);
  46. std::vector<HTMLInfo*> GetHTMLInfo();
  47. int AnzahlROIs(int _analog);
  48. int getAnzahlGENERAL();
  49. general* GetGENERAL(int _analog);
  50. general* GetGENERAL(string _name, bool _create);
  51. general* FindGENERAL(string _name_number);
  52. string getNameGENERAL(int _analog);
  53. bool isExtendedResolution(int _number = 0);
  54. void UpdateNameNumbers(std::vector<std::string> *_name_numbers);
  55. t_CNNType getCNNType(){return CNNType;};
  56. string name(){return "ClassFlowCNNGeneral";};
  57. };