Skip to content

Header Files

Jeffrey Berry edited this page Oct 11, 2019 · 4 revisions

Header Files

To help ease the burden, these are the functions that currently exist in each header file.

color_calibration.h

float extractRGB_chips(Mat img,Mat &mask);
MatrixXd getRGBarray(Mat img);
void get_standardizations(Mat img, float &det, MatrixXd &rh,MatrixXd &gh,MatrixXd &bh);
Mat color_homography(Mat img, MatrixXd r_coef,MatrixXd g_coef,MatrixXd b_coef);
Mat CLAHE_correct_rgb(Mat img);
Mat CLAHE_correct_gray(Mat img);
Mat nonUniformCorrect(Mat img, int kernel_siz);
Mat grayCorrect(Mat img);

feature_extraction.h

float get_fd(Mat mask);
vector<double> get_shapes(vector<Point> cc,Mat mask); 
void write_shapes(vector<double> shapes_data, string iname, string fname);
Mat get_color(Mat img,Mat mask);
void write_hist(Mat hue_data, string iname, string fname);
Mat get_nir(Mat img,Mat mask);
int is_oof(Mat img);
vector<Point> keep_roi(Mat img,Point tl, Point br, Mat &mask);

machine_learning.h

void trainSVM(Mat img, Mat mask, string fname);
Mat predictSVM(Mat img, string fname);
float calcSVM(Vec3b pixel,Ptr<SVM> svm);
void trainBC(Mat img, Mat mask, string fname);
Mat predictBC(Mat img, string fname);
float calcBC(Vec3b pixel,Ptr<SVM> bc);

miscellaneous.h

void split(const string& s, char c, vector<string>& v);
void onMouse( int event, int x, int y, int f, void* );
void kMouse( int event, int x, int y, int f, void* );
void grayMouse( int event, int x, int y, int f, void* );
void showImage(Mat img, string title);
void find_and_measure_selection(vector<vector<Point> > sel_contours,vector<vector<Point> > pred_contours, string color, Mat &map, int threshold_value,string shape_fname, string color_fname, string orig_fname,vector<Mat> split_lab);
void selectionGUI(Mat orig, string orig_fname,Mat mask, int size, string shape_fname, string color_fname, int threshold_value);
void confusionGUI(Mat orig, Mat predicted, Mat labeled, int size);
void decodeSymbols(Mat &im, vector<decodedObject>&decodedObjects);
void displaySymbols(Mat &im, vector<decodedObject>&decodedObjects);

morphology.h

Mat find_endpoints(Mat input);
Mat find_branchpoints(Mat input);
Mat length_filter(Mat input, int size);
Mat prune(Mat input, int size);
Mat segment_skeleton(Mat input, bool colored=false);
Mat find_leaves(Mat skel, Mat tips);
Mat add_stem(Mat classified_skel, Mat full_skel);
Mat fill_mask(Mat mask, Mat classified_in);
vector<vector<double> > get_leaf_info(Mat classified_skel, Mat filled_mask);
void write_leaves(vector<vector<double> > leaf_data,string iname,string fname);

spatial_calibration.h

void saveCameraParams(const string &filename, Size imageSize,const Mat &cameraMatrix, const Mat &distCoeffs);
void charuco_calibrate(string outfile, string calib_imgs, int dict_id, int nx, int ny, float mw, float aw);
Mat charuco_estimate(Mat inputImage, string calib_file, Ptr<aruco::Dictionary> dictionary, Ptr<cv::aruco::CharucoBoard> board);