PlaqueHelper.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include <opencv2/opencv.hpp>
  3. #include <iostream>
  4. #include <fstream>
  5. #include <math.h>
  6. #include <vector>
  7. #include "ReprocessCommon.h"
  8. using namespace std;
  9. using namespace cv;
  10. typedef struct RotatedRectangle
  11. {
  12. float Angle;
  13. float Cx;
  14. float Cy;
  15. float Height;
  16. float Width;
  17. };
  18. typedef struct
  19. {
  20. int width;
  21. int height;
  22. ColorType colorType;
  23. uint8_t* dataBuffer;
  24. }ImageInfo;
  25. #pragma region µ¼³öº¯Êý
  26. extern "C" __declspec(dllexport) bool FitLine(const cv::Point * points, const int pointCount, float* line, cv::DistanceTypes type,
  27. double param, double reps, double aeps);
  28. extern "C" __declspec(dllexport) bool PointInPolygon(const cv::Point * contours, const int pointCount, const cv::Point * point);
  29. extern "C" __declspec(dllexport) bool CalcMaxPlaque(const cv::Point * arteryContour, const cv::Point * plaqueContour,
  30. const int arteryCount, const int plaqueCount, const int left, const int top, float& ratio, RotatedRectangle& RealRect);
  31. extern "C" __declspec(dllexport) bool IsBrightPlaque(ImageInfo srcImgInfo, const cv::Point * contours, const int pointCount);
  32. extern "C" __declspec(dllexport) bool Get2DMeasureImage(ImageInfo srcImgInfo, const int dataSize, ImageInfo & dstImgInfo);
  33. extern "C" __declspec(dllexport) bool SaveSliceImage(ImageInfo srcImgInfo, const int name);
  34. #pragma endregion
  35. bool comparePoints(const cv::Point& p1, const cv::Point& p2);