#pragma once #include #include #include #include "OTSParticle.h" #include "OTSImageProcessParam.h" #include using namespace cv; using namespace std; using namespace OTSDATA; float getDistance(Point pointO, Point pointA); float getDist_P2L(Point pointP, Point pointA, Point pointB); int Side(Point P1, Point P2, Point point); void FindInnerCircleInContour(vector contour, Point& center, int& radius); BOOL GetParticleAverageChord(std::vector listEdge, double a_PixelSize, double& dPartFTD); void linearSmooth5(WORD wordIn[], WORD wordOut[], int N); void BlurImage(CBSEImgPtr inImg); Mat GetMatDataFromBseImg(CBSEImgPtr inImg); CBSEImgPtr GetBSEImgFromMat(Mat inImg); void ImageStretchByHistogram(const Mat& src, Mat& dst); Mat AdjustContrastY(const Mat& img); void CVRemoveBG(const cv::Mat& img, cv::Mat& dst, int bgstart, int bgend, long& nNumParticle); void RemoveBG_old(const cv::Mat& img, cv::Mat& dst, int nBGStart, int nBGEnd, long& nNumParticle);