diff options
author | siddhu8990 | 2016-08-29 10:47:52 +0530 |
---|---|---|
committer | siddhu8990 | 2016-08-29 10:47:52 +0530 |
commit | 53ddbeb8c94cd71d37064d6d7e8ac56fef7ae5af (patch) | |
tree | b002757ff60da2d674fc8690fcabbc544e0f7f2f /2.3-1/src/c | |
parent | 425ae9b5508196bc39ab98f12696550dfa6f872c (diff) | |
download | Scilab2C-53ddbeb8c94cd71d37064d6d7e8ac56fef7ae5af.tar.gz Scilab2C-53ddbeb8c94cd71d37064d6d7e8ac56fef7ae5af.tar.bz2 Scilab2C-53ddbeb8c94cd71d37064d6d7e8ac56fef7ae5af.zip |
OpenCV interface changed from c to c++
Diffstat (limited to '2.3-1/src/c')
61 files changed, 116 insertions, 166 deletions
diff --git a/2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h b/2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h index fec555b2..7884c99f 100644 --- a/2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h +++ b/2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h @@ -15,7 +15,7 @@ #ifndef __INT_CONJ_H__ #define __INT_CONJ_H__ -#define copy(in,size,out) {int i;for (i=0; i<size[0]*size[1];i++) out[i]=in[i];} +#define copy_c(in,size,out) {int i;for (i=0; i<size[0]*size[1];i++) out[i]=in[i];} #define s0conjs0(in) in @@ -33,20 +33,20 @@ #define i160conji160(in) in -#define s2conjs2(in,size,out) copy(in,size,out) +#define s2conjs2(in,size,out) copy_c(in,size,out) -#define d2conjd2(in,size,out) copy(in,size,out) +#define d2conjd2(in,size,out) copy_c(in,size,out) #define c2conjc2(in,size,out) cconja(in, size[0]*size[1], out) #define z2conjz2(in,size,out) zconja(in, size[0]*size[1], out) -#define u82conju82(in,size,out) copy(in,size,out) +#define u82conju82(in,size,out) copy_c(in,size,out) -#define i82conji82(in,size,out) copy(in,size,out) +#define i82conji82(in,size,out) copy_c(in,size,out) -#define u162conju162(in,size,out) copy(in,size,out) +#define u162conju162(in,size,out) copy_c(in,size,out) -#define i162conji162(in,size,out) copy(in,size,out) +#define i162conji162(in,size,out) copy_c(in,size,out) #endif /* !__INT_CONJ_H__ */ diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/libIlmImf.a b/2.3-1/src/c/hardware/rasberrypi/libraries/libIlmImf.a Binary files differnew file mode 100644 index 00000000..0d9631d2 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/libIlmImf.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/libjasper.a b/2.3-1/src/c/hardware/rasberrypi/libraries/libjasper.a Binary files differindex 6867f832..662e414c 100644 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/libjasper.a +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/libjasper.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/libjpeg.a b/2.3-1/src/c/hardware/rasberrypi/libraries/libjpeg.a Binary files differindex 4716fd80..e30c70c4 100644 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/libjpeg.a +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/libjpeg.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/libpng.a b/2.3-1/src/c/hardware/rasberrypi/libraries/libpng.a Binary files differnew file mode 100644 index 00000000..937cc22c --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/libpng.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/libpng.a.bkup b/2.3-1/src/c/hardware/rasberrypi/libraries/libpng.a.bkup Binary files differnew file mode 100644 index 00000000..ae370765 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/libpng.a.bkup diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/libtiff.a b/2.3-1/src/c/hardware/rasberrypi/libraries/libtiff.a Binary files differindex 743428e6..917d747d 100644 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/libtiff.a +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/libtiff.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/libzlib.a b/2.3-1/src/c/hardware/rasberrypi/libraries/libzlib.a Binary files differnew file mode 100644 index 00000000..5a64389d --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/libzlib.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_calib3d.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_calib3d.a Binary files differnew file mode 100644 index 00000000..5d69787c --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_calib3d.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_calib3d.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_calib3d.so Binary files differdeleted file mode 100644 index 357be83f..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_calib3d.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_contrib.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_contrib.a Binary files differnew file mode 100644 index 00000000..c2b4527e --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_contrib.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_contrib.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_contrib.so Binary files differdeleted file mode 100644 index 642ed003..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_contrib.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_core.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_core.a Binary files differnew file mode 100644 index 00000000..1a7056fc --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_core.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_core.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_core.so Binary files differdeleted file mode 100644 index 900f46da..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_core.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_features2d.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_features2d.a Binary files differnew file mode 100644 index 00000000..3bd21f25 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_features2d.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_features2d.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_features2d.so Binary files differdeleted file mode 100644 index b4d42966..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_features2d.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_flann.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_flann.a Binary files differnew file mode 100644 index 00000000..b5648fc6 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_flann.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_flann.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_flann.so Binary files differdeleted file mode 100644 index b4af830a..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_flann.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_gpu.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_gpu.a Binary files differnew file mode 100644 index 00000000..a3b093ac --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_gpu.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_gpu.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_gpu.so Binary files differdeleted file mode 100644 index c30af67d..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_gpu.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_haartraining_engine.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_haartraining_engine.a Binary files differnew file mode 100644 index 00000000..3a20f71a --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_haartraining_engine.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_highgui.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_highgui.a Binary files differnew file mode 100644 index 00000000..9b22dabe --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_highgui.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_highgui.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_highgui.so Binary files differdeleted file mode 100644 index 9a502296..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_highgui.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_imgproc.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_imgproc.a Binary files differnew file mode 100644 index 00000000..3ae1ca04 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_imgproc.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_imgproc.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_imgproc.so Binary files differdeleted file mode 100644 index 28bd1611..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_imgproc.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_legacy.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_legacy.a Binary files differnew file mode 100644 index 00000000..2d906d1c --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_legacy.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_legacy.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_legacy.so Binary files differdeleted file mode 100644 index 37d231f7..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_legacy.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ml.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ml.a Binary files differnew file mode 100644 index 00000000..5f6c164a --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ml.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ml.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ml.so Binary files differdeleted file mode 100644 index b31bf423..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ml.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_nonfree.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_nonfree.a Binary files differnew file mode 100644 index 00000000..4f49c8d1 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_nonfree.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_nonfree.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_nonfree.so Binary files differdeleted file mode 100644 index 53fdba22..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_nonfree.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_objdetect.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_objdetect.a Binary files differnew file mode 100644 index 00000000..6b3ddad3 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_objdetect.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_objdetect.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_objdetect.so Binary files differdeleted file mode 100644 index 2fd44680..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_objdetect.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ocl.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ocl.a Binary files differnew file mode 100644 index 00000000..f5a4b42b --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ocl.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ocl.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ocl.so Binary files differdeleted file mode 100644 index 6543e943..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ocl.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_photo.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_photo.a Binary files differnew file mode 100644 index 00000000..998a80a7 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_photo.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_photo.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_photo.so Binary files differdeleted file mode 100644 index 4ef7a4e3..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_photo.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_stitching.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_stitching.a Binary files differnew file mode 100644 index 00000000..aa0b1d39 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_stitching.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_stitching.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_stitching.so Binary files differdeleted file mode 100644 index 8e4ed8e9..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_stitching.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_superres.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_superres.a Binary files differnew file mode 100644 index 00000000..d33df018 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_superres.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_superres.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_superres.so Binary files differdeleted file mode 100644 index 02335315..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_superres.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ts.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ts.a Binary files differindex aea7e97d..f7016020 100644 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ts.a +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_ts.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_video.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_video.a Binary files differnew file mode 100644 index 00000000..c4a07bf0 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_video.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_video.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_video.so Binary files differdeleted file mode 100644 index 9c05c5d2..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_video.so +++ /dev/null diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_videostab.a b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_videostab.a Binary files differnew file mode 100644 index 00000000..e2c302d5 --- /dev/null +++ b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_videostab.a diff --git a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_videostab.so b/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_videostab.so Binary files differdeleted file mode 100644 index a44efbc6..00000000 --- a/2.3-1/src/c/hardware/rasberrypi/libraries/opencv/libopencv_videostab.so +++ /dev/null diff --git a/2.3-1/src/c/imageProcessing/cvcore/imcvCreateImages.c b/2.3-1/src/c/imageProcessing/cvcore/imcvCreateImages.c deleted file mode 100644 index 4543b724..00000000 --- a/2.3-1/src/c/imageProcessing/cvcore/imcvCreateImages.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - This file must be used under the terms of the CeCILL. - This source file is licensed as described in the file COPYING, which - you should have received as part of this distribution. The terms - are also available at - http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt - Author: Siddhesh Wani - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -/* Function to create openCV image object from given specifications*/ - -#include "types.h" -#include "cvcore.h" -#include <stdio.h> - -IplImage* imcvCreateImages(int width, int height, char *bit_depth, uint8 no_of_ch) -{ - CvSize imageSize = cvSize (width,height); - IplImage* img = NULL; - if (strcmp(bit_depth,"IPL_DEPTH_1U") == 0) - img = cvCreateImage(imageSize,IPL_DEPTH_1U,no_of_ch); - else if (strcmp(bit_depth,"IPL_DEPTH_8U") == 0) - img = cvCreateImage(imageSize,IPL_DEPTH_8U,no_of_ch); - else if (strcmp(bit_depth,"IPL_DEPTH_8S") == 0) - img = cvCreateImage(imageSize,IPL_DEPTH_8S,no_of_ch); - else if (strcmp(bit_depth,"IPL_DEPTH_16U") == 0) - img = cvCreateImage(imageSize,IPL_DEPTH_8U,no_of_ch); - else if (strcmp(bit_depth,"IPL_DEPTH_16S") == 0) - img = cvCreateImage(imageSize,IPL_DEPTH_8S,no_of_ch); - else if (strcmp(bit_depth,"IPL_DEPTH_32U") == 0) - img = cvCreateImage(imageSize,IPL_DEPTH_8U,no_of_ch); - else if (strcmp(bit_depth,"IPL_DEPTH_32S") == 0) - img = cvCreateImage(imageSize,IPL_DEPTH_8S,no_of_ch); - - return img; -}
\ No newline at end of file diff --git a/2.3-1/src/c/imageProcessing/cvcore/imcvCreateImages.cpp b/2.3-1/src/c/imageProcessing/cvcore/imcvCreateImages.cpp new file mode 100644 index 00000000..a04e836a --- /dev/null +++ b/2.3-1/src/c/imageProcessing/cvcore/imcvCreateImages.cpp @@ -0,0 +1,46 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/* Function to create openCV image object from given specifications*/ + +#include "types.h" +#include "cvcore.hpp" +#include <stdio.h> + +using namespace cv; +using namespace std; + +Mat imcvCreateImages(int width, int height, char *bit_depth, uint8 no_of_ch) +{ + Mat img; + /*Create opencv matrix with given type*/ + if (strcmp(bit_depth,"CV_8U") == 0) + img = Mat(height,width,CV_8U); + else if (strcmp(bit_depth,"CV_8S") == 0) + img = Mat(height,width,CV_8S); + else if (strcmp(bit_depth,"CV_16U") == 0) + img = Mat(height,width,CV_16U); + else if (strcmp(bit_depth,"CV_16S") == 0) + img = Mat(height,width,CV_16S); + else if (strcmp(bit_depth,"CV_32F") == 0) + img = Mat(height,width,CV_32F); + else if (strcmp(bit_depth,"CV_32S") == 0) + img = Mat(height,width,CV_32S); + else if (strcmp(bit_depth,"CV_64F") == 0) + img = Mat(height,width,CV_64F); + + + /*Change no of channels to specified input*/ + img.reshape(no_of_ch); + + return img; +}
\ No newline at end of file diff --git a/2.3-1/src/c/imageProcessing/cvimgproc/imcvCvtColors.c b/2.3-1/src/c/imageProcessing/cvcore/imcvGetImgSizes.cpp index bc2a70ec..0c4e848f 100644 --- a/2.3-1/src/c/imageProcessing/cvimgproc/imcvCvtColors.c +++ b/2.3-1/src/c/imageProcessing/cvcore/imcvGetImgSizes.cpp @@ -13,15 +13,15 @@ /* Function to convert image object to other color space*/ #include "types.h" -#include "cvcore.h" -#include "cvimgproc.h" +#include "cvcore.hpp" +#include "cvimgproc.hpp" #include <stdio.h> -uint8 imcvCvtColors(IplImage* src, IplImage* dst, char* code) -{ - - if(strcmp(code,"CV_BGR2GRAY") == 0) - cvCvtColor(src,dst,CV_RGB2GRAY); +using namespace cv; +using namespace std; - return 0; +void imcvGetImgSizes(Mat src, double* imgsize) +{ + imgsize[0] = src.rows; + imgsize[1] = src.cols; }
\ No newline at end of file diff --git a/2.3-1/src/c/imageProcessing/cvhighgui/imcvLoadImages.c b/2.3-1/src/c/imageProcessing/cvhighgui/imcvLoadImages.cpp index 7c843f94..bf7ff07e 100644 --- a/2.3-1/src/c/imageProcessing/cvhighgui/imcvLoadImages.c +++ b/2.3-1/src/c/imageProcessing/cvhighgui/imcvLoadImages.cpp @@ -13,11 +13,11 @@ /* Function to load image object from given filename*/ #include "types.h" -#include "cvcore.h" -#include "cvhighgui.h" +#include "cvcore.hpp" +#include "cvhighgui.hpp" #include <stdio.h> -IplImage* imcvLoadImages(char *filename, uint8 opentype) +Mat imcvLoadImages(char *filename, uint8 opentype) { - return (cvLoadImage(filename,opentype)); + return (imread(filename,opentype)); }
\ No newline at end of file diff --git a/2.3-1/src/c/imageProcessing/cvhighgui/imcvShowImages.c b/2.3-1/src/c/imageProcessing/cvhighgui/imcvShowImages.cpp index 82ae3ee3..6179c3dc 100644 --- a/2.3-1/src/c/imageProcessing/cvhighgui/imcvShowImages.c +++ b/2.3-1/src/c/imageProcessing/cvhighgui/imcvShowImages.cpp @@ -13,13 +13,15 @@ /* Function to create show an image */ #include "types.h" -#include "cvcore.h" -#include "cvhighgui.h" +#include "cvcore.hpp" +#include "cvhighgui.hpp" #include <stdio.h> -uint8 imcvShowImages(char *winname, IplImage* img) +using namespace cv; + +uint8 imcvShowImages(char *winname, Mat img) { - cvShowImage(winname,img); + imshow(winname,img); return (0); }
\ No newline at end of file diff --git a/2.3-1/src/c/imageProcessing/cvcore/imcvGetImgSizes.c b/2.3-1/src/c/imageProcessing/cvimgproc/imcvCvtColors.cpp index 2faa6271..1523afea 100644 --- a/2.3-1/src/c/imageProcessing/cvcore/imcvGetImgSizes.c +++ b/2.3-1/src/c/imageProcessing/cvimgproc/imcvCvtColors.cpp @@ -13,20 +13,17 @@ /* Function to convert image object to other color space*/ #include "types.h" -#include "cvcore.h" -#include "cvimgproc.h" +#include "cvcore.hpp" +#include "cvimgproc.hpp" #include <stdio.h> -void imcvGetImgSizes(IplImage* src, double* imgsize) +using namespace cv; + +Mat imcvCvtColors(Mat src, char* code) { - if(src != NULL) - { - imgsize[0] = src->width; - imgsize[1] = src->height; - } - else - { - printf("Error with input image"); - } - + Mat dst(src.rows, src.cols, src.type()); + if(strcmp(code,"CV_RGB2GRAY") == 0) + cvtColor(src,dst,CV_RGB2GRAY); + + return dst; }
\ No newline at end of file diff --git a/2.3-1/src/c/imageProcessing/cvimgproc/imcvThresholds.c b/2.3-1/src/c/imageProcessing/cvimgproc/imcvThresholds.cpp index cd66c52e..2e40de91 100644 --- a/2.3-1/src/c/imageProcessing/cvimgproc/imcvThresholds.c +++ b/2.3-1/src/c/imageProcessing/cvimgproc/imcvThresholds.cpp @@ -13,15 +13,17 @@ /* Function to threshold a gray scale image*/ #include "types.h" -#include "cvcore.h" -#include "cvimgproc.h" +#include "cvcore.hpp" +#include "cvimgproc.hpp" #include <stdio.h> -IplImage* imcvThresholds(IplImage* src, double threshold, double maxvalue, char* type) +using namespace cv; + +Mat imcvThresholds(Mat src, double t_value, double maxvalue, char* type) { - dst = imcvCreates(src->width, src->height, src->,1); - if(strcmp(code,"CV_BGR2GRAY") == 0) - cvCvtColor(src,dst,CV_RGB2GRAY); + Mat dst(src.rows, src.cols, src.type()); + if(strcmp(type,"THRESH_BINARY") == 0) + threshold(src,dst,t_value,maxvalue,THRESH_BINARY); - return 0; + return dst; }
\ No newline at end of file diff --git a/2.3-1/src/c/imageProcessing/includes/core.h b/2.3-1/src/c/imageProcessing/includes/core.h deleted file mode 100644 index 1e4c83cb..00000000 --- a/2.3-1/src/c/imageProcessing/includes/core.h +++ /dev/null @@ -1,11 +0,0 @@ - /* Copyright (C) 2016 - IIT Bombay - FOSSEE - - This file must be used under the terms of the CeCILL. - This source file is licensed as described in the file COPYING, which - you should have received as part of this distribution. The terms - are also available at - http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt - Author: Siddhesh Wani - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ diff --git a/2.3-1/src/c/imageProcessing/includes/cvcore.h b/2.3-1/src/c/imageProcessing/includes/cvcore.hpp index 4f04e581..78876f7a 100644 --- a/2.3-1/src/c/imageProcessing/includes/cvcore.h +++ b/2.3-1/src/c/imageProcessing/includes/cvcore.hpp @@ -13,18 +13,14 @@ #ifndef __CVCORE_H__ #define __CVCORE_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include "types.h" #include "opencv2/core/core.hpp" -IplImage* imcvCreateImages(int width, int height, char *bit_depth, uint8 no_of_ch); -void imcvGetImgSizes(IplImage* src, double* imgsize); -#ifdef __cplusplus -} /* extern "C" */ -#endif +using namespace cv; + +Mat imcvCreateImages(int width, int height, char *bit_depth, uint8 no_of_ch); +void imcvGetImgSizes(Mat src, double* imgsize); + #endif /*__CVCORE_H__*/ diff --git a/2.3-1/src/c/imageProcessing/includes/cvhighgui.h b/2.3-1/src/c/imageProcessing/includes/cvhighgui.hpp index 2e959a5d..167cb63a 100644 --- a/2.3-1/src/c/imageProcessing/includes/cvhighgui.h +++ b/2.3-1/src/c/imageProcessing/includes/cvhighgui.hpp @@ -13,20 +13,14 @@ #ifndef __CVHIGHGUI_H__ #define __CVHIGHGUI_H__ -#ifdef __cplusplus -extern "C" { -#endif - - #include "types.h" #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" -IplImage* imcvLoadImages(char *filename, uint8 opentype); -uint8 imcvShowImages(char *winname, IplImage* img); +using namespace cv; + +Mat imcvLoadImages(char *filename, uint8 opentype); +uint8 imcvShowImages(char *winname, Mat img); -#ifdef __cplusplus -} /* extern "C" */ -#endif #endif /*__CVCORE_H__*/ diff --git a/2.3-1/src/c/imageProcessing/includes/cvimgproc.h b/2.3-1/src/c/imageProcessing/includes/cvimgproc.hpp index 5d982e49..b7d2faa2 100644 --- a/2.3-1/src/c/imageProcessing/includes/cvimgproc.h +++ b/2.3-1/src/c/imageProcessing/includes/cvimgproc.hpp @@ -13,19 +13,13 @@ #ifndef __CVIMGPROC_H__ #define __CVIMGPROC_H__ -#ifdef __cplusplus -extern "C" { -#endif - - #include "types.h" #include "opencv2/core/core.hpp" #include "opencv2/imgproc/imgproc.hpp" -uint8 imcvCvtColor(IplImage* src, IplImage* dst, char* code); +using namespace cv; -#ifdef __cplusplus -} /* extern "C" */ -#endif +Mat imcvCvtColors(Mat src, char* code); +Mat imcvThresholds(Mat src, double threshold, double maxvalue, char* type); #endif /*__CVIMGPROC_H__*/ diff --git a/2.3-1/src/c/imageProcessing/includes/temp.h b/2.3-1/src/c/imageProcessing/includes/temp.h deleted file mode 100644 index 1e4c83cb..00000000 --- a/2.3-1/src/c/imageProcessing/includes/temp.h +++ /dev/null @@ -1,11 +0,0 @@ - /* Copyright (C) 2016 - IIT Bombay - FOSSEE - - This file must be used under the terms of the CeCILL. - This source file is licensed as described in the file COPYING, which - you should have received as part of this distribution. The terms - are also available at - http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt - Author: Siddhesh Wani - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ diff --git a/2.3-1/src/c/imageProcessing/interfaces/int_cvcore.h b/2.3-1/src/c/imageProcessing/interfaces/int_cvcore.hpp index 5ae0055f..82c1313e 100644 --- a/2.3-1/src/c/imageProcessing/interfaces/int_cvcore.h +++ b/2.3-1/src/c/imageProcessing/interfaces/int_cvcore.hpp @@ -13,20 +13,14 @@ #ifndef __INT_CVCORE_H__ #define __INT_CVCORE_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include "types.h" -#include "cvcore.h" +#include "cvcore.hpp" -#define d0d0g2d0CV_CreateImageim0(width,height,depth,depth_size,no_of_ch) \ +#define d0d0g2d0CV_CreateImagemt0(width,height,depth,depth_size,no_of_ch) \ imcvCreateImages(width,height,depth,no_of_ch) -#define im0CV_GetImgSized2(img,imgsize) imcvGetImgSizes(img,imgsize) -#ifdef __cplusplus -} /* extern "C" */ -#endif +#define mt0CV_GetImgSized2(img,imgsize) imcvGetImgSizes(img,imgsize) + #endif /*__INT_CVCORE_H__*/ diff --git a/2.3-1/src/c/imageProcessing/interfaces/int_cvhighgui.h b/2.3-1/src/c/imageProcessing/interfaces/int_cvhighgui.hpp index d8ecf1c6..05f260f6 100644 --- a/2.3-1/src/c/imageProcessing/interfaces/int_cvhighgui.h +++ b/2.3-1/src/c/imageProcessing/interfaces/int_cvhighgui.hpp @@ -13,22 +13,16 @@ #ifndef __INT_CVHIGHGUI_H__ #define __INT_CVHIGHGUI_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include "types.h" +#include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" -#define g2d0CV_LoadImageim0(filename,name_size,loadtype) imcvLoadImages(filename,loadtype) -#define g2im0CV_ShowImageu80(winname,win_size,img) imcvShowImages(winname,img) -#define im0CV_ShowImageu80(img) imcvShowImages("",img) +//#define g2d0CV_LoadImageim0(filename,name_size,loadtype) imcvLoadImages(filename,loadtype) +#define g2d0CV_LoadImagemt0(filename,name_size,loadtype) imread(filename,loadtype) +#define g2mt0CV_ShowImageu80(winname,win_size,img) imshow(winname,img) +#define mt0CV_ShowImageu80(img) imshow("",img) #define d0CV_WaitKeyu80(delay) cvWaitKey(delay) -#define g2im0CV_SaveImageu80(filename,name_size,img) cvSaveImage(filename,img,NULL) - -#ifdef __cplusplus -} /* extern "C" */ -#endif +#define g2mt0CV_SaveImageu80(filename,name_size,img) imwrite(filename,img) #endif /*__INT_CVHIGHGUI_H__*/ diff --git a/2.3-1/src/c/imageProcessing/interfaces/int_cvimgproc.h b/2.3-1/src/c/imageProcessing/interfaces/int_cvimgproc.hpp index 47192e10..65fa77e4 100644 --- a/2.3-1/src/c/imageProcessing/interfaces/int_cvimgproc.h +++ b/2.3-1/src/c/imageProcessing/interfaces/int_cvimgproc.hpp @@ -13,20 +13,12 @@ #ifndef __INT_CVIMGPROC_H__ #define __INT_CVIMGPROC_H__ -#ifdef __cplusplus -extern "C" { -#endif - - #include "types.h" +#include "opencv2/core/core.hpp" #include "opencv2/imgproc/imgproc.hpp" -#define im0im0g2CV_CvtColoru80(src,dst,code,code_size) imcvCvtColors(src,dst,code) -#define im0d0d0g2CV_Thresholdim0(src,threshold,maxvalue,thresh_type,type_size) - imcvThrehold(src,threshold,maxvalue,thresh_type) - -#ifdef __cplusplus -} /* extern "C" */ -#endif +#define mt0g2CV_CvtColormt0(src,code,code_size) imcvCvtColors(src,code) +#define mt0d0d0g2CV_Thresholdmt0(src,threshold,maxvalue,thresh_type,type_size) \ + imcvThresholds(src,threshold,maxvalue,thresh_type) #endif /*__INT_CVIMGPROC_H__*/ |