/*************************************************** Author : Shashank Shekhar ***************************************************/ #include #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/opencv.hpp" #include using namespace cv; using namespace std; extern "C" { #include "api_scilab.h" #include "Scierror.h" #include "BOOL.h" #include #include "sciprint.h" #include "../common.h" int opencv_BRISKPoints(char *fname, unsigned long fname_len) { SciErr sciErr; int *piAddr = NULL; int *piChild = NULL; int iType = 0; int iRows, iCols = 0; double *matData = NULL; double *OrientationData = NULL; double *MetricData = NULL; double *ScaleData = NULL; CheckInputArgument(pvApiCtx, 1,1); CheckOutputArgument(pvApiCtx,1,5); sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } sciErr = getVarType(pvApiCtx, piAddr, &iType); if(sciErr.iErr || iType != sci_matrix || isVarComplex(pvApiCtx, piAddr)) { printError(&sciErr, 0); return 0; } sciErr = getMatrixOfDouble(pvApiCtx, piAddr, &iRows, &iCols, &matData); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } if (iCols!=2) { Scierror(999,"Invalid Argument\n"); return 0; } OrientationData = (double *)malloc(sizeof(double)*iRows); MetricData = (double *)malloc(sizeof(double)*iRows); ScaleData = (double *)malloc(sizeof(double)*iRows); for(int i = 0 ; i