From 2790257d385a9d7d9e0dab9205baf4b3df0dd8c8 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Mon, 29 Aug 2016 10:47:52 +0530 Subject: OpenCV interface changed from c to c++ --- src/c/auxiliaryFunctions/interfaces/int_conj.h | 14 +++---- src/c/hardware/rasberrypi/libraries/libIlmImf.a | Bin 0 -> 2763492 bytes src/c/hardware/rasberrypi/libraries/libjasper.a | Bin 1029234 -> 423758 bytes src/c/hardware/rasberrypi/libraries/libjpeg.a | Bin 1119888 -> 243096 bytes src/c/hardware/rasberrypi/libraries/libpng.a | Bin 0 -> 252546 bytes src/c/hardware/rasberrypi/libraries/libpng.a.bkup | Bin 0 -> 252546 bytes src/c/hardware/rasberrypi/libraries/libtiff.a | Bin 1380758 -> 541798 bytes src/c/hardware/rasberrypi/libraries/libzlib.a | Bin 0 -> 120138 bytes .../libraries/opencv/libopencv_calib3d.a | Bin 0 -> 1085214 bytes .../libraries/opencv/libopencv_calib3d.so | Bin 3629128 -> 0 bytes .../libraries/opencv/libopencv_contrib.a | Bin 0 -> 1509928 bytes .../libraries/opencv/libopencv_contrib.so | Bin 6065088 -> 0 bytes .../rasberrypi/libraries/opencv/libopencv_core.a | Bin 0 -> 3816510 bytes .../rasberrypi/libraries/opencv/libopencv_core.so | Bin 7376312 -> 0 bytes .../libraries/opencv/libopencv_features2d.a | Bin 0 -> 1182146 bytes .../libraries/opencv/libopencv_features2d.so | Bin 4200032 -> 0 bytes .../rasberrypi/libraries/opencv/libopencv_flann.a | Bin 0 -> 1054510 bytes .../rasberrypi/libraries/opencv/libopencv_flann.so | Bin 2697296 -> 0 bytes .../rasberrypi/libraries/opencv/libopencv_gpu.a | Bin 0 -> 763098 bytes .../rasberrypi/libraries/opencv/libopencv_gpu.so | Bin 2619680 -> 0 bytes .../opencv/libopencv_haartraining_engine.a | Bin 0 -> 814832 bytes .../libraries/opencv/libopencv_highgui.a | Bin 0 -> 512558 bytes .../libraries/opencv/libopencv_highgui.so | Bin 7838352 -> 0 bytes .../libraries/opencv/libopencv_imgproc.a | Bin 0 -> 3248656 bytes .../libraries/opencv/libopencv_imgproc.so | Bin 7284984 -> 0 bytes .../rasberrypi/libraries/opencv/libopencv_legacy.a | Bin 0 -> 2066262 bytes .../libraries/opencv/libopencv_legacy.so | Bin 6518888 -> 0 bytes .../rasberrypi/libraries/opencv/libopencv_ml.a | Bin 0 -> 857478 bytes .../rasberrypi/libraries/opencv/libopencv_ml.so | Bin 1971600 -> 0 bytes .../libraries/opencv/libopencv_nonfree.a | Bin 0 -> 331496 bytes .../libraries/opencv/libopencv_nonfree.so | Bin 1091828 -> 0 bytes .../libraries/opencv/libopencv_objdetect.a | Bin 0 -> 814754 bytes .../libraries/opencv/libopencv_objdetect.so | Bin 3734856 -> 0 bytes .../rasberrypi/libraries/opencv/libopencv_ocl.a | Bin 0 -> 2814596 bytes .../rasberrypi/libraries/opencv/libopencv_ocl.so | Bin 7169952 -> 0 bytes .../rasberrypi/libraries/opencv/libopencv_photo.a | Bin 0 -> 153324 bytes .../rasberrypi/libraries/opencv/libopencv_photo.so | Bin 410344 -> 0 bytes .../libraries/opencv/libopencv_stitching.a | Bin 0 -> 825842 bytes .../libraries/opencv/libopencv_stitching.so | Bin 3714560 -> 0 bytes .../libraries/opencv/libopencv_superres.a | Bin 0 -> 436700 bytes .../libraries/opencv/libopencv_superres.so | Bin 1213364 -> 0 bytes .../rasberrypi/libraries/opencv/libopencv_ts.a | Bin 8438392 -> 1365686 bytes .../rasberrypi/libraries/opencv/libopencv_video.a | Bin 0 -> 465468 bytes .../rasberrypi/libraries/opencv/libopencv_video.so | Bin 1385940 -> 0 bytes .../libraries/opencv/libopencv_videostab.a | Bin 0 -> 439870 bytes .../libraries/opencv/libopencv_videostab.so | Bin 1473068 -> 0 bytes src/c/imageProcessing/cvcore/imcvCreateImages.c | 39 ----------------- src/c/imageProcessing/cvcore/imcvCreateImages.cpp | 46 +++++++++++++++++++++ src/c/imageProcessing/cvcore/imcvGetImgSizes.c | 32 -------------- src/c/imageProcessing/cvcore/imcvGetImgSizes.cpp | 27 ++++++++++++ src/c/imageProcessing/cvhighgui/imcvLoadImages.c | 23 ----------- src/c/imageProcessing/cvhighgui/imcvLoadImages.cpp | 23 +++++++++++ src/c/imageProcessing/cvhighgui/imcvShowImages.c | 25 ----------- src/c/imageProcessing/cvhighgui/imcvShowImages.cpp | 27 ++++++++++++ src/c/imageProcessing/cvimgproc/imcvCvtColors.c | 27 ------------ src/c/imageProcessing/cvimgproc/imcvCvtColors.cpp | 29 +++++++++++++ src/c/imageProcessing/cvimgproc/imcvThresholds.c | 27 ------------ src/c/imageProcessing/cvimgproc/imcvThresholds.cpp | 29 +++++++++++++ src/c/imageProcessing/includes/core.h | 11 ----- src/c/imageProcessing/includes/cvcore.h | 30 -------------- src/c/imageProcessing/includes/cvcore.hpp | 26 ++++++++++++ src/c/imageProcessing/includes/cvhighgui.h | 32 -------------- src/c/imageProcessing/includes/cvhighgui.hpp | 26 ++++++++++++ src/c/imageProcessing/includes/cvimgproc.h | 31 -------------- src/c/imageProcessing/includes/cvimgproc.hpp | 25 +++++++++++ src/c/imageProcessing/includes/temp.h | 11 ----- src/c/imageProcessing/interfaces/int_cvcore.h | 32 -------------- src/c/imageProcessing/interfaces/int_cvcore.hpp | 26 ++++++++++++ src/c/imageProcessing/interfaces/int_cvhighgui.h | 34 --------------- src/c/imageProcessing/interfaces/int_cvhighgui.hpp | 28 +++++++++++++ src/c/imageProcessing/interfaces/int_cvimgproc.h | 32 -------------- src/c/imageProcessing/interfaces/int_cvimgproc.hpp | 24 +++++++++++ 72 files changed, 343 insertions(+), 393 deletions(-) create mode 100644 src/c/hardware/rasberrypi/libraries/libIlmImf.a create mode 100644 src/c/hardware/rasberrypi/libraries/libpng.a create mode 100644 src/c/hardware/rasberrypi/libraries/libpng.a.bkup create mode 100644 src/c/hardware/rasberrypi/libraries/libzlib.a create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_calib3d.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_calib3d.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_contrib.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_contrib.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_core.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_core.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_features2d.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_features2d.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_flann.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_flann.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_gpu.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_gpu.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_haartraining_engine.a create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_highgui.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_highgui.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_imgproc.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_imgproc.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_legacy.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_legacy.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_ml.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_ml.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_nonfree.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_nonfree.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_objdetect.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_objdetect.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_ocl.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_ocl.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_photo.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_photo.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_stitching.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_stitching.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_superres.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_superres.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_video.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_video.so create mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_videostab.a delete mode 100644 src/c/hardware/rasberrypi/libraries/opencv/libopencv_videostab.so delete mode 100644 src/c/imageProcessing/cvcore/imcvCreateImages.c create mode 100644 src/c/imageProcessing/cvcore/imcvCreateImages.cpp delete mode 100644 src/c/imageProcessing/cvcore/imcvGetImgSizes.c create mode 100644 src/c/imageProcessing/cvcore/imcvGetImgSizes.cpp delete mode 100644 src/c/imageProcessing/cvhighgui/imcvLoadImages.c create mode 100644 src/c/imageProcessing/cvhighgui/imcvLoadImages.cpp delete mode 100644 src/c/imageProcessing/cvhighgui/imcvShowImages.c create mode 100644 src/c/imageProcessing/cvhighgui/imcvShowImages.cpp delete mode 100644 src/c/imageProcessing/cvimgproc/imcvCvtColors.c create mode 100644 src/c/imageProcessing/cvimgproc/imcvCvtColors.cpp delete mode 100644 src/c/imageProcessing/cvimgproc/imcvThresholds.c create mode 100644 src/c/imageProcessing/cvimgproc/imcvThresholds.cpp delete mode 100644 src/c/imageProcessing/includes/core.h delete mode 100644 src/c/imageProcessing/includes/cvcore.h create mode 100644 src/c/imageProcessing/includes/cvcore.hpp delete mode 100644 src/c/imageProcessing/includes/cvhighgui.h create mode 100644 src/c/imageProcessing/includes/cvhighgui.hpp delete mode 100644 src/c/imageProcessing/includes/cvimgproc.h create mode 100644 src/c/imageProcessing/includes/cvimgproc.hpp delete mode 100644 src/c/imageProcessing/includes/temp.h delete mode 100644 src/c/imageProcessing/interfaces/int_cvcore.h create mode 100644 src/c/imageProcessing/interfaces/int_cvcore.hpp delete mode 100644 src/c/imageProcessing/interfaces/int_cvhighgui.h create mode 100644 src/c/imageProcessing/interfaces/int_cvhighgui.hpp delete mode 100644 src/c/imageProcessing/interfaces/int_cvimgproc.h create mode 100644 src/c/imageProcessing/interfaces/int_cvimgproc.hpp (limited to 'src') diff --git a/src/c/auxiliaryFunctions/interfaces/int_conj.h b/src/c/auxiliaryFunctions/interfaces/int_conj.h index fec555b..7884c99 100644 --- a/src/c/auxiliaryFunctions/interfaces/int_conj.h +++ b/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 - -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/src/c/imageProcessing/cvcore/imcvCreateImages.cpp b/src/c/imageProcessing/cvcore/imcvCreateImages.cpp new file mode 100644 index 0000000..a04e836 --- /dev/null +++ b/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 + +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/src/c/imageProcessing/cvcore/imcvGetImgSizes.c b/src/c/imageProcessing/cvcore/imcvGetImgSizes.c deleted file mode 100644 index 2faa627..0000000 --- a/src/c/imageProcessing/cvcore/imcvGetImgSizes.c +++ /dev/null @@ -1,32 +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 convert image object to other color space*/ - -#include "types.h" -#include "cvcore.h" -#include "cvimgproc.h" -#include - -void imcvGetImgSizes(IplImage* src, double* imgsize) -{ - if(src != NULL) - { - imgsize[0] = src->width; - imgsize[1] = src->height; - } - else - { - printf("Error with input image"); - } - -} \ No newline at end of file diff --git a/src/c/imageProcessing/cvcore/imcvGetImgSizes.cpp b/src/c/imageProcessing/cvcore/imcvGetImgSizes.cpp new file mode 100644 index 0000000..0c4e848 --- /dev/null +++ b/src/c/imageProcessing/cvcore/imcvGetImgSizes.cpp @@ -0,0 +1,27 @@ +/* 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 convert image object to other color space*/ + +#include "types.h" +#include "cvcore.hpp" +#include "cvimgproc.hpp" +#include + +using namespace cv; +using namespace std; + +void imcvGetImgSizes(Mat src, double* imgsize) +{ + imgsize[0] = src.rows; + imgsize[1] = src.cols; +} \ No newline at end of file diff --git a/src/c/imageProcessing/cvhighgui/imcvLoadImages.c b/src/c/imageProcessing/cvhighgui/imcvLoadImages.c deleted file mode 100644 index 7c843f9..0000000 --- a/src/c/imageProcessing/cvhighgui/imcvLoadImages.c +++ /dev/null @@ -1,23 +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 load image object from given filename*/ - -#include "types.h" -#include "cvcore.h" -#include "cvhighgui.h" -#include - -IplImage* imcvLoadImages(char *filename, uint8 opentype) -{ - return (cvLoadImage(filename,opentype)); -} \ No newline at end of file diff --git a/src/c/imageProcessing/cvhighgui/imcvLoadImages.cpp b/src/c/imageProcessing/cvhighgui/imcvLoadImages.cpp new file mode 100644 index 0000000..bf7ff07 --- /dev/null +++ b/src/c/imageProcessing/cvhighgui/imcvLoadImages.cpp @@ -0,0 +1,23 @@ +/* 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 load image object from given filename*/ + +#include "types.h" +#include "cvcore.hpp" +#include "cvhighgui.hpp" +#include + +Mat imcvLoadImages(char *filename, uint8 opentype) +{ + return (imread(filename,opentype)); +} \ No newline at end of file diff --git a/src/c/imageProcessing/cvhighgui/imcvShowImages.c b/src/c/imageProcessing/cvhighgui/imcvShowImages.c deleted file mode 100644 index 82ae3ee..0000000 --- a/src/c/imageProcessing/cvhighgui/imcvShowImages.c +++ /dev/null @@ -1,25 +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 show an image */ - -#include "types.h" -#include "cvcore.h" -#include "cvhighgui.h" -#include - -uint8 imcvShowImages(char *winname, IplImage* img) -{ - cvShowImage(winname,img); - - return (0); -} \ No newline at end of file diff --git a/src/c/imageProcessing/cvhighgui/imcvShowImages.cpp b/src/c/imageProcessing/cvhighgui/imcvShowImages.cpp new file mode 100644 index 0000000..6179c3d --- /dev/null +++ b/src/c/imageProcessing/cvhighgui/imcvShowImages.cpp @@ -0,0 +1,27 @@ +/* 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 show an image */ + +#include "types.h" +#include "cvcore.hpp" +#include "cvhighgui.hpp" +#include + +using namespace cv; + +uint8 imcvShowImages(char *winname, Mat img) +{ + imshow(winname,img); + + return (0); +} \ No newline at end of file diff --git a/src/c/imageProcessing/cvimgproc/imcvCvtColors.c b/src/c/imageProcessing/cvimgproc/imcvCvtColors.c deleted file mode 100644 index bc2a70e..0000000 --- a/src/c/imageProcessing/cvimgproc/imcvCvtColors.c +++ /dev/null @@ -1,27 +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 convert image object to other color space*/ - -#include "types.h" -#include "cvcore.h" -#include "cvimgproc.h" -#include - -uint8 imcvCvtColors(IplImage* src, IplImage* dst, char* code) -{ - - if(strcmp(code,"CV_BGR2GRAY") == 0) - cvCvtColor(src,dst,CV_RGB2GRAY); - - return 0; -} \ No newline at end of file diff --git a/src/c/imageProcessing/cvimgproc/imcvCvtColors.cpp b/src/c/imageProcessing/cvimgproc/imcvCvtColors.cpp new file mode 100644 index 0000000..1523afe --- /dev/null +++ b/src/c/imageProcessing/cvimgproc/imcvCvtColors.cpp @@ -0,0 +1,29 @@ +/* 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 convert image object to other color space*/ + +#include "types.h" +#include "cvcore.hpp" +#include "cvimgproc.hpp" +#include + +using namespace cv; + +Mat imcvCvtColors(Mat src, char* code) +{ + 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/src/c/imageProcessing/cvimgproc/imcvThresholds.c b/src/c/imageProcessing/cvimgproc/imcvThresholds.c deleted file mode 100644 index cd66c52..0000000 --- a/src/c/imageProcessing/cvimgproc/imcvThresholds.c +++ /dev/null @@ -1,27 +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 threshold a gray scale image*/ - -#include "types.h" -#include "cvcore.h" -#include "cvimgproc.h" -#include - -IplImage* imcvThresholds(IplImage* src, double threshold, double maxvalue, char* type) -{ - dst = imcvCreates(src->width, src->height, src->,1); - if(strcmp(code,"CV_BGR2GRAY") == 0) - cvCvtColor(src,dst,CV_RGB2GRAY); - - return 0; -} \ No newline at end of file diff --git a/src/c/imageProcessing/cvimgproc/imcvThresholds.cpp b/src/c/imageProcessing/cvimgproc/imcvThresholds.cpp new file mode 100644 index 0000000..2e40de9 --- /dev/null +++ b/src/c/imageProcessing/cvimgproc/imcvThresholds.cpp @@ -0,0 +1,29 @@ +/* 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 threshold a gray scale image*/ + +#include "types.h" +#include "cvcore.hpp" +#include "cvimgproc.hpp" +#include + +using namespace cv; + +Mat imcvThresholds(Mat src, double t_value, double maxvalue, char* type) +{ + Mat dst(src.rows, src.cols, src.type()); + if(strcmp(type,"THRESH_BINARY") == 0) + threshold(src,dst,t_value,maxvalue,THRESH_BINARY); + + return dst; +} \ No newline at end of file diff --git a/src/c/imageProcessing/includes/core.h b/src/c/imageProcessing/includes/core.h deleted file mode 100644 index 1e4c83c..0000000 --- a/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/src/c/imageProcessing/includes/cvcore.h b/src/c/imageProcessing/includes/cvcore.h deleted file mode 100644 index 4f04e58..0000000 --- a/src/c/imageProcessing/includes/cvcore.h +++ /dev/null @@ -1,30 +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 -*/ - -#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 - -#endif /*__CVCORE_H__*/ diff --git a/src/c/imageProcessing/includes/cvcore.hpp b/src/c/imageProcessing/includes/cvcore.hpp new file mode 100644 index 0000000..78876f7 --- /dev/null +++ b/src/c/imageProcessing/includes/cvcore.hpp @@ -0,0 +1,26 @@ +/* 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 +*/ + +#ifndef __CVCORE_H__ +#define __CVCORE_H__ + + +#include "types.h" +#include "opencv2/core/core.hpp" + +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/src/c/imageProcessing/includes/cvhighgui.h b/src/c/imageProcessing/includes/cvhighgui.h deleted file mode 100644 index 2e959a5..0000000 --- a/src/c/imageProcessing/includes/cvhighgui.h +++ /dev/null @@ -1,32 +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 -*/ - -#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); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*__CVCORE_H__*/ diff --git a/src/c/imageProcessing/includes/cvhighgui.hpp b/src/c/imageProcessing/includes/cvhighgui.hpp new file mode 100644 index 0000000..167cb63 --- /dev/null +++ b/src/c/imageProcessing/includes/cvhighgui.hpp @@ -0,0 +1,26 @@ +/* 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 +*/ + +#ifndef __CVHIGHGUI_H__ +#define __CVHIGHGUI_H__ + +#include "types.h" +#include "opencv2/core/core.hpp" +#include "opencv2/highgui/highgui.hpp" + +using namespace cv; + +Mat imcvLoadImages(char *filename, uint8 opentype); +uint8 imcvShowImages(char *winname, Mat img); + + +#endif /*__CVCORE_H__*/ diff --git a/src/c/imageProcessing/includes/cvimgproc.h b/src/c/imageProcessing/includes/cvimgproc.h deleted file mode 100644 index 5d982e4..0000000 --- a/src/c/imageProcessing/includes/cvimgproc.h +++ /dev/null @@ -1,31 +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 -*/ - -#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); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*__CVIMGPROC_H__*/ diff --git a/src/c/imageProcessing/includes/cvimgproc.hpp b/src/c/imageProcessing/includes/cvimgproc.hpp new file mode 100644 index 0000000..b7d2faa --- /dev/null +++ b/src/c/imageProcessing/includes/cvimgproc.hpp @@ -0,0 +1,25 @@ +/* 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 +*/ + +#ifndef __CVIMGPROC_H__ +#define __CVIMGPROC_H__ + +#include "types.h" +#include "opencv2/core/core.hpp" +#include "opencv2/imgproc/imgproc.hpp" + +using namespace cv; + +Mat imcvCvtColors(Mat src, char* code); +Mat imcvThresholds(Mat src, double threshold, double maxvalue, char* type); + +#endif /*__CVIMGPROC_H__*/ diff --git a/src/c/imageProcessing/includes/temp.h b/src/c/imageProcessing/includes/temp.h deleted file mode 100644 index 1e4c83c..0000000 --- a/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/src/c/imageProcessing/interfaces/int_cvcore.h b/src/c/imageProcessing/interfaces/int_cvcore.h deleted file mode 100644 index 5ae0055..0000000 --- a/src/c/imageProcessing/interfaces/int_cvcore.h +++ /dev/null @@ -1,32 +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 -*/ - -#ifndef __INT_CVCORE_H__ -#define __INT_CVCORE_H__ - -#ifdef __cplusplus -extern "C" { -#endif - - -#include "types.h" -#include "cvcore.h" - -#define d0d0g2d0CV_CreateImageim0(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 - -#endif /*__INT_CVCORE_H__*/ diff --git a/src/c/imageProcessing/interfaces/int_cvcore.hpp b/src/c/imageProcessing/interfaces/int_cvcore.hpp new file mode 100644 index 0000000..82c1313 --- /dev/null +++ b/src/c/imageProcessing/interfaces/int_cvcore.hpp @@ -0,0 +1,26 @@ +/* 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 +*/ + +#ifndef __INT_CVCORE_H__ +#define __INT_CVCORE_H__ + + +#include "types.h" +#include "cvcore.hpp" + +#define d0d0g2d0CV_CreateImagemt0(width,height,depth,depth_size,no_of_ch) \ + imcvCreateImages(width,height,depth,no_of_ch) + +#define mt0CV_GetImgSized2(img,imgsize) imcvGetImgSizes(img,imgsize) + + +#endif /*__INT_CVCORE_H__*/ diff --git a/src/c/imageProcessing/interfaces/int_cvhighgui.h b/src/c/imageProcessing/interfaces/int_cvhighgui.h deleted file mode 100644 index d8ecf1c..0000000 --- a/src/c/imageProcessing/interfaces/int_cvhighgui.h +++ /dev/null @@ -1,34 +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 -*/ - -#ifndef __INT_CVHIGHGUI_H__ -#define __INT_CVHIGHGUI_H__ - -#ifdef __cplusplus -extern "C" { -#endif - - -#include "types.h" -#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 d0CV_WaitKeyu80(delay) cvWaitKey(delay) -#define g2im0CV_SaveImageu80(filename,name_size,img) cvSaveImage(filename,img,NULL) - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*__INT_CVHIGHGUI_H__*/ diff --git a/src/c/imageProcessing/interfaces/int_cvhighgui.hpp b/src/c/imageProcessing/interfaces/int_cvhighgui.hpp new file mode 100644 index 0000000..05f260f --- /dev/null +++ b/src/c/imageProcessing/interfaces/int_cvhighgui.hpp @@ -0,0 +1,28 @@ +/* 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 +*/ + +#ifndef __INT_CVHIGHGUI_H__ +#define __INT_CVHIGHGUI_H__ + + +#include "types.h" +#include "opencv2/core/core.hpp" +#include "opencv2/highgui/highgui.hpp" + +//#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 g2mt0CV_SaveImageu80(filename,name_size,img) imwrite(filename,img) + +#endif /*__INT_CVHIGHGUI_H__*/ diff --git a/src/c/imageProcessing/interfaces/int_cvimgproc.h b/src/c/imageProcessing/interfaces/int_cvimgproc.h deleted file mode 100644 index 47192e1..0000000 --- a/src/c/imageProcessing/interfaces/int_cvimgproc.h +++ /dev/null @@ -1,32 +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 -*/ - -#ifndef __INT_CVIMGPROC_H__ -#define __INT_CVIMGPROC_H__ - -#ifdef __cplusplus -extern "C" { -#endif - - -#include "types.h" -#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 - -#endif /*__INT_CVIMGPROC_H__*/ diff --git a/src/c/imageProcessing/interfaces/int_cvimgproc.hpp b/src/c/imageProcessing/interfaces/int_cvimgproc.hpp new file mode 100644 index 0000000..65fa77e --- /dev/null +++ b/src/c/imageProcessing/interfaces/int_cvimgproc.hpp @@ -0,0 +1,24 @@ +/* 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 +*/ + +#ifndef __INT_CVIMGPROC_H__ +#define __INT_CVIMGPROC_H__ + +#include "types.h" +#include "opencv2/core/core.hpp" +#include "opencv2/imgproc/imgproc.hpp" + +#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__*/ -- cgit