ClassFlowCNNGeneral.h 1.6 KB

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