[Jderobot-admin] jderobot-r1128 - trunk/src/stable/libs/visionlib/imgAnalyze
eperdices en jderobot.org
eperdices en jderobot.org
Lun Dic 9 20:55:31 CET 2013
Author: eperdices
Date: 2013-12-09 20:55:31 +0100 (Mon, 09 Dec 2013)
New Revision: 1128
Modified:
trunk/src/stable/libs/visionlib/imgAnalyze/linesDetection.cpp
trunk/src/stable/libs/visionlib/imgAnalyze/linesDetection.h
Log:
Kernel size parameter added to solis algorithm
Modified: trunk/src/stable/libs/visionlib/imgAnalyze/linesDetection.cpp
===================================================================
--- trunk/src/stable/libs/visionlib/imgAnalyze/linesDetection.cpp 2013-12-09 14:28:41 UTC (rev 1127)
+++ trunk/src/stable/libs/visionlib/imgAnalyze/linesDetection.cpp 2013-12-09 19:55:31 UTC (rev 1128)
@@ -40,7 +40,7 @@
{4,4,4,3,3,3,3,3,2,2,2}
};
- void linesDetection::solisAlgorithm (cv::Mat &image, std::vector<Segment2D> *segments) {
+ void linesDetection::solisAlgorithm (cv::Mat &image, std::vector<Segment2D> *segments, int ksize) {
cv::Mat imgTmp1,imgTmp2,imgBlack,imgLaplace;
CvPoint pstart, pend;
int i, i_jump = 6;
@@ -70,10 +70,10 @@
cv::normalize(imgTmp1, imgTmp1, 0, 255, CV_MINMAX);
// Make a average filtering
- cv::blur(imgTmp1,imgTmp2,cv::Size(3,3));
+ cv::blur(imgTmp1,imgTmp2,cv::Size(ksize,ksize));
//Laplace
- cv::Laplacian(imgTmp2, imgLaplace, CV_16S, 3);
+ cv::Laplacian(imgTmp2, imgLaplace, CV_16S, ksize);
cv::convertScaleAbs(imgLaplace,imgTmp1);
/*Perform a binary threshold*/
Modified: trunk/src/stable/libs/visionlib/imgAnalyze/linesDetection.h
===================================================================
--- trunk/src/stable/libs/visionlib/imgAnalyze/linesDetection.h 2013-12-09 14:28:41 UTC (rev 1127)
+++ trunk/src/stable/libs/visionlib/imgAnalyze/linesDetection.h 2013-12-09 19:55:31 UTC (rev 1128)
@@ -37,7 +37,7 @@
namespace visionLibrary {
class linesDetection {
public:
- static void solisAlgorithm (cv::Mat &image, std::vector<Segment2D> *segments);
+ static void solisAlgorithm (cv::Mat &image, std::vector<Segment2D> *segments, int ksize=3);
private:
static const int solis_cases[][11];
More information about the Jderobot-admin
mailing list