[openrtm-commit:01346] r118 - in branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline: . cmake doc idl include/Hough src
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 3月 14日 (金) 16:19:56 JST
Author: kawauchi
Date: 2014-03-14 16:19:56 +0900 (Fri, 14 Mar 2014)
New Revision: 118
Modified:
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/CMakeLists.txt
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/README.Hough
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/RTC.xml
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/CMakeLists.txt
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/cpack_options.cmake.in
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/wix.xsl.in
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/doc/CMakeLists.txt
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/idl/CMakeLists.txt
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/include/Hough/CMakeLists.txt
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/include/Hough/Hough.h
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/src/CMakeLists.txt
branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/src/Hough.cpp
Log:
Houghline : Adjusted cmake files for the package and fixed RTC.xml. refs #2704
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/CMakeLists.txt 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/CMakeLists.txt 2014-03-14 07:19:56 UTC (rev 118)
@@ -4,21 +4,26 @@
project(Hough)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
-set(PROJECT_VERSION 1.0.0 CACHE STRING "Hough version")
+set(PROJECT_VERSION 1.1.0 CACHE STRING "Hough version")
DISSECT_VERSION()
set(PROJECT_DESCRIPTION "Hough line component")
set(PROJECT_VENDOR "AIST")
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
+set(LINUX_PACKAGE_GENERATOR "DEB")
+#set(LINUX_PACKAGE_GENERATOR "RPM")
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" ON)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -38,12 +43,19 @@
# Set up installation directories
-set(BIN_INSTALL_DIR "components/bin")
-set(LIB_INSTALL_DIR "components/lib")
-set(INC_INSTALL_DIR
- "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-set(SHARE_INSTALL_DIR
- "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
# Get necessary dependency information
find_package(OpenRTM)
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/README.Hough
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/README.Hough 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/README.Hough 2014-03-14 07:19:56 UTC (rev 118)
@@ -7,7 +7,7 @@
This file is generated by rtc-template with the following argments.
# rtc-template -bcxx --module-name=Hough
-# --module-desc='Hough line component' --module-version=1.0.0 --module-vendor=AIST
+# --module-desc='Hough line component' --module-version=1.1.0 --module-vendor=AIST
# --module-category=Category --module-comp-type=STATIC
# --module-act-type=PERIODIC --module-max-inst=1
# --config=canny_thresld1:int:100 --config=canny_thresld2:int:100 --config=hough_method:string:PROBABILISTIC --config=hough_thresld:int:50 --config=hough_param1:double:50 --config=hough_param2:double:10 --config=line_color_R:int:255 --config=line_color_G:int:0 --config=line_color_B:int:0 --config=line_thickness:int:2 --config=line_type:string:8
@@ -20,7 +20,7 @@
# <rtc-template block="module">
Module Name: Hough
Description: Hough line component
-Version: 1.0.0
+Version: 1.1.0
Vendor: AIST
Category: Category
Kind: DataFlowComponent
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/RTC.xml
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/RTC.xml 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/RTC.xml 2014-03-14 07:19:56 UTC (rev 118)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<rtc:RtcProfile rtc:version="0.2" rtc:id="RTC:AIST:Category:Hough:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtcExt:saveProject="Houghline" rtc:updateDate="2013-11-21T12:45:44+09:00" rtc:creationDate="2013-11-20T13:45:21+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1000.0" rtc:description="Hough line component" rtc:category="Category" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Hough"/>
+<rtc:RtcProfile rtc:version="0.2" rtc:id="RTC:AIST:Category:Hough:1.1.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtcExt:saveProject="Houghline" rtc:updateDate="2013-11-21T12:45:44+09:00" rtc:creationDate="2013-11-20T13:45:21+09:00" rtc:version="1.1.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1000.0" rtc:description="Hough line component" rtc:category="Category" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Hough"/>
<rtc:Actions>
<rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="true"/>
<rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/CMakeLists.txt 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/CMakeLists.txt 2014-03-14 07:19:56 UTC (rev 118)
@@ -2,8 +2,8 @@
set(PKG_LIBS -l${PROJECT_NAME_LOWER})
set(pkg_conf_file ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME_LOWER}.pc)
configure_file(${PROJECT_NAME_LOWER}.pc.in ${pkg_conf_file} @ONLY)
-install(FILES ${pkg_conf_file}
- DESTINATION ${LIB_INSTALL_DIR}/pkgconfig/ COMPONENT component)
+#install(FILES ${pkg_conf_file}
+# DESTINATION ${LIB_INSTALL_DIR}/pkgconfig/ COMPONENT component)
# Install CMake modules
set(cmake_config ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake)
@@ -14,5 +14,5 @@
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake.in
${cmake_version_config} @ONLY)
set(cmake_mods ${cmake_config} ${cmake_version_config})
-install(FILES ${cmake_mods} DESTINATION ${SHARE_INSTALL_DIR} COMPONENT library)
+#install(FILES ${cmake_mods} DESTINATION ${SHARE_INSTALL_DIR} COMPONENT library)
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/cpack_options.cmake.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/cpack_options.cmake.in 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/cpack_options.cmake.in 2014-03-14 07:19:56 UTC (rev 118)
@@ -68,9 +68,9 @@
#
#
#
- set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
- set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
- set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,5 +90,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/wix.xsl.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/wix.xsl.in 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/cmake/wix.xsl.in 2014-03-14 07:19:56 UTC (rev 118)
@@ -6,7 +6,7 @@
<xsl:template match="/wix:Wix">
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Product xmlns="http://schemas.microsoft.com/wix/2006/wi" Id="C41F309B-DC6B-4284-9C90-64127A5D18C7" Name="@CPACK_PACKAGE_NAME@ @CPACK_PACKAGE_VERSION@" Language="1041" Codepage="932" Version="@CPACK_PACKAGE_VERSION@" Manufacturer="@CPACK_PACKAGE_VENDOR@" UpgradeCode="15631B34-B7B3-4F95-86D4-28EBD72293AF">
+ <Product xmlns="http://schemas.microsoft.com/wix/2006/wi" Id="B0AF8FC1-CA7D-4094-BFF6-F17E3D40E609" Name="@CPACK_PACKAGE_NAME@ @CPACK_PACKAGE_VERSION@" Language="1041" Codepage="932" Version="@CPACK_PACKAGE_VERSION@" Manufacturer="@CPACK_PACKAGE_VENDOR@" UpgradeCode="01805FEB-40B6-460B-95F8-D6756861382D">
<Package InstallerVersion="300" Compressed="yes" Languages='1041' SummaryCodepage='932' />
<Media Id="1" Cabinet="@CPACK_PACKAGE_NAME at .cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir" >
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/doc/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/doc/CMakeLists.txt 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/doc/CMakeLists.txt 2014-03-14 07:19:56 UTC (rev 118)
@@ -19,7 +19,7 @@
# Doxygen part
set(doxyfile "${CMAKE_CURRENT_BINARY_DIR}/doxyfile")
configure_file(doxyfile.in ${doxyfile})
- add_custom_target(doxygen_doc ${DOXYGEN_EXECUTABLE} ${doxyfile})
+ add_custom_target(${PROJECT_NAME}_doxygen_doc ${DOXYGEN_EXECUTABLE} ${doxyfile})
# Sphinx part
#set(conf_dir "${CMAKE_CURRENT_BINARY_DIR}/conf")
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/idl/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/idl/CMakeLists.txt 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/idl/CMakeLists.txt 2014-03-14 07:19:56 UTC (rev 118)
@@ -1,7 +1,7 @@
set(idls )
-install(FILES ${idls} DESTINATION ${INC_INSTALL_DIR}/idl
- COMPONENT idl)
+#install(FILES ${idls} DESTINATION ${INC_INSTALL_DIR}/idl
+# COMPONENT idl)
macro(_IDL_OUTPUTS _idl _dir _result)
set(${_result} ${_dir}/${_idl}SK.cc ${_dir}/${_idl}.hh
@@ -49,8 +49,8 @@
OPENRTM_COMPILE_IDL_FILES(${idls})
set(ALL_IDL_SRCS ${ALL_IDL_SRCS} PARENT_SCOPE)
-FILTER_LIST("${ALL_IDL_SRCS}" "hh$" idl_headers)
-install(FILES ${idl_headers}
- DESTINATION ${INC_INSTALL_DIR}/${PROJECT_NAME_LOWER}/idl
- COMPONENT headers)
+FILTER_LIST("${ALL_IDL_SRCS}" "hh$" idl_headers)
+#install(FILES ${idl_headers}
+# DESTINATION ${INC_INSTALL_DIR}/${PROJECT_NAME_LOWER}/idl
+# COMPONENT headers)
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/include/Hough/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/include/Hough/CMakeLists.txt 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/include/Hough/CMakeLists.txt 2014-03-14 07:19:56 UTC (rev 118)
@@ -1,7 +1,7 @@
set(hdrs Hough.h
- PARENT_SCOPE
+# PARENT_SCOPE
)
-install(FILES ${hdrs} DESTINATION ${INC_INSTALL_DIR}/${PROJECT_NAME_LOWER}
- COMPONENT library)
+#install(FILES ${hdrs} DESTINATION ${INC_INSTALL_DIR}/${PROJECT_NAME_LOWER}
+# COMPONENT library)
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/include/Hough/Hough.h
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/include/Hough/Hough.h 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/include/Hough/Hough.h 2014-03-14 07:19:56 UTC (rev 118)
@@ -25,15 +25,15 @@
#include <cxcore.h>
#include <highgui.h>
-// cvCanny用定数
-#define APERTURE_SIZE 3 // Sobelオペレータのサイズ (リファレンス参照)
+/* cvCanny用定数 */
+#define APERTURE_SIZE 3 /* Sobelオペレータのサイズ (リファレンス参照) */
-// cvHoughLines2用定数
-#define RHO 1 // パラメータ空間におけるρ軸の分解能(ピクセル単位)
-#define THETA ( CV_PI / 180 ) // パラメータ空間におけるθ軸の分解能(ラジアン単位)
+/* cvHoughLines2用定数 */
+#define RHO 1 /* パラメータ空間におけるρ軸の分解能(ピクセル単位) */
+#define THETA ( CV_PI / 180 ) /* パラメータ空間におけるθ軸の分解能(ラジアン単位) */
-// cvLine用定数
-#define SHIFT 0 // 座標の小数点以下の桁を表すビット数
+/* cvLine用定数 */
+#define SHIFT 0 /* 座標の小数点以下の桁を表すビット数 */
// Service implementation headers
// <rtc-template block="service_impl_h">
@@ -98,15 +98,15 @@
// virtual RTC::ReturnCode_t onFinalize();
/***
- *m_image_hough
+ *
* The startup action when ExecutionContext startup
* former rtc_starting_entry()
*
* @param ec_id target ExecutionContext Id
*
* @return RTC::ReturnCode_t
- * #include <fstream>
*
+ *
*/
// virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
@@ -178,7 +178,7 @@
/***
*
* The error action in ERROR state
- * former rtc_error_do()#include <fstream>
+ * former rtc_error_do()
*
* @param ec_id target ExecutionContext Id
*
@@ -358,11 +358,11 @@
int len;
CvSeq *lines;
- int debug_method; // configuration切り替え時の確認用
- int debug_type; // configuration切り替え時の確認用
+ int debug_method; /* configuration切り替え時の確認用 */
+ int debug_type; /* configuration切り替え時の確認用 */
- int m_in_height; // 入力イメージのHeight
- int m_in_width; // 入力イメージのWidth
+ int m_in_height; /* 入力イメージのHeight */
+ int m_in_width; /* 入力イメージのWidth */
};
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/src/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/src/CMakeLists.txt 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/src/CMakeLists.txt 2014-03-14 07:19:56 UTC (rev 118)
@@ -49,15 +49,21 @@
${comp_srcs} ${comp_headers} ${ALL_IDL_SRCS})
target_link_libraries(${PROJECT_NAME}Comp ${OPENRTM_LIBRARIES} ${OpenCV_LIBS})
+#install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}Comp
+# EXPORT ${PROJECT_NAME}
+# RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT component
+# LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT component
+# ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT component)
+#install(EXPORT ${PROJECT_NAME}
+# DESTINATION ${LIB_INSTALL_DIR}/${PROJECT_NAME}
+# FILE ${PROJECT_NAME}Depends.cmake)
install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}Comp
EXPORT ${PROJECT_NAME}
- RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT component
- LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT component
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT component)
-install(EXPORT ${PROJECT_NAME}
- DESTINATION ${LIB_INSTALL_DIR}/${PROJECT_NAME}
- FILE ${PROJECT_NAME}Depends.cmake)
-
+ RUNTIME DESTINATION ${INSTALL_PREFIX} COMPONENT component
+ LIBRARY DESTINATION ${INSTALL_PREFIX} COMPONENT component
+ ARCHIVE DESTINATION ${INSTALL_PREFIX} COMPONENT component)
+
+
if (SolutionDir)
if (MSVC)
add_custom_command(
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/src/Hough.cpp
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/src/Hough.cpp 2014-03-14 07:10:36 UTC (rev 117)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/Houghline/src/Hough.cpp 2014-03-14 07:19:56 UTC (rev 118)
@@ -16,7 +16,7 @@
"implementation_id", "Hough",
"type_name", "Hough",
"description", "Hough line component",
- "version", "1.0.0",
+ "version", "1.1.0",
"vendor", "AIST",
"category", "Category",
"activity_type", "PERIODIC",
@@ -141,7 +141,7 @@
RTC::ReturnCode_t Hough::onActivated(RTC::UniqueId ec_id)
{
- // イメージ用メモリの初期化
+ /* イメージ用メモリの初期化 */
imageBuff = NULL;
grayImage = NULL;
edgeImage = NULL;
@@ -164,7 +164,7 @@
{
if(imageBuff != NULL)
{
- // イメージ用メモリの解放
+ /* イメージ用メモリの解放 */
cvReleaseImage(&imageBuff);
cvReleaseImage(&grayImage);
cvReleaseImage(&edgeImage);
@@ -178,19 +178,19 @@
RTC::ReturnCode_t Hough::onExecute(RTC::UniqueId ec_id)
{
- // 新しいデータのチェック
+ /* 新しいデータのチェック */
if(m_image_origIn.isNew())
{
- // InPortデータの読み込み
+ /* InPortデータの読み込み */
m_image_origIn.read();
- // サイズが変わったときだけ再生成する
+ /* サイズが変わったときだけ再生成する */
if(m_image_orig.width != m_in_width || m_image_orig.height != m_in_height)
{
m_in_width = m_image_orig.width;
m_in_height = m_image_orig.height;
- // InPortのイメージサイズが変更された場合
+ /* InPortのイメージサイズが変更された場合 */
if(imageBuff != NULL)
{
cvReleaseImage(&imageBuff);
@@ -200,7 +200,7 @@
cvReleaseImage(&houghImage);
}
- // イメージ用メモリの確保
+ /* イメージ用メモリの確保 */
imageBuff = cvCreateImage( cvSize(m_in_width, m_in_height), IPL_DEPTH_8U, 3 );
grayImage = cvCreateImage( cvSize(m_in_width, m_in_height), IPL_DEPTH_8U, 1 );
edgeImage = cvCreateImage( cvSize(m_in_width, m_in_height), IPL_DEPTH_8U, 1 );
@@ -208,36 +208,36 @@
houghImage = cvCreateImage( cvSize(m_in_width, m_in_height), IPL_DEPTH_8U, 3 );
}
- // InPortの画面データをコピー
+ /* InPortの画面データをコピー */
memcpy( imageBuff->imageData, (void *)&(m_image_orig.pixels[0]), m_image_orig.pixels.length() );
- // RGBからグレースケールに変換
+ /* RGBからグレースケールに変換 */
cvCvtColor( imageBuff, grayImage, CV_RGB2GRAY );
- // ハフ変換に必要なメモリ領域
+ /* ハフ変換に必要なメモリ領域 */
CvMemStorage *storage = cvCreateMemStorage( 0 );
- //エッジ抽出を行う
+ /* エッジ抽出を行う */
cvCanny( grayImage, edgeImage, m_canny_threshold1, m_canny_threshold2, APERTURE_SIZE );
- //グレースケールからRGBに変換する
+ /* グレースケールからRGBに変換する */
cvCvtColor( edgeImage, houghImage, CV_GRAY2RGB );
- //ハフ変換により直線の抽出を行う
+ /* ハフ変換により直線の抽出を行う */
int hough_method;
if ( m_hough_method == "PROBABILISTIC" )
{
- //確率的ハフ変換
+ /* 確率的ハフ変換 */
hough_method = CV_HOUGH_PROBABILISTIC;
}
else if ( m_hough_method == "STANDARD" )
{
- //標準的ハフ変換
+ /* 標準的ハフ変換 */
hough_method = CV_HOUGH_STANDARD;
}
else
{
- //マルチスケール型の古典的ハフ変換
+ /* マルチスケール型の古典的ハフ変換 */
hough_method = CV_HOUGH_MULTI_SCALE;
}
if ( hough_method != debug_method )
@@ -247,7 +247,7 @@
}
lines = cvHoughLines2( edgeImage, storage, hough_method, RHO, THETA, m_hough_threshold, m_hough_param1, m_hough_param2 );
- //抽出された直線を描く
+ /* 抽出された直線を描く */
int line_type;
if ( m_line_type == "CV_AA" )
{
@@ -267,19 +267,19 @@
cvLine( houghImage, line[0], line[1], CV_RGB( m_line_color_R, m_line_color_G, m_line_color_B ), m_line_thickness, line_type, SHIFT );
}
- // 画像データのサイズ取得
+ /* 画像データのサイズ取得 */
len = houghImage->nChannels * houghImage->width * houghImage->height;
m_image_hough.pixels.length(len);
m_image_hough.width = houghImage->width;
m_image_hough.height = houghImage->height;
- // 反転した画像データをOutPortにコピー
+ /* 反転した画像データをOutPortにコピー */
memcpy( (void *)&(m_image_hough.pixels[0]), houghImage->imageData, len );
- // 反転した画像データをOutPortから出力
+ /* 反転した画像データをOutPortから出力 */
m_image_houghOut.write();
- // ハフ変換に使用したメモリ解放
+ /* ハフ変換に使用したメモリ解放 */
cvReleaseMemStorage(&storage);
}
More information about the openrtm-commit
mailing list