diff options
Diffstat (limited to 'src/c/imageProcessing')
-rw-r--r-- | src/c/imageProcessing/cvcore/imcvCreateImages.c | 39 | ||||
-rw-r--r-- | src/c/imageProcessing/cvhighgui/imcvLoadImages.c | 23 | ||||
-rw-r--r-- | src/c/imageProcessing/cvhighgui/imcvShowImages.c | 25 | ||||
-rw-r--r-- | src/c/imageProcessing/includes/core.h | 11 | ||||
-rw-r--r-- | src/c/imageProcessing/includes/cvcore.h | 30 | ||||
-rw-r--r-- | src/c/imageProcessing/includes/cvhighgui.h | 32 | ||||
-rw-r--r-- | src/c/imageProcessing/includes/temp.h | 11 | ||||
-rw-r--r-- | src/c/imageProcessing/interfaces/int_cvcore.h | 31 | ||||
-rw-r--r-- | src/c/imageProcessing/interfaces/int_cvhighgui.h | 34 |
9 files changed, 236 insertions, 0 deletions
diff --git a/src/c/imageProcessing/cvcore/imcvCreateImages.c b/src/c/imageProcessing/cvcore/imcvCreateImages.c new file mode 100644 index 00000000..a7eeaec2 --- /dev/null +++ b/src/c/imageProcessing/cvcore/imcvCreateImages.c @@ -0,0 +1,39 @@ +/* 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/src/c/imageProcessing/cvhighgui/imcvLoadImages.c b/src/c/imageProcessing/cvhighgui/imcvLoadImages.c new file mode 100644 index 00000000..7c843f94 --- /dev/null +++ b/src/c/imageProcessing/cvhighgui/imcvLoadImages.c @@ -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.h" +#include "cvhighgui.h" +#include <stdio.h> + +IplImage* imcvLoadImages(char *filename, uint8 opentype) +{ + return (cvLoadImage(filename,opentype)); +}
\ No newline at end of file diff --git a/src/c/imageProcessing/cvhighgui/imcvShowImages.c b/src/c/imageProcessing/cvhighgui/imcvShowImages.c new file mode 100644 index 00000000..82ae3ee3 --- /dev/null +++ b/src/c/imageProcessing/cvhighgui/imcvShowImages.c @@ -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 +*/ + +/* Function to create show an image */ + +#include "types.h" +#include "cvcore.h" +#include "cvhighgui.h" +#include <stdio.h> + +uint8 imcvShowImages(char *winname, IplImage* img) +{ + cvShowImage(winname,img); + + return (0); +}
\ No newline at end of file diff --git a/src/c/imageProcessing/includes/core.h b/src/c/imageProcessing/includes/core.h new file mode 100644 index 00000000..1e4c83cb --- /dev/null +++ b/src/c/imageProcessing/includes/core.h @@ -0,0 +1,11 @@ + /* 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 new file mode 100644 index 00000000..317d99b6 --- /dev/null +++ b/src/c/imageProcessing/includes/cvcore.h @@ -0,0 +1,30 @@ +/* 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); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__CVCORE_H__*/ diff --git a/src/c/imageProcessing/includes/cvhighgui.h b/src/c/imageProcessing/includes/cvhighgui.h new file mode 100644 index 00000000..cae3dd1b --- /dev/null +++ b/src/c/imageProcessing/includes/cvhighgui.h @@ -0,0 +1,32 @@ +/* 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.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/temp.h b/src/c/imageProcessing/includes/temp.h new file mode 100644 index 00000000..1e4c83cb --- /dev/null +++ b/src/c/imageProcessing/includes/temp.h @@ -0,0 +1,11 @@ + /* 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 new file mode 100644 index 00000000..9d83caac --- /dev/null +++ b/src/c/imageProcessing/interfaces/int_cvcore.h @@ -0,0 +1,31 @@ +/* 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" + + +#define d0d0g2d0CV_CreateImageim0(width,height,depth,depth_size,no_of_ch) \ + imcvCreateImages(width,height,depth,no_of_ch) + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_CVCORE_H__*/ diff --git a/src/c/imageProcessing/interfaces/int_cvhighgui.h b/src/c/imageProcessing/interfaces/int_cvhighgui.h new file mode 100644 index 00000000..f08ac40b --- /dev/null +++ b/src/c/imageProcessing/interfaces/int_cvhighgui.h @@ -0,0 +1,34 @@ +/* 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.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__*/ |