diff options
Diffstat (limited to '2.3-1/src/c/imageProcessing/cvimgproc/imcvCornerHarris.cpp')
-rw-r--r-- | 2.3-1/src/c/imageProcessing/cvimgproc/imcvCornerHarris.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/2.3-1/src/c/imageProcessing/cvimgproc/imcvCornerHarris.cpp b/2.3-1/src/c/imageProcessing/cvimgproc/imcvCornerHarris.cpp new file mode 100644 index 00000000..d6df1cc6 --- /dev/null +++ b/2.3-1/src/c/imageProcessing/cvimgproc/imcvCornerHarris.cpp @@ -0,0 +1,55 @@ +/* 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 find edges using Harris algorithm*/ + +#include "types.h" +#include "cvcore.hpp" +#include "cvimgproc.hpp" + + +using namespace cv; + +Mat imcvCornerHarris(Mat src, double blocksize, double ksize, double k, \ + char* border_type) +{ + + Mat dst(src.rows, src.cols, CV_32FC1); + + if(strcmp(border_type,"BORDER_REPLICATE") == 0) + { + cornerHarris(src,dst,blocksize,ksize,k,BORDER_REPLICATE); + } + else if(strcmp(border_type,"BORDER_REFLECT")) + { + cornerHarris(src,dst,blocksize,ksize,k,BORDER_REFLECT); + } + else if(strcmp(border_type,"BORDER_REFLECT_101")) + { + cornerHarris(src,dst,blocksize,ksize,k,BORDER_REFLECT_101); + } + else if(strcmp(border_type,"BORDER_WRAP")) + { + cornerHarris(src,dst,blocksize,ksize,k,BORDER_WRAP); + } + else if(strcmp(border_type,"BORDER_CONSTANT")) + { + cornerHarris(src,dst,blocksize,ksize,k,BORDER_CONSTANT); + } + else if(strcmp(border_type,"BORDER_DEFAULT")) + { + cornerHarris(src,dst,blocksize,ksize,k,BORDER_DEFAULT); + } + + + return dst; +}
\ No newline at end of file |