#pragma once #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include using namespace cv; using namespace std; using namespace Ort; class CircularArresterCurrentALGO { public: void Init(); float detect(Mat& cv_image); //Mat creat_line_image(const Mat& circle, int Radius, int RingStride); //float get_meter_reader(const Mat& image); private: int inpWidth; int inpHeight; int outWidth; int outHeight; const float pi = 3.1415926536f; const int circle_center[2] = { 256, 256 }; const int CV_AA = 16; const float mean[3] = { 0, 0, 0 }, stds[3]= { 0.6f, 0.6f, 0.6f }; Env env = Env(ORT_LOGGING_LEVEL_ERROR, "u2net"); Ort::Session* ort_session = nullptr; SessionOptions sessionOptions = SessionOptions(); vector input_names; vector output_names; vector> input_node_dims; // >=1 outputs vector> output_node_dims; // >=1 outputs };