123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- //
- // Created by lloyd on 2020/9/28.
- //
- #ifndef GTCVR_GTCVCORE_H
- #define GTCVR_GTCVCORE_H
- #include "opencv2/opencv.hpp"
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
- #include "DataMapping/dgns_gtstandard.h"
- #include "DataMapping/dgns_gtbaseparam.h"
- class gtcvcore {
- public:
- void initSVM(int load);
- static cv::Ptr<cv::ml::SVM> MySvm1;
- static std::string GTYypes1;
- std::string
- HOGSVMPredict(std::vector<std::vector<int>> >1, std::vector<std::vector<int>> >2, int FuncType, int load,
- const char *CacheName);
- double C_GTSimillar_PSNR(std::vector<std::vector<int>> >1_1, std::vector<std::vector<int>> >1_2,
- std::vector<std::vector<int>> >2_1, std::vector<std::vector<int>> >2_2);
- double C_GTSimillar_MSSIM(std::vector<std::vector<int>> >1_1, std::vector<std::vector<int>> >1_2,
- std::vector<std::vector<int>> >2_1, std::vector<std::vector<int>> >2_2);
- double C_GTSimillar_HOG(std::vector<std::vector<int>> >1_1, std::vector<std::vector<int>> >1_2,
- std::vector<std::vector<int>> >2_1, std::vector<std::vector<int>> >2_2);
- class calgray {
- public:
- /****item****/
- double **Card;//[][2] ;
- /****item****/
- int **CardGray0;//[][][] ;
- /****item****/
- int **CardGray1;//[][][] ;
- /***iiiii****/
- int ***CardGray;
- /****item****/
- double *CardType;//[] ;
- /****item****/
- double *Card_Type;//[] ;
- /****item****/
- double **BCP;//[][] ;
- /****item****/
- int *Gray_max;//[] ;
- /****item****/
- int *Gray_min;//[] ;
- /****item****/
- double **DenseCard;//[][] ;
- /****item****/
- char *CardStr;
- /****item****/
- char *DenseCardStr;
- /****item****/
- double Cycle;
- /****item****/
- double Stroke;
- /****item****/
- int PointNum;
- /****item****/
- int DensePointNum;
- /****item****/
- double MaxLoadPoint;
- /****item****/
- double MinLoadPoint;
- /****item****/
- double MaxLoad;
- /****item****/
- double MinLoad;
- /****item****/
- double Maxshift;
- /****item****/
- double MaxshiftPoint;
- /****item****/
- double Minshift;
- /****item****/
- double MinshiftPoint;
- /****item****/
- double DenseMaxLoadPoint;
- /****item****/
- double DenseMinLoadPoint;
- /****item****/
- double DenseMaxLoad;
- /****item****/
- double DenseMinLoad;
- /****item****/
- double DenseMaxshift;
- /****item****/
- double DenseMaxshiftPoint;
- /****item****/
- double DenseMinshift;
- /****item****/
- double DenseMinshiftPoint;
- /****item****/
- double Power;
- /****item****/
- double SdBalanceDegree;
- /****item****/
- char const *SdBalanceResult;
- /****item****/
- char const *DiagnosisResult;
- /****item****/
- double MaxShiftLoad;
- /****item****/
- double MinShiftLoad;
- /****item****/
- char *L_RESULT;
- /****item****/
- double L_res1;
- /****item****/
- double L_Res2;
- /****item****/
- double L_EPS1;
- /****item****/
- double L_DLT1;
- /****item****/
- double L_EPS2;
- /****item****/
- double L_DLT2;
- /****item****/
- char *l_RefrenceJh;
- /****item****/
- char *l_Refrencewell_id;
- /****item****/
- char *l_Refrence_jhdm;
- /****item****/
- struct tm l_Refrencecjsj;
- /****item****/
- char *l_refrencesgt;
- /****item****/
- double l_refrencecycle;
- /****item****/
- double l_refrencestroke;
- public:
- /*********public method************/
- double
- C_GTSimillar_Gray(std::vector<std::vector<double>> gt1, int pointnum1, double S1, double N1,
- std::vector<std::vector<double>> gt2, int pointnum2, double S2,
- double N2);
- double compareCharacters(double *s_cha, double *k_cha, int method = 23);
- bool calGrayCharacters(dgns_gtstandard &cha_obj, dgns_gtbaseparam _baseparam);
- private:
- /*********private method************/
- calgray checkCardForCalGray(std::vector<std::vector<double>> gt, int gt_pointNum, double cycle);
- double * cal_cardgray_cha(std::vector<std::vector<double>> P_Card, int gt_PointNum, double S, double N);
- };
- };
- #endif //GTCVR_GTCVCORE_H
|