//Header file pascal.h #include // #include // SafeArray -funktiot oleauto.h :ssa, kutsutaan ole2.h:sta #include #include // sprintf #include #include #include #include // #include "d:\matlabr11\extern\include\libmmfile.h" #include "c:\matlabr12\extern\include\matlab.h" #include "c:\matlabr12\extern\include\matrix.h" // #include "c:\matlabr12\extern\include\cpp\matlab.hpp" /* CONSTANTS */ #define NO_VALUE ( -HUGE ) #define NO_IMAGE -1 #define XTRAF_IMAGE 0 #define GROUND_IMAGE 1 #define MAIN_IMAGE 2 #define IMAGE_ORIENTATION 3 #define TRUE 1 #define FALSE 0 #define TO_DEGREES 57.29577951 #define TO_RADIANS 0.01745329252 #define PI 3.141592653589793 typedef struct { int p1,p2,p3; } ITRIANGLE; typedef struct { int p1,p2; } IEDGE; typedef struct { double x,y,z; } XYZ; int CircumCircle(double xp,double yp, double x1,double y1,double x2,double y2,double x3,double y3, double *xc,double *yc,double *r); // Function prototypes // // int ReadTags(FILE *fp, int nTags, IMG *img); int _heapmin( void ); // extern "C" double __stdcall Fourn(double *Data, int *NN, int NDIM, int ISIGN); // extern "C" // extern "C" double Fourn(double *Data, int *NN, int NDIM, int ISIGN); struct Point3D { double X, Y, Z; } ; static int kutsuttavafunktio(double *para); extern "C" double __stdcall MyFunc_atan2(double a, double b); extern "C" double __stdcall MyFunc_atan(double a); extern "C" double __stdcall MyFunc_floor(double a); extern "C" double __stdcall MyFunc_ccor(unsigned char *akuva, short na, short ma,unsigned char *bkuva, short nb, short mb, short x_a, short y_a, short x_b, short y_b, short w, short h); extern "C" double __stdcall MyFunc_TempMeanStd(unsigned char *akuva, int na, int ma, double *mean, double *std); extern "C" double __stdcall MyFunc_ccorA(unsigned char *akuva,unsigned char *bkuva, double *r, double *meanA, int *N); extern "C" double __stdcall MyFunc_corima(unsigned char *akuva, short width,short height, unsigned char *temp, short wt, short ht, short c_col, short c_row, double *rkuva); extern "C" double __stdcall MyFunc_Corima_Fourier(unsigned char *akuva, short na,short ma, unsigned char *temp, short wt, short ht,double *rkuva); // extern "C" double __stdcall MyFunc_Comp_Conj_Mult(double *FFTima, double *FFTt, int dummy, double *FFTres, int WCW, int HCW); extern "C" double __stdcall MyFunc_Fourn(double *Data, int *NN, int NDIM, int ISIGN); extern "C" double __stdcall MyFunc_asin(double a); extern "C" double __stdcall MyFunc_acos(double a); extern "C" double __stdcall MyFunc_ComputeTreeImage(unsigned char *P_ima, long Pcols, long Prows, double X_Gps, double Y_Gps, double X_ext, double Y_ext, double Pix_Width, long Btrees, double *BtreesStruct); extern "C" int __stdcall MyFunc_mktime(tm *time_s); extern "C" long __stdcall MyFunc_ComputeBkProj(int image, int Npoints, double *af, double *ori, double *cimainfo, float *atau, double *SSpace, double *cor_arr); extern "C" long __stdcall MyFunc_Make3dpoints(double origoX, double origoY, double origoZ, double gridXextent, double gridYextent, double gridZextent, double gridXtess, double gridYtess, double gridZtess, double XYrotangle, char *filename, long stringlenght ); extern "C" long __stdcall MyFuncReadTiffHeader(long *kork, long *lev, long *offset, long *konfiguraatio,int *kompressio, int *kanavia,char *filename, long *osoitteet ); extern "C" long __stdcall MyFuncReadTiffHeaderPerttu(long *kork, long *lev, long *offset, long *konfiguraatio,int *kompressio, int *kanavia,char *filename, long *osoitteet ); extern "C" long __stdcall MyFuncSplittoRGB(long kork, long lev, char *filename, char *filenameRed,char *filenameBlue,char *filenameGreen); extern "C" double __stdcall MyFuncReadBinaryFiles(unsigned char *bkuva, int lstartrow, int rstartrow, int lstartcol, int rstartcol, int lendcol, int nwidth); extern "C" double __stdcall MyFuncCreateNormalizedImage(double c, int Nwidth, int Nheight, int Owidth, int Oheight, char *filename_in, char *filename_out, double *pixelsize, double *af, double *R); extern "C" double __stdcall MyFuncCreateBmp(char *lfile, char *rfile, char *ofile, int index, int lstartcol, int rstartcol, int lstartrow, int rstartrow, int lendcol, int lendrow, int rendcol, int rendrow, double pan_x, double pan_y, int nwidth, int nheight, int stereoheight, int stereowidth, int colormodel); extern "C" double __stdcall MyFuncMatlabSVD(double b); extern "C" double __stdcall MyFuncMatlabCall(double b); extern "C" double __stdcall MyFuncMatlabCallNoMsgs(double b); extern "C" double __stdcall MyFunc_indexx(long n, float *arr, long *indx); extern "C" double __stdcall MyFunc_FindClusters(long n_candidate_points, double xy_thin, double r_limit, double *plotdata, long *n_tau, float *a_tau, long *nclus, Point3D *SearchSpaceData, double *atausum, Point3D *cluscoords, float *rclus, char *filename_in, char *filename_out); extern "C" int __stdcall MyFuncTriangulate(int nv,XYZ *pxyz,ITRIANGLE *v,int *ntri); extern "C" int __stdcall MyFuncMasking(unsigned char *in1, unsigned char *mask, unsigned char *out1); extern "C" int __stdcall MyFuncByteShift(unsigned char *in1, unsigned char *dir, unsigned char *n, unsigned char *out1); extern "C" int __stdcall MyFuncByteConc(unsigned char *in1, unsigned char *in2, unsigned char *n, unsigned short *out1); extern "C" int __stdcall MyFuncLidarDivision(char *infile); extern "C" double __stdcall MyFuncMatlabCallResection(double b); extern "C" double __stdcall MyFunc_ccorB(unsigned char *w,unsigned char *f, double *r, double *meanW, int *N, int *M);