123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #pragma once
- #ifdef _WIN32
- #define EXPORT_API __declspec(dllexport)
- #else
- #define EXPORT_API
- #endif
- #include<opencv2/opencv.hpp>
- #include<numeric>
- #include<vector>
- #include<string>
- #include<iostream>
- #include<chrono>
- #include<time.h>
- #include<format>
- #include<unordered_map>
- #include "ErrorMsg.h"
- using namespace std;
- using namespace cv;
- using namespace chrono;
- Scalar colorTab[] = {
- Scalar(0,0,255),
- Scalar(0,255,0),
- Scalar(255,0,0),
- Scalar(0,255,255),
- Scalar(255,0,255),
- Scalar(255,255,0),
- Scalar(0,0,128) };
- typedef struct StructMyPoint
- {
- int X;
- int Y;
- }StructMyPoint;
- typedef struct ContourInfos
- {
- int area;
- int meanGray;
- RotatedRect rotatedRect;
- vector<Point> contours;
- }ContourInfos;
- typedef struct MeasureInfos
- {
- bool isSuccess;
- float averThick;
- float minThick;
- float maxThick;
- StructMyPoint startPoint;
- StructMyPoint endPoint;
- }MeasureInfos;
- extern "C" EXPORT_API bool InterfaceOfIntimeThickness(unsigned char* imgData, int oriWidth, int oriHeight, int objNum, int* labelID,
- int* singleContourLenList, StructMyPoint * allContourPoints, bool calcLower, bool calcUpper, MeasureInfos& UpperResult, MeasureInfos& LowerResult);
- extern "C" __declspec(dllexport) void GetErrorCodeAndMsg(ErrorCode & errorCode, char* errorMsg, const int errorMaxLen);
|