| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 | #pragma once#include <opencv2/core/core.hpp>  #include <opencv2/highgui/highgui.hpp> #include <opencv2/opencv.hpp>#include "OTSParticle.h"#include "OTSImageProcessParam.h"#include <OTSFieldData.h>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<Point> contour, Point& center, int& radius);BOOL GetParticleAverageChord(std::vector<Point> 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);/// <summary>/// /// </summary>/// <param name="img">原图</param>/// <param name="dst">目标图</param>/// <param name="black_thing">0 black ;1 bright;2 both black and bright </param>/// <param name="min_size">物体最小大小</param>/// <param name="min_gray">物体的灰度最大值</param>void AutoRemove_background_OTS(const cv::Mat& img, cv::Mat& dst, int black_thing=2, int min_size=1, int min_gray=30);
 |