#pragma once #include #include "ofxOpenCv.h" using namespace std; using namespace cv; #ifndef PI #define PI 3.141592653589 #endif extern vector pupil_parameters; extern vector*> edge_point; void GetFiveRandomNum(int max, vector& random_num); bool SolveEllipse(const vector& conic_parameters, vector& ellipse_parameters); int* PupilFittingInliers(unsigned char* image, int width, int height, int& return_max_inliers); Point_* NormalizeEdgePoint(double& dis_scale, Point_& normalized_center); void DenormalizeEllipseParameters(vector& parameters, const vector& normalized_parameters, double dis_scale, Point_ normalized_center); void DestroyEdgePoint(); void StarburstPupilContourDetection(unsigned char* image, int width, int height, int threshold, int N, int minimum_features, Point start_point); void LocateEdgePoints(unsigned char* image, int width, int height, Point_ center, int dis, double angle_step, double angle_normal, double angle_spread, int threshold); Point_ GetEdgeMean();