diff options
Diffstat (limited to 'src/c/imageProcessing/cvimgproc')
-rw-r--r-- | src/c/imageProcessing/cvimgproc/imcvCvtColors.c | 27 | ||||
-rw-r--r-- | src/c/imageProcessing/cvimgproc/imcvThresholds.c | 27 |
2 files changed, 54 insertions, 0 deletions
diff --git a/src/c/imageProcessing/cvimgproc/imcvCvtColors.c b/src/c/imageProcessing/cvimgproc/imcvCvtColors.c new file mode 100644 index 0000000..bc2a70e --- /dev/null +++ b/src/c/imageProcessing/cvimgproc/imcvCvtColors.c @@ -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.h" +#include "cvimgproc.h" +#include <stdio.h> + +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/imcvThresholds.c b/src/c/imageProcessing/cvimgproc/imcvThresholds.c new file mode 100644 index 0000000..cd66c52 --- /dev/null +++ b/src/c/imageProcessing/cvimgproc/imcvThresholds.c @@ -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 threshold a gray scale image*/ + +#include "types.h" +#include "cvcore.h" +#include "cvimgproc.h" +#include <stdio.h> + +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 |