/**************************************** Author: Sridhar Reddy *****************************************/ #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_fftnew(char *fname, unsigned long fname_len) { SciErr sciErr; int intErr=0; int iRows=0,iCols=0,i,j; int *piAddr1=NULL; double *ipReal=NULL; double *ipImg=NULL; double *rsltReal=NULL; double *rsltImg=NULL; vector > vec_out; vector vec_in; CheckInputArgument(pvApiCtx, 1, 1); CheckOutputArgument(pvApiCtx, 1, 1) ; sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr1); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } sciErr = getMatrixOfDouble(pvApiCtx, piAddr1, &iRows, &iCols, &ipReal); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } ipImg = (double*)malloc(sizeof(double) * iRows * iCols); if(iRows==1){ for(i = 0 ; i