[openrtm-commit:01127] r97 - in branches/newCMakeForVC2010/ImageProcessing/opencv/components/Findcontour: include/Findcontour src
openrtm @ openrtm.org
openrtm @ openrtm.org
2013年 9月 9日 (月) 15:21:46 JST
Author: kawauchi
Date: 2013-09-09 15:21:46 +0900 (Mon, 09 Sep 2013)
New Revision: 97
Modified:
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Findcontour/include/Findcontour/Findcontour.h
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Findcontour/src/Findcontour.cpp
Log:
Findcontour component has been changed for specify in the configuration threshold. refs #2704
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Findcontour/include/Findcontour/Findcontour.h
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Findcontour/include/Findcontour/Findcontour.h 2013-09-09 05:18:22 UTC (rev 96)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Findcontour/include/Findcontour/Findcontour.h 2013-09-09 06:21:46 UTC (rev 97)
@@ -24,11 +24,6 @@
#include <cxcore.h>
#include <highgui.h>
-#if (defined WIN32) || (defined WIN64)
-#define THRESHOLD 10 // 2l»ÌÛÌèl
-#else
-#define THRESHOLD 25 // 2l»ÌÛÌèl
-#endif
#define THRESHOLD_MAX_VALUE 255 // 2l»ÌÛÉgp·éÅål
#define CONTOUR_MAX_LEVEL 1 // `æ³êéÖsÌÅåx
@@ -239,7 +234,7 @@
// Configuration variable declaration
// <rtc-template block="config_declare">
-
+ int m_nThresholdLv;
// </rtc-template>
// DataInPort declaration
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Findcontour/src/Findcontour.cpp
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Findcontour/src/Findcontour.cpp 2013-09-09 05:18:22 UTC (rev 96)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Findcontour/src/Findcontour.cpp 2013-09-09 06:21:46 UTC (rev 97)
@@ -26,6 +26,12 @@
"max_instance", "1",
"language", "C++",
"lang_type", "compile",
+ // Configuration variables
+ "conf.default.threshold_level", "10",
+ // Widget
+ "conf.__widget__.threshold_level", "slider.1",
+ // Constraints
+ "conf.__constraints__.threshold_level", "0<=x<=255",
""
};
// </rtc-template>
@@ -72,6 +78,7 @@
// </rtc-template>
// <rtc-template block="bind_config">
+ bindParameter("threshold_level", m_nThresholdLv, "10");
// </rtc-template>
return RTC::RTC_OK;
@@ -170,7 +177,7 @@
cvCvtColor( imageBuff, grayImage, CV_RGB2GRAY);
// O[XP[©ç2lÉÏ··é
- cvThreshold( grayImage, binaryImage, THRESHOLD, THRESHOLD_MAX_VALUE, CV_THRESH_BINARY );
+ cvThreshold( grayImage, binaryImage, m_nThresholdLv, THRESHOLD_MAX_VALUE, CV_THRESH_BINARY );
// o³ê½ÖsðÛ¶·éÌæ
CvMemStorage* storage = cvCreateMemStorage( 0 );
More information about the openrtm-commit
mailing list