/*************************************************** Author : Sukul Bagai ***************************************************/ #include #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/opencv.hpp" #include #include using namespace cv; using namespace std; extern "C" { #include "api_scilab.h" #include "Scierror.h" #include "BOOL.h" #include #include #include "../common.h" int opencv_dilate(char *fname, unsigned long fname_len) { SciErr sciErr; int intErr = 0; int iRows=0,iCols=0; int *piLen = NULL; int *piAddr2 = NULL; int *piAddr3 = NULL; int *piAddr4 = NULL; int *piAddr5 = NULL; char **type = NULL; int i,j,k; double anchorX,anchorY,iterations; double *kernel = NULL; //checking input argument CheckInputArgument(pvApiCtx, 5, 5); CheckOutputArgument(pvApiCtx, 1, 1) ; Mat image; retrieveImage(image,1); //for kernel sciErr = getVarAddressFromPosition(pvApiCtx,2,&piAddr2); if (sciErr.iErr) { printError(&sciErr, 0); return 0; } sciErr = getMatrixOfDouble(pvApiCtx, piAddr2, &iRows, &iCols, &kernel); if(sciErr.iErr) { printError(&sciErr,0); return 0; } double actualkernel[iRows][iCols]; for(i=0;i