[openrtm-commit:01372] r130 - in branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage: . cmake doc doc/content idl include/SubStractCaptureImage src

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 3月 17日 (月) 17:36:10 JST


Author: kawauchi
Date: 2014-03-17 17:36:10 +0900 (Mon, 17 Mar 2014)
New Revision: 130

Removed:
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/RTC.xml20130613093108
Modified:
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/README.SubStractCaptureImage
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/RTC.xml
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/SubStractCaptureImage.conf
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/cpack_options.cmake.in
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/wix.xsl.in
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/content/index.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/content/index_j.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/idl/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/include/SubStractCaptureImage/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/include/SubStractCaptureImage/SubStractCaptureImage.h
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/src/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/src/SubStractCaptureImage.cpp
Log:
SubStractCaptureImage : Adjusted cmake files for the package, fixed RTC.xml, converted to the UTF-8 character code and delete unused config. refs #2704

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,110 +1,122 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
 cmake_policy(SET CMP0002 OLD)
+
+project(SubStractCaptureImage)
+string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
+include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
+set(PROJECT_VERSION 1.1.0 CACHE STRING "SubStractCaptureImage version")
+DISSECT_VERSION()
+set(PROJECT_DESCRIPTION "SubStractCaptureImage 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")
 
-project(SubStractCaptureImage)
-string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
-include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
-set(PROJECT_VERSION 1.0.0 CACHE STRING "SubStractCaptureImage version")
-DISSECT_VERSION()
-set(PROJECT_DESCRIPTION "SubStractCaptureImage component")
-set(PROJECT_VENDOR "AIST")
-set(PROJECT_AUTHOR "AIST")
-set(PROJECT_AUTHOR_SHORT "AIST")
-
-# Add an "uninstall" target
-CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
-    "${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
+# 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 (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
-    "${PROJECT_BINARY_DIR}/uninstall_target.cmake")
+    "${PROJECT_BINARY_DIR}/uninstall_target.cmake")
+
+#option(BUILD_EXAMPLES "Build and install examples" OFF)
+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)
+option(BUILD_SOURCES "Build and install sources" OFF)
+
+option(STATIC_LIBS "Build static libraries" OFF)
+if(STATIC_LIBS)
+    set(LIB_TYPE STATIC)
+else(STATIC_LIBS)
+    set(LIB_TYPE SHARED)
+endif(STATIC_LIBS)
+
+if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+   # Mac OS X specific code
+   SET(CMAKE_CXX_COMPILER "g++")
+endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+
+
+# Set up installation directories
+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)
 
-#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" ON)
-#option(BUILD_TESTS "Build the tests" OFF)
-#option(BUILD_TOOLS "Build the tools" OFF)
-option(BUILD_IDL "Build and install idl" ON)
-option(BUILD_SOURCES "Build and install sources" OFF)
-
-option(STATIC_LIBS "Build static libraries" OFF)
-if(STATIC_LIBS)
-    set(LIB_TYPE STATIC)
-else(STATIC_LIBS)
-    set(LIB_TYPE SHARED)
-endif(STATIC_LIBS)
-
-if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-   # Mac OS X specific code
-   SET(CMAKE_CXX_COMPILER "g++")
-endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-
-
-# 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}")
-
-# Get necessary dependency information
-find_package(OpenRTM)
-if(${OpenRTM_FOUND})
-  MESSAGE(STATUS "OpenRTM configuration Found")
-else(${OpenRTM_FOUND})
-  message(STATUS "Use cmake/Modules/FindOpenRTM.cmake in the project")
-  list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
-  find_package(OpenRTM REQUIRED)
-endif(${OpenRTM_FOUND})
-
-# Universal settings
-#enable_testing()
-
-# Subdirectories
-add_subdirectory(cmake)
-if(BUILD_DOCUMENTATION)
-    add_subdirectory(doc)
-endif(BUILD_DOCUMENTATION)
-
-#if(BUILD_EXAMPLES)
-#    add_subdirectory(examples)
-#endif(BUILD_EXAMPLES)
-
-if(BUILD_IDL)
-    add_subdirectory(idl)
-endif(BUILD_IDL)
-
-add_subdirectory(include)
-MAP_ADD_STR(headers  "include/" comp_hdrs)
-add_subdirectory(src)
-
-#if(BUILD_TESTS)
-#    add_subdirectory(test)
-#endif(BUILD_TESTS)
-
-#if(BUILD_TOOLS)
-#    add_subdirectory(tools)
-#endif(BUILD_TOOLS)
-
-if(BUILD_SOURCES)
-    add_subdirectory(include)
-    add_subdirectory(src)
-endif(BUILD_SOURCES)
-
-# Package creation
-# By default, do not warn when built on machines using only VS Express:
-IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
-SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
-ENDIF()
-include(InstallRequiredSystemLibraries)
-set(PROJECT_EXECUTABLES ${PROJECT_NAME_LOWER}Comp
-    "${PROJECT_NAME_LOWER}Comp")
-
-set(cpack_options "${PROJECT_BINARY_DIR}/cpack_options.cmake")
-
-configure_file("${PROJECT_SOURCE_DIR}/cmake/cpack_options.cmake.in"
-    ${cpack_options} @ONLY)
-
-set(CPACK_PROJECT_CONFIG_FILE ${cpack_options})
-include(${CPACK_PROJECT_CONFIG_FILE})
-include(CPack)
-
-
+#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)
+if(${OpenRTM_FOUND})
+  MESSAGE(STATUS "OpenRTM configuration Found")
+else(${OpenRTM_FOUND})
+  message(STATUS "Use cmake/Modules/FindOpenRTM.cmake in the project")
+  list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
+  find_package(OpenRTM REQUIRED)
+endif(${OpenRTM_FOUND})
+
+# Universal settings
+#enable_testing()
+
+# Subdirectories
+add_subdirectory(cmake)
+if(BUILD_DOCUMENTATION)
+    add_subdirectory(doc)
+endif(BUILD_DOCUMENTATION)
+
+#if(BUILD_EXAMPLES)
+#    add_subdirectory(examples)
+#endif(BUILD_EXAMPLES)
+
+if(BUILD_IDL)
+    add_subdirectory(idl)
+endif(BUILD_IDL)
+
+add_subdirectory(include)
+MAP_ADD_STR(headers  "include/" comp_hdrs)
+add_subdirectory(src)
+
+#if(BUILD_TESTS)
+#    add_subdirectory(test)
+#endif(BUILD_TESTS)
+
+#if(BUILD_TOOLS)
+#    add_subdirectory(tools)
+#endif(BUILD_TOOLS)
+
+if(BUILD_SOURCES)
+    add_subdirectory(include)
+    add_subdirectory(src)
+endif(BUILD_SOURCES)
+
+# Package creation
+# By default, do not warn when built on machines using only VS Express:
+IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+ENDIF()
+include(InstallRequiredSystemLibraries)
+set(PROJECT_EXECUTABLES ${PROJECT_NAME_LOWER}Comp
+    "${PROJECT_NAME_LOWER}Comp")
+
+set(cpack_options "${PROJECT_BINARY_DIR}/cpack_options.cmake")
+
+configure_file("${PROJECT_SOURCE_DIR}/cmake/cpack_options.cmake.in"
+    ${cpack_options} @ONLY)
+
+set(CPACK_PROJECT_CONFIG_FILE ${cpack_options})
+include(${CPACK_PROJECT_CONFIG_FILE})
+include(CPack)
+
+

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/README.SubStractCaptureImage
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/README.SubStractCaptureImage	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/README.SubStractCaptureImage	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,232 +1,206 @@
-======================================================================
-  RTComponent: SubStractCaptureImage specificatioin
-
-  OpenRTM-aist-1.0.0
-  Date: $Date$
-
-  This file is generated by rtc-template with the following argments.
-
-#   rtc-template -bcxx --module-name=SubStractCaptureImage 
-#   --module-desc='SubStractCaptureImage component' --module-version=1.0.0 --module-vendor=AIST 
-#   --module-category=Category --module-comp-type=STATIC 
-#   --module-act-type=PERIODIC --module-max-inst=1 
-#   --config=output_mode:int:0 --config=image_height:int:240 --config=image_width:int:320 
-#   --inport=original_image:RTC::CameraImage --outport=output_image:RTC::CameraImage --outport=foreMaskImg:RTC::CameraImage --outport=stillMaskImg:RTC::CameraImage --outport=backGroundImg:RTC::CameraImage --outport=stillImg:RTC::CameraImage 
-
-
-======================================================================
-    Basic Information
-======================================================================
-# <rtc-template block="module">
-Module Name: SubStractCaptureImage
-Description: SubStractCaptureImage component
-Version:     1.0.0
-Vendor:      AIST
-Category:    Category
-Kind:        DataFlowComponent
-Comp. Type:  STATIC
-Act. Type:   PERIODIC
-MAX Inst.:   1
-Lang:        C++
-Lang Type:   
-
-# </rtc-template>
-
-
-======================================================================
-    Activity definition
-======================================================================
-
-[on_initialize]    implemented
-
-[on_finalize]
-
-[on_startup]
-
-[on_shutdown]
-
-[on_activated]     implemented
-
-[on_deactivated]   implemented
-
-[on_execute]       implemented
-
-[on_aborting]
-
-[on_error]
-
-[on_reset]
-
-[on_state_update]
-
-[on_rate_changed]
-
-======================================================================
-    InPorts definition
-======================================================================
-# <rtc-template block="inport">
-
-	Name:        original_image
-	PortNumber:  0
-	Description: 
-	PortType: 
-	DataType:    RTC::CameraImage
-	MaxOut: 
-	[Data Elements]
-		Name:
-		Type:            
-		Number:          
-		Semantics:       
-		Unit:            
-		Frequency:       
-		Operation Cycle: 
-		RangeLow:
-		RangeHigh:
-		DefaultValue:
-
-
-# </rtc-template>
-
-======================================================================
-    OutPorts definition
-======================================================================
-# <rtc-template block="outport">
-
-	Name:        output_image
-	PortNumber:  0
-	Description: 
-	PortType: 
-	DataType:    RTC::CameraImage
-	MaxOut: 
-	[Data Elements]
-		Name:
-		Type:            
-		Number:          
-		Semantics:       
-		Unit:            
-		Frequency:       
-		Operation Cycle: 
-		RangeLow:
-		RangeHigh:
-		DefaultValue:
-
-	Name:        foreMaskImg
-	PortNumber:  1
-	Description: 
-	PortType: 
-	DataType:    RTC::CameraImage
-	MaxOut: 
-	[Data Elements]
-		Name:
-		Type:            
-		Number:          
-		Semantics:       
-		Unit:            
-		Frequency:       
-		Operation Cycle: 
-		RangeLow:
-		RangeHigh:
-		DefaultValue:
-
-	Name:        stillMaskImg
-	PortNumber:  2
-	Description: 
-	PortType: 
-	DataType:    RTC::CameraImage
-	MaxOut: 
-	[Data Elements]
-		Name:
-		Type:            
-		Number:          
-		Semantics:       
-		Unit:            
-		Frequency:       
-		Operation Cycle: 
-		RangeLow:
-		RangeHigh:
-		DefaultValue:
-
-	Name:        backGroundImg
-	PortNumber:  3
-	Description: 
-	PortType: 
-	DataType:    RTC::CameraImage
-	MaxOut: 
-	[Data Elements]
-		Name:
-		Type:            
-		Number:          
-		Semantics:       
-		Unit:            
-		Frequency:       
-		Operation Cycle: 
-		RangeLow:
-		RangeHigh:
-		DefaultValue:
-
-	Name:        stillImg
-	PortNumber:  4
-	Description: 
-	PortType: 
-	DataType:    RTC::CameraImage
-	MaxOut: 
-	[Data Elements]
-		Name:
-		Type:            
-		Number:          
-		Semantics:       
-		Unit:            
-		Frequency:       
-		Operation Cycle: 
-		RangeLow:
-		RangeHigh:
-		DefaultValue:
-
-
-# </rtc-template>
-
-
-======================================================================
-    Service Port definition
-======================================================================
-# <rtc-template block="serviceport">
-# </rtc-template> 
-
-======================================================================
-    Configuration definition
-======================================================================
-# <rtc-template block="configuration">
-	Configuration:
-		Name:             output_mode
-		Description:     
-		Type:            int
-		DefaultValue:     0
-		Unit:            
-		Range:           
-		Constraint:      
-
-		Name:             image_height
-		Description:     
-		Type:            int
-		DefaultValue:     240
-		Unit:            
-		Range:           
-		Constraint:      
-
-		Name:             image_width
-		Description:     
-		Type:            int
-		DefaultValue:     320
-		Unit:            
-		Range:           
-		Constraint:      
-
-# </rtc-template> 
-
-This software is developed at the National Institute of Advanced
-Industrial Science and Technology. Approval number H23PRO-????. This
-software is licensed under the Lesser General Public License. See
-COPYING.LESSER.
-
-This area is reserved for future OpenRTM.
-
+======================================================================
+  RTComponent: SubStractCaptureImage specificatioin
+
+  OpenRTM-aist-1.0.0
+  Date: $Date$
+
+  This file is generated by rtc-template with the following argments.
+
+#   rtc-template -bcxx --module-name=SubStractCaptureImage 
+#   --module-desc='SubStractCaptureImage component' --module-version=1.1.0 --module-vendor=AIST 
+#   --module-category=Category --module-comp-type=STATIC 
+#   --module-act-type=PERIODIC --module-max-inst=1 
+#   --inport=original_image:RTC::CameraImage --outport=output_image:RTC::CameraImage --outport=foreMaskImg:RTC::CameraImage --outport=stillMaskImg:RTC::CameraImage --outport=backGroundImg:RTC::CameraImage --outport=stillImg:RTC::CameraImage 
+
+
+======================================================================
+    Basic Information
+======================================================================
+# <rtc-template block="module">
+Module Name: SubStractCaptureImage
+Description: SubStractCaptureImage component
+Version:     1.1.0
+Vendor:      AIST
+Category:    Category
+Kind:        DataFlowComponent
+Comp. Type:  STATIC
+Act. Type:   PERIODIC
+MAX Inst.:   1
+Lang:        C++
+Lang Type:   
+
+# </rtc-template>
+
+
+======================================================================
+    Activity definition
+======================================================================
+
+[on_initialize]    implemented
+
+[on_finalize]
+
+[on_startup]
+
+[on_shutdown]
+
+[on_activated]     implemented
+
+[on_deactivated]   implemented
+
+[on_execute]       implemented
+
+[on_aborting]
+
+[on_error]
+
+[on_reset]
+
+[on_state_update]
+
+[on_rate_changed]
+
+======================================================================
+    InPorts definition
+======================================================================
+# <rtc-template block="inport">
+
+	Name:        original_image
+	PortNumber:  0
+	Description: 
+	PortType: 
+	DataType:    RTC::CameraImage
+	MaxOut: 
+	[Data Elements]
+		Name:
+		Type:            
+		Number:          
+		Semantics:       
+		Unit:            
+		Frequency:       
+		Operation Cycle: 
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+
+# </rtc-template>
+
+======================================================================
+    OutPorts definition
+======================================================================
+# <rtc-template block="outport">
+
+	Name:        output_image
+	PortNumber:  0
+	Description: 
+	PortType: 
+	DataType:    RTC::CameraImage
+	MaxOut: 
+	[Data Elements]
+		Name:
+		Type:            
+		Number:          
+		Semantics:       
+		Unit:            
+		Frequency:       
+		Operation Cycle: 
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+	Name:        foreMaskImg
+	PortNumber:  1
+	Description: 
+	PortType: 
+	DataType:    RTC::CameraImage
+	MaxOut: 
+	[Data Elements]
+		Name:
+		Type:            
+		Number:          
+		Semantics:       
+		Unit:            
+		Frequency:       
+		Operation Cycle: 
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+	Name:        stillMaskImg
+	PortNumber:  2
+	Description: 
+	PortType: 
+	DataType:    RTC::CameraImage
+	MaxOut: 
+	[Data Elements]
+		Name:
+		Type:            
+		Number:          
+		Semantics:       
+		Unit:            
+		Frequency:       
+		Operation Cycle: 
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+	Name:        backGroundImg
+	PortNumber:  3
+	Description: 
+	PortType: 
+	DataType:    RTC::CameraImage
+	MaxOut: 
+	[Data Elements]
+		Name:
+		Type:            
+		Number:          
+		Semantics:       
+		Unit:            
+		Frequency:       
+		Operation Cycle: 
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+	Name:        stillImg
+	PortNumber:  4
+	Description: 
+	PortType: 
+	DataType:    RTC::CameraImage
+	MaxOut: 
+	[Data Elements]
+		Name:
+		Type:            
+		Number:          
+		Semantics:       
+		Unit:            
+		Frequency:       
+		Operation Cycle: 
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+
+# </rtc-template>
+
+
+======================================================================
+    Service Port definition
+======================================================================
+# <rtc-template block="serviceport">
+# </rtc-template> 
+
+======================================================================
+    Configuration definition
+======================================================================
+# <rtc-template block="configuration">
+# </rtc-template> 
+
+This software is developed at the National Institute of Advanced
+Industrial Science and Technology. Approval number H23PRO-????. This
+software is licensed under the Lesser General Public License. See
+COPYING.LESSER.
+
+This area is reserved for future OpenRTM.
+

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/RTC.xml
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/RTC.xml	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/RTC.xml	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<rtc:RtcProfile rtc:version="0.2" rtc:id="RTC:AIST:Category:SubStractCaptureImage: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="SubStractCaptureImage" rtc:updateDate="2013-06-13T09:14:28+09:00" rtc:creationDate="2013-06-13T09:14:28+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1000.0" rtc:description="SubStractCaptureImage component" rtc:category="Category" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="SubStractCaptureImage"/>
+<rtc:RtcProfile rtc:version="0.2" rtc:id="RTC:AIST:Category:SubStractCaptureImage:1.1.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="SubStractCaptureImage" rtc:updateDate="2014-03-17T15:59:00.947+09:00" rtc:creationDate="2013-06-13T09:14:28+09:00" rtc:version="1.1.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1000.0" rtc:description="SubStractCaptureImage component" rtc:category="Category" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="SubStractCaptureImage">
+        <rtcExt:VersionUpLogs></rtcExt:VersionUpLogs>
+    </rtc:BasicInfo>
     <rtc:Actions>
         <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="true"/>
         <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
@@ -17,18 +19,7 @@
         <rtc:OnAction xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
         <rtc:OnModeChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
     </rtc:Actions>
-    <rtc:ConfigurationSet>
-        <rtc:Configuration xsi:type="rtcExt:configuration_ext" rtcExt:variableName="output_mode" rtc:unit="" rtc:defaultValue="0" rtc:type="int" rtc:name="output_mode">
-            <rtcExt:Properties rtcExt:value="text" rtcExt:name="__widget__"/>
-        </rtc:Configuration>
-        <rtc:Configuration xsi:type="rtcExt:configuration_ext" rtcExt:variableName="img_height" rtc:unit="" rtc:defaultValue="240" rtc:type="int" rtc:name="image_height">
-            <rtcExt:Properties rtcExt:value="text" rtcExt:name="__widget__"/>
-        </rtc:Configuration>
-        <rtc:Configuration xsi:type="rtcExt:configuration_ext" rtcExt:variableName="img_width" rtc:unit="" rtc:defaultValue="320" rtc:type="int" rtc:name="image_width">
-            <rtcExt:Properties rtcExt:value="text" rtcExt:name="__widget__"/>
-        </rtc:Configuration>
-    </rtc:ConfigurationSet>
-    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="LEFT" rtcExt:variableName="m_image_orig" rtc:unit="" rtc:subscriptionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="RTC::CameraImage" rtc:name="original_image" rtc:portType="DataInPort"/>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="LEFT" rtcExt:variableName="image_orig" rtc:unit="" rtc:subscriptionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="RTC::CameraImage" rtc:name="original_image" rtc:portType="DataInPort"/>
     <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="RIGHT" rtcExt:variableName="image_out" rtc:unit="" rtc:subscriptionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="RTC::CameraImage" rtc:name="output_image" rtc:portType="DataOutPort"/>
     <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="RIGHT" rtcExt:variableName="foreMaskImg" rtc:unit="" rtc:subscriptionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="RTC::CameraImage" rtc:name="foreMaskImg" rtc:portType="DataOutPort"/>
     <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="RIGHT" rtcExt:variableName="stillMaskImg" rtc:unit="" rtc:subscriptionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="RTC::CameraImage" rtc:name="stillMaskImg" rtc:portType="DataOutPort"/>

Deleted: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/RTC.xml20130613093108
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/RTC.xml20130613093108	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/RTC.xml20130613093108	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<rtc:RtcProfile rtc:version="0.2" rtc:id="RTC:VenderName:Category:ModuleName: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" rtc:updateDate="2013-06-13T09:14:28+09:00" rtc:creationDate="2013-06-13T09:14:28+09:00" rtc:version="1.0.0" rtc:vendor="VenderName" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1000.0" rtc:description="ModuleDescription" rtc:category="Category" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="ModuleName">
-        <rtcDoc:Doc rtcDoc:license="" rtcDoc:creator=""/>
-    </rtc:BasicInfo>
-    <rtc:Actions/>
-</rtc:RtcProfile>

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/SubStractCaptureImage.conf
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/SubStractCaptureImage.conf	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/SubStractCaptureImage.conf	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,134 +1,139 @@
-# -*- sh -*-
-#------------------------------------------------------------
-# Configuration file for SubStractCaptureImage
-#
-# This configuration file name should be specified in rtc.conf (or other
-# configuration file specified by -f option) by "config_file" property.
-#
-# Category.SubStractCaptureImage.config_file: SubStractCaptureImage.conf
-# or
-# Category.SubStractCaptureImage0.config_file: SubStractCaptureImage0.conf
-# Category.SubStractCaptureImage1.config_file: SubStractCaptureImage1.conf
-# Category.SubStractCaptureImage2.config_file: SubStractCaptureImage2.conf
-#
-# ------------------------------------------------------------
-# An example configuration file for SubStractCaptureImage
-#
-# See details in the following reference manual
-#
-
-# Execution context configuration
-# exec_cxt.periodic.type: PeriodicExecutionContext
-# exec_cxt.periodic.rate: 1000
-#
-#
-# configuration.active_config: mode0
-
-# Additional configuration-set example named "mode0"
-#
-# conf.mode0.int_param0: 0
-# conf.mode0.int_param1: 1
-# conf.mode0.double_param0: 0.99
-# conf.mode0.double_param1: -0.99
-# conf.mode0.str_param0: default
-# conf.mode0.str_param1: default set in conf file
-# conf.mode0.vector_param0: 0.0,0.1,0.2,0.3,0.4,0.5,0.6
-#
-# Other configuration set named "mode1"
-#
-# conf.mode1.int_param0: 0
-# conf.mode1.int_param1: 1
-# conf.mode1.double_param0: 0.99
-# conf.mode1.double_param1: -0.99
-# conf.mode1.str_param0: default
-# conf.mode1.str_param1: default set in conf file
-# conf.mode1.vector_param0: 0.0,0.1,0.2,0.3,0.4,0.5,0.6
-
-
-
-
-
-##============================================================
-## Component configuration reference
-##
-
-##============================================================
-## Active configuration-set
-##============================================================
-##
-## Initial active configuration-set. The following "mode0" is a
-## configuration-set name.  A configuration-set named "mode0" should be
-## appear in this configuration file as follows.
-##
-## configuration.active_config: mode0
-##
-# conf.mode0.param0: hoge
-# conf.mode0.param1: fuga
-# conf.mode0.param2: munya
-
-##============================================================
-## GUI control option for RTSystemEditor
-##============================================================
-## Available GUI control options [__widget__]:
-##
-## - text:          text box [default].
-## - slider.<step>: Horizontal slider. <step> is step for the slider.
-##                  A range constraints option is required. 
-## - spin:          Spin button. A range constraitns option is required.
-## - radio:         Radio button. An enumeration constraints is required.
-## - checkbox:      Checkbox control. An enumeration constraints is
-##                  required. The parameter has to be able to accept a
-##                  comma separated list.
-## - orderd_list:   Orderd list control.  An enumeration constraint is
-##                  required. The parameter has to be able to accept a
-##                  comma separated list. In this control, Enumerated
-##                  elements can appear one or more times in the given list.
-##
-## Available GUI control constraint options [__constraints__]:
-##
-## - none:         blank
-## - direct value: 100 (constant value)
-## - range:        <, >, <=, >= can be used.
-## - enumeration:  (enum0, enum1, ...)
-## - array:        <constraints0>, ,constraints1>, ... for only array value
-## - hash:         {key0: value0, key1:, value0, ...}
-##
-# conf.__widget__.output_mode, text
-# conf.__widget__.image_height, text
-# conf.__widget__.image_width, text
-
-
-# conf.__constraints__.int_param0: 0<=x<=150
-# conf.__constraints__.int_param1: 0<=x<=1000
-# conf.__constraints__.double_param0: 0<=x<=100
-# conf.__constraints__.double_param1:
-# conf.__constraints__.str_param0: (default,mode0,mode1)
-# conf.__constraints__.vector_param0: (dog,monky,pheasant,cat)
-# conf.__constraints__.vector_param1: (pita,gora,switch)
-
-##============================================================
-## Execution context settings
-##============================================================
-##
-## Periodic type ExecutionContext
-##
-## Other availabilities in OpenRTM-aist
-##
-## - ExtTrigExecutionContext: External triggered EC. It is embedded in
-##                            OpenRTM library.
-## - OpenHRPExecutionContext: External triggred paralell execution
-##                            EC. It is embedded in OpenRTM
-##                            library. This is usually used with
-##                            OpenHRP3.
-## - RTPreemptEC:             Real-time execution context for Linux
-##                            RT-preemptive pathed kernel.
-## - ArtExecutionContext:     Real-time execution context for ARTLinux
-##                            (http://sourceforge.net/projects/art-linux/)
-##
-# exec_cxt.periodic.type: PeriodicExecutionContext
-
-##
-## The execution cycle of ExecutionContext
-##
-exec_cxt.periodic.rate:1000.0
-
+# -*- sh -*-
+#------------------------------------------------------------
+# Configuration file for SubStractCaptureImage
+#
+# This configuration file name should be specified in rtc.conf (or other
+# configuration file specified by -f option) by "config_file" property.
+#
+# Category.SubStractCaptureImage.config_file: SubStractCaptureImage.conf
+# or
+# Category.SubStractCaptureImage0.config_file: SubStractCaptureImage0.conf
+# Category.SubStractCaptureImage1.config_file: SubStractCaptureImage1.conf
+# Category.SubStractCaptureImage2.config_file: SubStractCaptureImage2.conf
+#
+# ------------------------------------------------------------
+# An example configuration file for SubStractCaptureImage
+#
+# See details in the following reference manual
+#
+
+# Execution context configuration
+# exec_cxt.periodic.type: PeriodicExecutionContext
+# exec_cxt.periodic.rate: 1000
+#
+#
+# configuration.active_config: mode0
+
+# Additional configuration-set example named "mode0"
+#
+# conf.mode0.int_param0: 0
+# conf.mode0.int_param1: 1
+# conf.mode0.double_param0: 0.99
+# conf.mode0.double_param1: -0.99
+# conf.mode0.str_param0: default
+# conf.mode0.str_param1: default set in conf file
+# conf.mode0.vector_param0: 0.0,0.1,0.2,0.3,0.4,0.5,0.6
+#
+# Other configuration set named "mode1"
+#
+# conf.mode1.int_param0: 0
+# conf.mode1.int_param1: 1
+# conf.mode1.double_param0: 0.99
+# conf.mode1.double_param1: -0.99
+# conf.mode1.str_param0: default
+# conf.mode1.str_param1: default set in conf file
+# conf.mode1.vector_param0: 0.0,0.1,0.2,0.3,0.4,0.5,0.6
+
+
+
+
+
+##============================================================
+## Component configuration reference
+##
+
+##============================================================
+## Active configuration-set
+##============================================================
+##
+## Initial active configuration-set. The following "mode0" is a
+## configuration-set name.  A configuration-set named "mode0" should be
+## appear in this configuration file as follows.
+##
+## configuration.active_config: mode0
+##
+# conf.mode0.param0: hoge
+# conf.mode0.param1: fuga
+# conf.mode0.param2: munya
+
+##============================================================
+## GUI control option for RTSystemEditor
+##============================================================
+## Available GUI control options [__widget__]:
+##
+## - text:          text box [default].
+## - slider.<step>: Horizontal slider. <step> is step for the slider.
+##                  A range constraints option is required. 
+## - spin:          Spin button. A range constraitns option is required.
+## - radio:         Radio button. An enumeration constraints is required.
+## - checkbox:      Checkbox control. An enumeration constraints is
+##                  required. The parameter has to be able to accept a
+##                  comma separated list.
+## - orderd_list:   Orderd list control.  An enumeration constraint is
+##                  required. The parameter has to be able to accept a
+##                  comma separated list. In this control, Enumerated
+##                  elements can appear one or more times in the given list.
+##
+## Available GUI control constraint options [__constraints__]:
+##
+## - none:         blank
+## - direct value: 100 (constant value)
+## - range:        <, >, <=, >= can be used.
+## - enumeration:  (enum0, enum1, ...)
+## - array:        <constraints0>, ,constraints1>, ... for only array value
+## - hash:         {key0: value0, key1:, value0, ...}
+##
+## examples:
+# conf.__widget__.int_param0: slider.10
+# conf.__widget__.int_param1: spin
+# conf.__widget__.double_param0: slider.10
+# conf.__widget__.double_param1: text
+# conf.__widget__.str_param0: radio
+# conf.__widget__.vector_param0: checkbox
+# conf.__widget__.vector_param1: orderd_list
+
+
+# conf.__constraints__.int_param0: 0<=x<=150
+# conf.__constraints__.int_param1: 0<=x<=1000
+# conf.__constraints__.double_param0: 0<=x<=100
+# conf.__constraints__.double_param1:
+# conf.__constraints__.str_param0: (default,mode0,mode1)
+# conf.__constraints__.vector_param0: (dog,monky,pheasant,cat)
+# conf.__constraints__.vector_param1: (pita,gora,switch)
+
+##============================================================
+## Execution context settings
+##============================================================
+##
+## Periodic type ExecutionContext
+##
+## Other availabilities in OpenRTM-aist
+##
+## - ExtTrigExecutionContext: External triggered EC. It is embedded in
+##                            OpenRTM library.
+## - OpenHRPExecutionContext: External triggred paralell execution
+##                            EC. It is embedded in OpenRTM
+##                            library. This is usually used with
+##                            OpenHRP3.
+## - RTPreemptEC:             Real-time execution context for Linux
+##                            RT-preemptive pathed kernel.
+## - ArtExecutionContext:     Real-time execution context for ARTLinux
+##                            (http://sourceforge.net/projects/art-linux/)
+##
+# exec_cxt.periodic.type: PeriodicExecutionContext
+
+##
+## The execution cycle of ExecutionContext
+##
+exec_cxt.periodic.rate:1000.0
+

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/CMakeLists.txt	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/CMakeLists.txt	2014-03-17 08:36:10 UTC (rev 130)
@@ -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/SubStractCaptureImage/cmake/cpack_options.cmake.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/cpack_options.cmake.in	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/cpack_options.cmake.in	2014-03-17 08:36:10 UTC (rev 130)
@@ -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/SubStractCaptureImage/cmake/wix.xsl.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/wix.xsl.in	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/wix.xsl.in	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,99 +1,99 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet version="1.0"
-   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-   xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
-  <xsl:output indent="yes" method="xml"/>
-
-  <xsl:template match="/wix:Wix">
-    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
-      <Product xmlns="http://schemas.microsoft.com/wix/2006/wi" Id="293FE870-C3F7-4A2C-89EB-64BCB0BA48CB" Name="@CPACK_PACKAGE_NAME@ @CPACK_PACKAGE_VERSION@" Language="1041" Codepage="932" Version="@CPACK_PACKAGE_VERSION@" Manufacturer="@CPACK_PACKAGE_VENDOR@" UpgradeCode="46AF5CC7-D09B-4780-BF81-9EB78FEF15E5">
-        <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" >
-            <Directory Id="ProgramFilesFolder" Name="PFILE" >
-                <Directory Id="OPENRTM_DIR" Name="OpenRTM-aist" >
-			<!-- <Directory Id="INSTALLLOCATION" Name="@OPENRTM_VERSION_MAJOR at .@OPENRTM_VERSION_MINOR@" /> -->
-                    <Directory Id="INSTALLLOCATION" Name="1.1" />
-                </Directory>
-            </Directory>
-        </Directory>
-
-        <Feature Id="APPLICATIONS" Title="@CPACK_COMPONENT_COMPONENT_DISPLAY_NAME@" Level="1" Description="@CPACK_COMPONENT_COMPONENT_DESCRIPTION@" >
-          <!-- Start Ripping through the xml -->
-		<!--
-          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@PACKAGE_NAME@@PACKAGE_VERSION@\@RTC_NAME at .dll')]" />
-          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@PACKAGE_NAME@@PACKAGE_VERSION@\@RTC_NAME at .lib')]" />
-          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@PACKAGE_NAME@@PACKAGE_VERSION@\@RTC_NAME at Comp.exe')]" />
-          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@PACKAGE_NAME@@PACKAGE_VERSION@\RTC.xml')]" />
-	  -->
-          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, translate('\bin\@CPACK_PACKAGE_NAME at .dll','ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'))]" />
-          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, translate('\lib\@CPACK_PACKAGE_NAME at .lib','ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'))]" />
-          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, translate('\bin\@CPACK_PACKAGE_NAME at Comp.exe','ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'))]" />
-          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, 'RTC.xml')]" />
-        </Feature>
-
-        <Feature Id="DOCUMENTS" Title="@CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME@" Level="1" Absent="allow" Description="@CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION@" >
-          <!-- Start Ripping through the xml -->
-          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@PACKAGE_NAME@@PACKAGE_VERSION@\doc')]" />
-        </Feature>
-
-	<!-- <Feature Id="SOURCES" Title="@CPACK_COMPONENT_SOURCES_DISPLAY_NAME@" Level="1" Absent="allow" Description="@CPACK_COMPONENT_SOURCES_DESCRIPTION@" >-->
-          <!-- Start Ripping through the xml -->
-	  <!-- <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@CPACK_PACKAGE_INSTALL_DIRECTORY@\src')]" /> -->
-	  <!-- </Feature> -->
-
-        <!--Tack on your specific wix options-->
-        <UIRef Id="WixUI_FeatureTree" />
-        <UIRef Id="WixUI_ErrorProgressText" />
-        <!-- 
-        <WixVariable Id="WixUILicenseRtf" Value="@CPACK_RESOURCE_FILE_LICENSE@"/>
-        -->
-        <!-- TODO: Add Wix Specific Dialogs and features. -->
-        <!-- TODO: Add artwork  -->
-        <!-- TODO: Add ... -->
-
-      </Product>
-
-      <!--Output the fragment info which heat generates-->
-      <xsl:copy-of select="wix:Fragment[wix:DirectoryRef/wix:Component]" />
-      <xsl:apply-templates select="wix:Fragment[wix:DirectoryRef/@Id!='TARGETDIR' and wix:DirectoryRef/wix:Directory]" />
-
-    </Wix>
-  </xsl:template>
-
-  <xsl:template match="wix:Fragment[wix:DirectoryRef/wix:Directory]" >
-    <xsl:copy>
-      <xsl:apply-templates select="wix:DirectoryRef" />
-    </xsl:copy>
-  </xsl:template>
-
-  <xsl:template match="wix:DirectoryRef" >
-    <xsl:copy>
-      <xsl:choose>
-        <xsl:when test="wix:Directory[@Name='components']" >
-          <xsl:attribute name="Id">INSTALLLOCATION</xsl:attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:attribute name="Id"><xsl:value-of select="@Id" /></xsl:attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:apply-templates />
-    </xsl:copy>
-  </xsl:template>
-
-  <xsl:template match="wix:Directory" >
-    <xsl:copy>
-      <xsl:attribute name="Id"><xsl:value-of select="@Id" /></xsl:attribute>
-      <xsl:attribute name="Name"><xsl:value-of select="@Name" /></xsl:attribute>
-    </xsl:copy>
-  </xsl:template>
-
-  <xsl:template match="wix:Component">
-    <xsl:element name="ComponentRef" xmlns="http://schemas.microsoft.com/wix/2006/wi" >
-      <xsl:attribute name="Id">
-        <xsl:value-of select="@Id" />
-      </xsl:attribute>
-    </xsl:element>
-  </xsl:template>
-
-</xsl:stylesheet>
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+   xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
+  <xsl:output indent="yes" method="xml"/>
+
+  <xsl:template match="/wix:Wix">
+    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+      <Product xmlns="http://schemas.microsoft.com/wix/2006/wi" Id="C2153F2B-760B-417E-8950-1A361A3D32CC" Name="@CPACK_PACKAGE_NAME@ @CPACK_PACKAGE_VERSION@" Language="1041" Codepage="932" Version="@CPACK_PACKAGE_VERSION@" Manufacturer="@CPACK_PACKAGE_VENDOR@" UpgradeCode="94BFE08A-5438-4582-83F1-431465BFDC5B">
+        <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" >
+            <Directory Id="ProgramFilesFolder" Name="PFILE" >
+                <Directory Id="OPENRTM_DIR" Name="OpenRTM-aist" >
+			<!-- <Directory Id="INSTALLLOCATION" Name="@OPENRTM_VERSION_MAJOR at .@OPENRTM_VERSION_MINOR@" /> -->
+                    <Directory Id="INSTALLLOCATION" Name="1.1" />
+                </Directory>
+            </Directory>
+        </Directory>
+
+        <Feature Id="APPLICATIONS" Title="@CPACK_COMPONENT_COMPONENT_DISPLAY_NAME@" Level="1" Description="@CPACK_COMPONENT_COMPONENT_DESCRIPTION@" >
+          <!-- Start Ripping through the xml -->
+		<!--
+          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@PACKAGE_NAME@@PACKAGE_VERSION@\@RTC_NAME at .dll')]" />
+          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@PACKAGE_NAME@@PACKAGE_VERSION@\@RTC_NAME at .lib')]" />
+          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@PACKAGE_NAME@@PACKAGE_VERSION@\@RTC_NAME at Comp.exe')]" />
+          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@PACKAGE_NAME@@PACKAGE_VERSION@\RTC.xml')]" />
+	  -->
+          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, translate('\bin\@CPACK_PACKAGE_NAME at .dll','ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'))]" />
+          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, translate('\lib\@CPACK_PACKAGE_NAME at .lib','ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'))]" />
+          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, translate('\bin\@CPACK_PACKAGE_NAME at Comp.exe','ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'))]" />
+          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, 'RTC.xml')]" />
+        </Feature>
+
+        <Feature Id="DOCUMENTS" Title="@CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME@" Level="1" Absent="allow" Description="@CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION@" >
+          <!-- Start Ripping through the xml -->
+          <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@PACKAGE_NAME@@PACKAGE_VERSION@\doc')]" />
+        </Feature>
+
+	<!-- <Feature Id="SOURCES" Title="@CPACK_COMPONENT_SOURCES_DISPLAY_NAME@" Level="1" Absent="allow" Description="@CPACK_COMPONENT_SOURCES_DESCRIPTION@" >-->
+          <!-- Start Ripping through the xml -->
+	  <!-- <xsl:apply-templates select="wix:Fragment/wix:DirectoryRef/wix:Component[contains(wix:File/@Source, '@CPACK_PACKAGE_INSTALL_DIRECTORY@\src')]" /> -->
+	  <!-- </Feature> -->
+
+        <!--Tack on your specific wix options-->
+        <UIRef Id="WixUI_FeatureTree" />
+        <UIRef Id="WixUI_ErrorProgressText" />
+        <!-- 
+        <WixVariable Id="WixUILicenseRtf" Value="@CPACK_RESOURCE_FILE_LICENSE@"/>
+        -->
+        <!-- TODO: Add Wix Specific Dialogs and features. -->
+        <!-- TODO: Add artwork  -->
+        <!-- TODO: Add ... -->
+
+      </Product>
+
+      <!--Output the fragment info which heat generates-->
+      <xsl:copy-of select="wix:Fragment[wix:DirectoryRef/wix:Component]" />
+      <xsl:apply-templates select="wix:Fragment[wix:DirectoryRef/@Id!='TARGETDIR' and wix:DirectoryRef/wix:Directory]" />
+
+    </Wix>
+  </xsl:template>
+
+  <xsl:template match="wix:Fragment[wix:DirectoryRef/wix:Directory]" >
+    <xsl:copy>
+      <xsl:apply-templates select="wix:DirectoryRef" />
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="wix:DirectoryRef" >
+    <xsl:copy>
+      <xsl:choose>
+        <xsl:when test="wix:Directory[@Name='components']" >
+          <xsl:attribute name="Id">INSTALLLOCATION</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="Id"><xsl:value-of select="@Id" /></xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates />
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="wix:Directory" >
+    <xsl:copy>
+      <xsl:attribute name="Id"><xsl:value-of select="@Id" /></xsl:attribute>
+      <xsl:attribute name="Name"><xsl:value-of select="@Name" /></xsl:attribute>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="wix:Component">
+    <xsl:element name="ComponentRef" xmlns="http://schemas.microsoft.com/wix/2006/wi" >
+      <xsl:attribute name="Id">
+        <xsl:value-of select="@Id" />
+      </xsl:attribute>
+    </xsl:element>
+  </xsl:template>
+
+</xsl:stylesheet>

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/CMakeLists.txt	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/CMakeLists.txt	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,40 +1,40 @@
 cmake_policy(SET CMP0002 OLD)
 
-find_package(Doxygen)
-if(DOXYGEN_FOUND)
-    # Search for Sphinx
-    #set(SPHINX_PATH "" CACHE PATH
-    #    "Path to the directory containing the sphinx-build program")
-    #find_program(SPHINX_BUILD sphinx-build PATHS ${SPHINX_PATH})
-    #if(NOT SPHINX_BUILD)
-    #    message(FATAL_ERROR
-    #        "Sphinx was not found. Set SPHINX_PATH to the directory containing the sphinx-build executable, or disable BUILD_DOCUMENTATION.")
-    #endif(NOT SPHINX_BUILD)
-
-    set(html_dir "${CMAKE_CURRENT_BINARY_DIR}/html")
-    set(doxygen_dir "${html_dir}/doxygen")
-    file(MAKE_DIRECTORY ${html_dir})
-    file(MAKE_DIRECTORY ${doxygen_dir})
-
-    # Doxygen part
-    set(doxyfile "${CMAKE_CURRENT_BINARY_DIR}/doxyfile")
-    configure_file(doxyfile.in ${doxyfile})
+find_package(Doxygen)
+if(DOXYGEN_FOUND)
+    # Search for Sphinx
+    #set(SPHINX_PATH "" CACHE PATH
+    #    "Path to the directory containing the sphinx-build program")
+    #find_program(SPHINX_BUILD sphinx-build PATHS ${SPHINX_PATH})
+    #if(NOT SPHINX_BUILD)
+    #    message(FATAL_ERROR
+    #        "Sphinx was not found. Set SPHINX_PATH to the directory containing the sphinx-build executable, or disable BUILD_DOCUMENTATION.")
+    #endif(NOT SPHINX_BUILD)
+
+    set(html_dir "${CMAKE_CURRENT_BINARY_DIR}/html")
+    set(doxygen_dir "${html_dir}/doxygen")
+    file(MAKE_DIRECTORY ${html_dir})
+    file(MAKE_DIRECTORY ${doxygen_dir})
+
+    # Doxygen part
+    set(doxyfile "${CMAKE_CURRENT_BINARY_DIR}/doxyfile")
+    configure_file(doxyfile.in ${doxyfile})
     add_custom_target(${PROJECT_NAME}_doxygen_doc ${DOXYGEN_EXECUTABLE} ${doxyfile})
-
-    # Sphinx part
-    #set(conf_dir "${CMAKE_CURRENT_BINARY_DIR}/conf")
-    #file(MAKE_DIRECTORY "${conf_dir}")
-    #file(MAKE_DIRECTORY "${conf_dir}/_static")
-    #set(conf_py "${conf_dir}/conf.py")
-    #configure_file(conf.py.in ${conf_py})
-    #add_custom_target(sphinx_doc ALL sphinx-build -b html -c ${conf_dir}
-    #    ${CMAKE_CURRENT_SOURCE_DIR}/content ${CMAKE_CURRENT_BINARY_DIR}/html
-    #    DEPENDS doxygen_doc)
-    #install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html" DESTINATION
-    #    "components/share/doc/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}"
-    #    COMPONENT documentation)
-else(DOXYGEN_FOUND)
-    message(FATAL_ERROR
-        "Doxygen was not found. Cannot build documentation. Disable BUILD_DOCUMENTATION to continue")
-endif(DOXYGEN_FOUND)
-
+
+    # Sphinx part
+    #set(conf_dir "${CMAKE_CURRENT_BINARY_DIR}/conf")
+    #file(MAKE_DIRECTORY "${conf_dir}")
+    #file(MAKE_DIRECTORY "${conf_dir}/_static")
+    #set(conf_py "${conf_dir}/conf.py")
+    #configure_file(conf.py.in ${conf_py})
+    #add_custom_target(sphinx_doc ALL sphinx-build -b html -c ${conf_dir}
+    #    ${CMAKE_CURRENT_SOURCE_DIR}/content ${CMAKE_CURRENT_BINARY_DIR}/html
+    #    DEPENDS doxygen_doc)
+    #install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html" DESTINATION
+    #    "components/share/doc/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}"
+    #    COMPONENT documentation)
+else(DOXYGEN_FOUND)
+    message(FATAL_ERROR
+        "Doxygen was not found. Cannot build documentation. Disable BUILD_DOCUMENTATION to continue")
+endif(DOXYGEN_FOUND)
+

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/content/index.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/content/index.txt	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/content/index.txt	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,148 +1,145 @@
-SubStractCaptureImageName - English
-========================
-
-.. toctree::
-   :hidden:
-
-   index_j
-
-
-Introduction
-============
-
-
-For a full list of classes and functions, see the `API documentation`_.
-
-.. _`API Documentation`:
-   doxygen/html/index.html
-
-Requirements
-============
-
-SubStractCaptureImage uses the `CMake build system`. You will need at least version
-2.8 to be able to build the component.
-
-.. _`CMAke build system`:
-   http://www.cmake.org
-
-
-Installation
-============
-
-Binary
-------
-
-Users of Windows can install the component using the binary installer. This
-will install the component and all its necessary dependencies. It is the
-recommended method of installation in Windows.
-
-- Download the installer from the website.
-- Double-click the executable file to begin installation.
-- Follow the instructions to install the component.
-- You may need to restart your computer for environment variable changes
-  to take effect before using the component.
-
-The component can be launched by double-clicking the
-``SubStractCaptureImageComp`` executable. The ``SubStractCaptureImage`` library
-is available for loading into a manager, using the initialisation function
-``SubStractCaptureImageInit``.
-
-From source
------------
-
-Follow these steps to install SubStractCaptureImage from source in any operating
-system:
-
-- Download the source, either from the repository or a source archive,
-  and extract it somewhere::
-
-    tar -xvzf SubStractCaptureImage-1.0.0.tar.gz
-
-- Change to the directory containing the extracted source::
-
-    cd SubStractCaptureImage-1.0.0
-
-- Create a directory called ``build``::
-
-    mkdir build
-
-- Change to that directory::
-
-    cd build
-
-- Run cmake or cmake-gui::
-
-    cmake ../
-
-- If no errors occurred, run make::
-
-    make
-
-- Finally, install the component. Ensure the necessary permissions to
-  install into the chosen prefix are available::
-
-    make install
-
-- The install destination can be changed by executing ccmake and changing
-  the variable ``CMAKE_INSTALL_PREFIX``::
-
-    ccmake ../
-
-The component is now ready for use. See the next section for instructions on
-configuring the component.
-
-SubStractCaptureImage can be launched in stand-alone mode by executing the
-``SubStractCaptureImageComp`` executable (installed into ``${prefix}/components/bin``).
-Alternatively, ``libSubStractCaptureImage.so`` can be loaded into a manager, using the
-initialisation function ``SubStractCaptureImageInit``. This shared object can be found in
-``${prefix}/components/lib`` or ``${prefix}/components/lib64``.
-
-
-Configuration
-=============
-
-The available configuration parameters are described below:
-
-================ ================== ================ ======
-Parameter        Data type          Default Value    Effect
-================ ================== ================ ======
-output_mode      int                0                
-image_height     int                240              
-image_width      int                320              
-================ ================== ================ ======
-
-Ports
-=====
-
-The ports provided by the component are described below:
-
-=============== =========== ============================== =======
-Name            Type        Data type                      Purpose
-=============== =========== ============================== =======
-original_image  InPort      RTC::CameraImage               
-output_image    OutPort     RTC::CameraImage               
-foreMaskImg     OutPort     RTC::CameraImage               
-stillMaskImg    OutPort     RTC::CameraImage               
-backGroundImg   OutPort     RTC::CameraImage               
-stillImg        OutPort     RTC::CameraImage               
-=============== =========== ============================== =======
-
-Examples
-========
-
-An example configuration file is provided in the
-``${prefix}/components/share/SubStractCaptureImage/examples/conf/`` directory.
-
-Changelog
-=========
-
-
-
-License
-=======
-
-This software is developed at the National Institute of Advanced
-Industrial Science and Technology. Approval number H23PRO-????. This
-software is licensed under the Lesser General Public License. See
-COPYING.LESSER.
-
+SubStractCaptureImageName - English
+========================
+
+.. toctree::
+   :hidden:
+
+   index_j
+
+
+Introduction
+============
+
+
+For a full list of classes and functions, see the `API documentation`_.
+
+.. _`API Documentation`:
+   doxygen/html/index.html
+
+Requirements
+============
+
+SubStractCaptureImage uses the `CMake build system`. You will need at least version
+2.8 to be able to build the component.
+
+.. _`CMAke build system`:
+   http://www.cmake.org
+
+
+Installation
+============
+
+Binary
+------
+
+Users of Windows can install the component using the binary installer. This
+will install the component and all its necessary dependencies. It is the
+recommended method of installation in Windows.
+
+- Download the installer from the website.
+- Double-click the executable file to begin installation.
+- Follow the instructions to install the component.
+- You may need to restart your computer for environment variable changes
+  to take effect before using the component.
+
+The component can be launched by double-clicking the
+``SubStractCaptureImageComp`` executable. The ``SubStractCaptureImage`` library
+is available for loading into a manager, using the initialisation function
+``SubStractCaptureImageInit``.
+
+From source
+-----------
+
+Follow these steps to install SubStractCaptureImage from source in any operating
+system:
+
+- Download the source, either from the repository or a source archive,
+  and extract it somewhere::
+
+    tar -xvzf SubStractCaptureImage-1.0.0.tar.gz
+
+- Change to the directory containing the extracted source::
+
+    cd SubStractCaptureImage-1.0.0
+
+- Create a directory called ``build``::
+
+    mkdir build
+
+- Change to that directory::
+
+    cd build
+
+- Run cmake or cmake-gui::
+
+    cmake ../
+
+- If no errors occurred, run make::
+
+    make
+
+- Finally, install the component. Ensure the necessary permissions to
+  install into the chosen prefix are available::
+
+    make install
+
+- The install destination can be changed by executing ccmake and changing
+  the variable ``CMAKE_INSTALL_PREFIX``::
+
+    ccmake ../
+
+The component is now ready for use. See the next section for instructions on
+configuring the component.
+
+SubStractCaptureImage can be launched in stand-alone mode by executing the
+``SubStractCaptureImageComp`` executable (installed into ``${prefix}/components/bin``).
+Alternatively, ``libSubStractCaptureImage.so`` can be loaded into a manager, using the
+initialisation function ``SubStractCaptureImageInit``. This shared object can be found in
+``${prefix}/components/lib`` or ``${prefix}/components/lib64``.
+
+
+Configuration
+=============
+
+The available configuration parameters are described below:
+
+================ ================== ================ ======
+Parameter        Data type          Default Value    Effect
+================ ================== ================ ======
+================ ================== ================ ======
+
+Ports
+=====
+
+The ports provided by the component are described below:
+
+=============== =========== ============================== =======
+Name            Type        Data type                      Purpose
+=============== =========== ============================== =======
+original_image  InPort      RTC::CameraImage               
+output_image    OutPort     RTC::CameraImage               
+foreMaskImg     OutPort     RTC::CameraImage               
+stillMaskImg    OutPort     RTC::CameraImage               
+backGroundImg   OutPort     RTC::CameraImage               
+stillImg        OutPort     RTC::CameraImage               
+=============== =========== ============================== =======
+
+Examples
+========
+
+An example configuration file is provided in the
+``${prefix}/components/share/SubStractCaptureImage/examples/conf/`` directory.
+
+Changelog
+=========
+
+
+
+License
+=======
+
+This software is developed at the National Institute of Advanced
+Industrial Science and Technology. Approval number H23PRO-????. This
+software is licensed under the Lesser General Public License. See
+COPYING.LESSER.
+

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/content/index_j.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/content/index_j.txt	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/doc/content/index_j.txt	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,138 +1,135 @@
-SubStractCaptureImage - 日本語
-=======================
-
-
-はじめに
-========
-
-クラスについては、 `APIドキュメンテーション`_ に参照してください。
-
-.. _`APIドキュメンテーション`:
-   doxygen/html/index.html
-
-条件
-====
-
-SubStractCaptureImageはOpenRTM-aist 1.0.0以上のC++版が必要です。
-
-SubStractCaptureImageは CMake_ を使います。CMake 2.8以上が必要です。
-
-.. _CMAke:
-   http://www.cmake.org
-
-インストール
-============
-
-インストーラ
-------------
-
-Windowsのユーザはインストーラパッケージを使用してコンポーネントをインストール
-することができます。これはコンポーネント及びそのすべての必要なライブラリを
-インストールします。Windowsでインストールする場合、インストーラの使用を推奨してます。
-
-- インストーラをダウンロードしてください。
-- インストールを始めるためにインストーラをダブルクリックしてください。
-- 指示にしたがってコンポーネントをインストールしてください。
-- 環境変数の変更を適用するため、コンポーネントを使用する前にコンピューターを
-  再起動する必要があるかもしれません。
-
-SubStractCaptureImageは ``SubStractCaptureImageComp`` の実行をダブルクリックして実行することが
-できます。あるいは、 ``SubStractCaptureImage`` を初期化関数の ``SubStractCaptureImageInit`` を利用して、
-マネージャにロードすることができます。
-
-ソースから
-----------
-
-ソースを使う場合は以下の手順でインストールしてください。
-
-- ソースをダウンロードして解凍してください::
-
-    tar -xvzf SubStractCaptureImage-1.0.0.tar.gz
-
-- 解凍されたフォルダに入ってください::
-
-    cd SubStractCaptureImage-1.0.0
-
-- ``build`` フォルダを作ってください::
-
-    mkdir build
-
-- `` build`` フォルダに入ってください::
-
-    cd build
-
-- CMakeを実行してください::
-
-    cmake ../
-
-- エラーが出無い場合、makeを実行してください::
-
-    make
-
-- ``make install`` でコンポーネントをインストールしてください。選択された
-  インストール場所に書き込み権限があるかを確認してください::
-
-  ``make install``
-
-- インストールする場所はccmakeを実行して ``CMAKE_INSTALL_PREFIX`` を
-  設定することで変更が可能です。
-
-    ccmake ../
-
-ここまでで、コンポーネントが使えるようになりました。コンフィグレーションは次のセクションを
-参照してください。
-
-SubStractCaptureImageは ``SubStractCaptureImageComp`` を実行( ``${prefix}/components/bin`` に
-インストールされます)することでスタンドアローンモードで実行することができます。
-あるいは、 ``libSubStractCaptureImage.so`` を初期化関数の ``SubStractCaptureImageInit`` を利用して、
-マネージャにロードすることができます。このライブラリは ``${prefix}/components/lib`` 
-または ``${prefix}/components/lib64`` にインストールされます。
-
-
-コンフィグレーション
-====================
-
-使えるコンフィグレーションパラメータは以下のテーブルを参照
-してください。
-
-================ ================== ================ ====
-パラメータ       データ型           デフォルト値     意味
-================ ================== ================ ====
-output_mode      int                0                
-image_height     int                240              
-image_width      int                320              
-================ ================== ================ ====
-
-ポート
-======
-
-コンポーネントによって提供されるポートは以下のテーブルで述べられています。
-
-=============== =========== ============================== ====
-ポート名        ポート型    データ型                       意味
-=============== =========== ============================== ====
-original_image  InPort      RTC::CameraImage               
-output_image    OutPort     RTC::CameraImage               
-foreMaskImg     OutPort     RTC::CameraImage               
-stillMaskImg    OutPort     RTC::CameraImage               
-backGroundImg   OutPort     RTC::CameraImage               
-stillImg        OutPort     RTC::CameraImage               
-=============== =========== ============================== ====
-
-例
-==
-
-例のrtc.confファイルは ``${prefix}/components/share/SubStractCaptureImage/examples/conf/``
-フォルダにインストールされています。
-
-Changelog
-=========
-
-
-License
-=======
-
-このソフトウェアは産業技術総合研究所で開発されています。承認番号はH23PRO-????
-です。このソフトウェアは Lesser General Public License (LGPL) ライセンスとして
-公開されてます。COPYING.LESSER を参照してください。
-
+SubStractCaptureImage - 日本語
+=======================
+
+
+はじめに
+========
+
+クラスについては、 `APIドキュメンテーション`_ に参照してください。
+
+.. _`APIドキュメンテーション`:
+   doxygen/html/index.html
+
+条件
+====
+
+SubStractCaptureImageはOpenRTM-aist 1.0.0以上のC++版が必要です。
+
+SubStractCaptureImageは CMake_ を使います。CMake 2.8以上が必要です。
+
+.. _CMAke:
+   http://www.cmake.org
+
+インストール
+============
+
+インストーラ
+------------
+
+Windowsのユーザはインストーラパッケージを使用してコンポーネントをインストール
+することができます。これはコンポーネント及びそのすべての必要なライブラリを
+インストールします。Windowsでインストールする場合、インストーラの使用を推奨してます。
+
+- インストーラをダウンロードしてください。
+- インストールを始めるためにインストーラをダブルクリックしてください。
+- 指示にしたがってコンポーネントをインストールしてください。
+- 環境変数の変更を適用するため、コンポーネントを使用する前にコンピューターを
+  再起動する必要があるかもしれません。
+
+SubStractCaptureImageは ``SubStractCaptureImageComp`` の実行をダブルクリックして実行することが
+できます。あるいは、 ``SubStractCaptureImage`` を初期化関数の ``SubStractCaptureImageInit`` を利用して、
+マネージャにロードすることができます。
+
+ソースから
+----------
+
+ソースを使う場合は以下の手順でインストールしてください。
+
+- ソースをダウンロードして解凍してください::
+
+    tar -xvzf SubStractCaptureImage-1.0.0.tar.gz
+
+- 解凍されたフォルダに入ってください::
+
+    cd SubStractCaptureImage-1.0.0
+
+- ``build`` フォルダを作ってください::
+
+    mkdir build
+
+- `` build`` フォルダに入ってください::
+
+    cd build
+
+- CMakeを実行してください::
+
+    cmake ../
+
+- エラーが出無い場合、makeを実行してください::
+
+    make
+
+- ``make install`` でコンポーネントをインストールしてください。選択された
+  インストール場所に書き込み権限があるかを確認してください::
+
+  ``make install``
+
+- インストールする場所はccmakeを実行して ``CMAKE_INSTALL_PREFIX`` を
+  設定することで変更が可能です。
+
+    ccmake ../
+
+ここまでで、コンポーネントが使えるようになりました。コンフィグレーションは次のセクションを
+参照してください。
+
+SubStractCaptureImageは ``SubStractCaptureImageComp`` を実行( ``${prefix}/components/bin`` に
+インストールされます)することでスタンドアローンモードで実行することができます。
+あるいは、 ``libSubStractCaptureImage.so`` を初期化関数の ``SubStractCaptureImageInit`` を利用して、
+マネージャにロードすることができます。このライブラリは ``${prefix}/components/lib`` 
+または ``${prefix}/components/lib64`` にインストールされます。
+
+
+コンフィグレーション
+====================
+
+使えるコンフィグレーションパラメータは以下のテーブルを参照
+してください。
+
+================ ================== ================ ====
+パラメータ       データ型           デフォルト値     意味
+================ ================== ================ ====
+================ ================== ================ ====
+
+ポート
+======
+
+コンポーネントによって提供されるポートは以下のテーブルで述べられています。
+
+=============== =========== ============================== ====
+ポート名        ポート型    データ型                       意味
+=============== =========== ============================== ====
+original_image  InPort      RTC::CameraImage               
+output_image    OutPort     RTC::CameraImage               
+foreMaskImg     OutPort     RTC::CameraImage               
+stillMaskImg    OutPort     RTC::CameraImage               
+backGroundImg   OutPort     RTC::CameraImage               
+stillImg        OutPort     RTC::CameraImage               
+=============== =========== ============================== ====
+
+例
+==
+
+例のrtc.confファイルは ``${prefix}/components/share/SubStractCaptureImage/examples/conf/``
+フォルダにインストールされています。
+
+Changelog
+=========
+
+
+License
+=======
+
+このソフトウェアは産業技術総合研究所で開発されています。承認番号はH23PRO-????
+です。このソフトウェアは Lesser General Public License (LGPL) ライセンスとして
+公開されてます。COPYING.LESSER を参照してください。
+

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/idl/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/idl/CMakeLists.txt	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/idl/CMakeLists.txt	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,56 +1,56 @@
-set(idls )
-
-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
-        ${_dir}/${_idl}DynSK.cc)
-endmacro(_IDL_OUTPUTS)
-
-macro(_COMPILE_IDL _idl_file)
-    if(NOT WIN32)
-        execute_process(COMMAND rtm-config --prefix OUTPUT_VARIABLE OPENRTM_DIR
-        OUTPUT_STRIP_TRAILING_WHITESPACE)
-        execute_process(COMMAND rtm-config --idlflags OUTPUT_VARIABLE OPENRTM_IDLFLAGS
-        OUTPUT_STRIP_TRAILING_WHITESPACE)
-        separate_arguments(OPENRTM_IDLFLAGS)
-        execute_process(COMMAND rtm-config --idlc OUTPUT_VARIABLE OPENRTM_IDLC
-        OUTPUT_STRIP_TRAILING_WHITESPACE)
-        set(_rtm_skelwrapper_command "rtm-skelwrapper")
-    else(NOT WIN32)
-        set(_rtm_skelwrapper_command "rtm-skelwrapper.py")
-    endif(NOT WIN32)
-    get_filename_component(_idl ${_idl_file} NAME_WE)
-    set(_idl_srcs_var ${_idl}_SRCS)
-    _IDL_OUTPUTS(${_idl} ${CMAKE_CURRENT_BINARY_DIR} ${_idl_srcs_var})
-
-    add_custom_command(OUTPUT ${${_idl_srcs_var}}
-        COMMAND python ${OPENRTM_DIR}/bin/${_rtm_skelwrapper_command} --include-dir= --skel-suffix=Skel --stub-suffix=Stub --idl-file=${_idl}.idl
-        COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${_idl_file}
-        WORKING_DIRECTORY ${CURRENT_BINARY_DIR}
-        DEPENDS ${_idl_file}
-        COMMENT "Compiling ${_idl_file}" VERBATIM)
-    add_custom_target(${_idl}_TGT DEPENDS ${${_idl_srcs_var}})
-    set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${${_idl_srcs_var}})
-    if(NOT TARGET ALL_IDL_TGT)
-        add_custom_target(ALL_IDL_TGT)
-    endif(NOT TARGET ALL_IDL_TGT)
-    add_dependencies(ALL_IDL_TGT ${_idl}_TGT)
-endmacro(_COMPILE_IDL)
-
-# Module exposed to the user
-macro(OPENRTM_COMPILE_IDL_FILES)
-    foreach(idl ${ARGN})
-        _COMPILE_IDL(${idl})
-    endforeach(idl)
-endmacro(OPENRTM_COMPILE_IDL_FILES)
-
-
-OPENRTM_COMPILE_IDL_FILES(${idls})
-set(ALL_IDL_SRCS ${ALL_IDL_SRCS} PARENT_SCOPE)
+set(idls )
+
+#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
+        ${_dir}/${_idl}DynSK.cc)
+endmacro(_IDL_OUTPUTS)
+
+macro(_COMPILE_IDL _idl_file)
+    if(NOT WIN32)
+        execute_process(COMMAND rtm-config --prefix OUTPUT_VARIABLE OPENRTM_DIR
+        OUTPUT_STRIP_TRAILING_WHITESPACE)
+        execute_process(COMMAND rtm-config --idlflags OUTPUT_VARIABLE OPENRTM_IDLFLAGS
+        OUTPUT_STRIP_TRAILING_WHITESPACE)
+        separate_arguments(OPENRTM_IDLFLAGS)
+        execute_process(COMMAND rtm-config --idlc OUTPUT_VARIABLE OPENRTM_IDLC
+        OUTPUT_STRIP_TRAILING_WHITESPACE)
+        set(_rtm_skelwrapper_command "rtm-skelwrapper")
+    else(NOT WIN32)
+        set(_rtm_skelwrapper_command "rtm-skelwrapper.py")
+    endif(NOT WIN32)
+    get_filename_component(_idl ${_idl_file} NAME_WE)
+    set(_idl_srcs_var ${_idl}_SRCS)
+    _IDL_OUTPUTS(${_idl} ${CMAKE_CURRENT_BINARY_DIR} ${_idl_srcs_var})
+
+    add_custom_command(OUTPUT ${${_idl_srcs_var}}
+        COMMAND python ${OPENRTM_DIR}/bin/${_rtm_skelwrapper_command} --include-dir= --skel-suffix=Skel --stub-suffix=Stub --idl-file=${_idl}.idl
+        COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${_idl_file}
+        WORKING_DIRECTORY ${CURRENT_BINARY_DIR}
+        DEPENDS ${_idl_file}
+        COMMENT "Compiling ${_idl_file}" VERBATIM)
+    add_custom_target(${_idl}_TGT DEPENDS ${${_idl_srcs_var}})
+    set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${${_idl_srcs_var}})
+    if(NOT TARGET ALL_IDL_TGT)
+        add_custom_target(ALL_IDL_TGT)
+    endif(NOT TARGET ALL_IDL_TGT)
+    add_dependencies(ALL_IDL_TGT ${_idl}_TGT)
+endmacro(_COMPILE_IDL)
+
+# Module exposed to the user
+macro(OPENRTM_COMPILE_IDL_FILES)
+    foreach(idl ${ARGN})
+        _COMPILE_IDL(${idl})
+    endforeach(idl)
+endmacro(OPENRTM_COMPILE_IDL_FILES)
+
+
+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)
-
+#install(FILES ${idl_headers}
+#    DESTINATION ${INC_INSTALL_DIR}/${PROJECT_NAME_LOWER}/idl
+#    COMPONENT headers)
+

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/include/SubStractCaptureImage/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/include/SubStractCaptureImage/CMakeLists.txt	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/include/SubStractCaptureImage/CMakeLists.txt	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,7 +1,7 @@
 set(hdrs SubStractCaptureImage.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/SubStractCaptureImage/include/SubStractCaptureImage/SubStractCaptureImage.h
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/include/SubStractCaptureImage/SubStractCaptureImage.h	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/include/SubStractCaptureImage/SubStractCaptureImage.h	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,364 +1,345 @@
-// -*- C++ -*-
-/*!
- * @file  SubStractCaptureImage.h
- * @brief SubStractCaptureImage component
- * @date  $Date$
- *
- * $Id$
- */
-
-#ifndef SUBSTRACTCAPTUREIMAGE_H
-#define SUBSTRACTCAPTUREIMAGE_H
-
-#include <rtm/Manager.h>
-#include <rtm/DataFlowComponentBase.h>
-#include <rtm/CorbaPort.h>
-#include <rtm/DataInPort.h>
-#include <rtm/DataOutPort.h>
-#include <rtm/idl/BasicDataTypeSkel.h>
-#include <rtm/idl/ExtendedDataTypesSkel.h>
-#include <rtm/idl/InterfaceDataTypesSkel.h>
-
-#include <cv.h>
-#include <cxcore.h>
-#include <highgui.h>
-
-#define	MASK_THRESHOLD		1	//	backgroundMaskImage‚âstillObjectMaskImage‚𐶐¬‚·‚邽‚ß‚Ì臒l
-#define THRESHOLD_MAX_VALUE	255	//	2’l‰»‚̍ۂɎg—p‚·‚éÅ‘å’l
-
-#define	BACKGROUND_ALPHA				0.01	//	”wŒiXV‚̍ۂ̍¬‡”ä—¦
-#define	BACKGROUND_INITIAL_THRESHOLD	20		//	”wŒi‚̏‰Šú臒l
-
-#define	STILL_OBJECT_ALPHA				0.1		//	ÃŽ~•¨‘̍XV‚̍ۂ̍¬‡”ä—¦
-#define	STILL_OBJECT_INITIAL_THRESHOLD	255		//	ÃŽ~•¨‘̂̏‰Šú臒l
-
-#define	THRESHOLD_COEFFICIENT	5.0	//	臒l‚Ì’l‚ðˆø‚­Û‚ÌŽg—p‚·‚é臒l‚É‚©‚¯‚鐔
-
-#define	NOT_STILL_DEC_STEP			10	//	“®‚¢‚½ê‡‚̃JƒEƒ“ƒ^Œ¸ŽZ—Ê
-#define	STILL_OBJECT_TO_BACKGROUND	100	//	”wŒi‚Æ‚µ‚č̗p‚·‚éŠî€
-
-
-// Service implementation headers
-// <rtc-template block="service_impl_h">
-
-// </rtc-template>
-
-// Service Consumer stub headers
-// <rtc-template block="consumer_stub_h">
-
-// </rtc-template>
-
-using namespace RTC;
-
-/*!
- * @class SubStractCaptureImage
- * @brief SubStractCaptureImage component
- *
- */
-class SubStractCaptureImage
-  : public RTC::DataFlowComponentBase
-{
- public:
-  /*!
-   * @brief constructor
-   * @param manager Maneger Object
-   */
-  SubStractCaptureImage(RTC::Manager* manager);
-
-  /*!
-   * @brief destructor
-   */
-  ~SubStractCaptureImage();
-
-  // <rtc-template block="public_attribute">
-  
-  // </rtc-template>
-
-  // <rtc-template block="public_operation">
-  
-  // </rtc-template>
-
-  /***
-   *
-   * The initialize action (on CREATED->ALIVE transition)
-   * formaer rtc_init_entry() 
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-   virtual RTC::ReturnCode_t onInitialize();
-
-  /***
-   *
-   * The finalize action (on ALIVE->END transition)
-   * formaer rtc_exiting_entry()
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-  // virtual RTC::ReturnCode_t onFinalize();
-
-  /***
-   *
-   * The startup action when ExecutionContext startup
-   * former rtc_starting_entry()
-   *
-   * @param ec_id target ExecutionContext Id
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
-
-  /***
-   *
-   * The shutdown action when ExecutionContext stop
-   * former rtc_stopping_entry()
-   *
-   * @param ec_id target ExecutionContext Id
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
-
-  /***
-   *
-   * The activated action (Active state entry action)
-   * former rtc_active_entry()
-   *
-   * @param ec_id target ExecutionContext Id
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-   virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
-
-  /***
-   *
-   * The deactivated action (Active state exit action)
-   * former rtc_active_exit()
-   *
-   * @param ec_id target ExecutionContext Id
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-   virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
-
-  /***
-   *
-   * The execution action that is invoked periodically
-   * former rtc_active_do()
-   *
-   * @param ec_id target ExecutionContext Id
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-   virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
-
-  /***
-   *
-   * The aborting action when main logic error occurred.
-   * former rtc_aborting_entry()
-   *
-   * @param ec_id target ExecutionContext Id
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
-
-  /***
-   *
-   * The error action in ERROR state
-   * former rtc_error_do()
-   *
-   * @param ec_id target ExecutionContext Id
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
-
-  /***
-   *
-   * The reset action that is invoked resetting
-   * This is same but different the former rtc_init_entry()
-   *
-   * @param ec_id target ExecutionContext Id
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
-  
-  /***
-   *
-   * The state update action that is invoked after onExecute() action
-   * no corresponding operation exists in OpenRTm-aist-0.2.0
-   *
-   * @param ec_id target ExecutionContext Id
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
-
-  /***
-   *
-   * The action that is invoked when execution context's rate is changed
-   * no corresponding operation exists in OpenRTm-aist-0.2.0
-   *
-   * @param ec_id target ExecutionContext Id
-   *
-   * @return RTC::ReturnCode_t
-   * 
-   * 
-   */
-  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
-
-
- protected:
-  // <rtc-template block="protected_attribute">
-  
-  // </rtc-template>
-
-  // <rtc-template block="protected_operation">
-  
-  // </rtc-template>
-
-  // Configuration variable declaration
-  // <rtc-template block="config_declare">
-  /*!
-   * 
-   * - Name:  output_mode
-   * - DefaultValue: 0
-   */
-  int m_output_mode;
-  /*!
-   * 
-   * - Name:  img_height
-   * - DefaultValue: 240
-   */
-  int m_img_height;
-  /*!
-   * 
-   * - Name:  img_width
-   * - DefaultValue: 320
-   */
-  int m_img_width;
-
-  // </rtc-template>
-
-  // DataInPort declaration
-  // <rtc-template block="inport_declare">
-  RTC::CameraImage m_image_orig;
-  /*!
-   */
-  InPort<RTC::CameraImage> m_image_origIn;
-  
-  // </rtc-template>
-
-
-  // DataOutPort declaration
-  // <rtc-template block="outport_declare">
-  RTC::CameraImage m_image_out;
-  /*!
-   */
-  OutPort<RTC::CameraImage> m_image_outOut;
-  RTC::CameraImage m_foreMaskImg;
-  /*!
-   */
-  OutPort<RTC::CameraImage> m_foreMaskImgOut;
-  RTC::CameraImage m_stillMaskImg;
-  /*!
-   */
-  OutPort<RTC::CameraImage> m_stillMaskImgOut;
-  RTC::CameraImage m_backGroundImg;
-  /*!
-   */
-  OutPort<RTC::CameraImage> m_backGroundImgOut;
-  RTC::CameraImage m_stillImg;
-  /*!
-   */
-  OutPort<RTC::CameraImage> m_stillImgOut;
-  
-  // </rtc-template>
-
-  // CORBA Port declaration
-  // <rtc-template block="corbaport_declare">
-  
-  // </rtc-template>
-
-  // Service declaration
-  // <rtc-template block="service_declare">
-  
-  // </rtc-template>
-
-  // Consumer declaration
-  // <rtc-template block="consumer_declare">
-  
-  // </rtc-template>
-
- private:
-  // <rtc-template block="private_attribute">
-  
-  // </rtc-template>
-
-  // <rtc-template block="private_operation">
-  
-  // </rtc-template>
-	//	‰æ‘œ‚𐶐¬‚·‚é
-	IplImage* inputImage;
-	IplImage* backgroundAverageImage;		//	”wŒi‚Ì•½‹Ï’l•Û‘¶—pIplImage
-	IplImage* backgroundThresholdImage;		//	”wŒi‚Ì臒l•Û‘¶—pIplImage
-	IplImage* stillObjectAverageImage;		//	ÃŽ~•¨‘Ì‚Ì•½‹Ï’l•Û‘¶—pIplImage
-	IplImage* stillObjectThresholdImage;		//	ÃŽ~•¨‘Ì‚Ì臒l•Û‘¶—pIplImage
-	IplImage* stillObjectCounterImage;		//	ÃŽ~•¨‘̂̃JƒEƒ“ƒ^—pIplImage
-	IplImage* backgroundDifferenceImage;		//	”wŒi·•ª‰æ‘œ—pIplImage
-	IplImage* stillObjectDifferenceImage;	//	ÃŽ~•¨‘̍·•ª‰æ‘œ—pIplIMage
-	IplImage* thresholdImage32;				//	32bit‚Ì臒l‰æ‘œ—pIplImage
-	IplImage* thresholdImage;					//	臒l‰æ‘œ—pIplImage
-	IplImage* resultImage;					//	Œ‹‰Ê‰æ‘œ—pIplImage
-	IplImage* backgroundMaskImage;			//	”wŒiƒ}ƒXƒN‰æ‘œ—pIplImage
-	IplImage* foregroundMaskImage;			//	‘OŒiƒ}ƒXƒN—pIplImage
-	IplImage* stillObjectMaskImage;			//	ÃŽ~•¨‘̃}ƒXƒN—pIplImage
-	IplImage* movingObjectMask;				//	“®•¨‘̃}ƒXƒN—pIplImage
-	IplImage* backgroundCopyMaskImage;		//	”wŒi‚ɃRƒs[‚·‚éÛ‚ÉŽg—p‚·‚éƒ}ƒXƒN—pIplImage
-	IplImage* tmpMaskImage;					//	ƒeƒ“ƒ|ƒ‰ƒŠ—pIplImage
-	IplImage* tmp2MaskImage;					//	ƒeƒ“ƒ|ƒ‰ƒŠ—pIplImage(‚»‚Ì2)
-	IplImage* frameImage32;					//	32bit‚̃Lƒƒƒvƒ`ƒƒ‚µ‚½‰æ‘œ—pIplImage
-	IplImage* backgroundImage;				//	”wŒi‰æ‘œ—pIplImage
-	IplImage* stillObjectImage;				//	ÃŽ~•¨‘̉摜—pIplImage
-	IplImage* outputImage;
-
-	IplImage* foreGroundMaskBuff;
-	IplImage* stillObjectMaskBuff;
-	IplImage* backGroundBuff;
-	IplImage* stillObjectImageBuff;
-	IplImage* stillObjectCounterBuff;
-
-	int key;					//	ƒL[“ü—Í—p‚̕ϐ”
-	//int count;
-};
-
-
-extern "C"
-{
-  DLL_EXPORT void SubStractCaptureImageInit(RTC::Manager* manager);
-};
-
-#endif // SUBSTRACTCAPTUREIMAGE_H
+// -*- C++ -*-
+/*!
+ * @file  SubStractCaptureImage.h
+ * @brief SubStractCaptureImage component
+ * @date  $Date$
+ *
+ * $Id$
+ */
+
+#ifndef SUBSTRACTCAPTUREIMAGE_H
+#define SUBSTRACTCAPTUREIMAGE_H
+
+#include <rtm/Manager.h>
+#include <rtm/DataFlowComponentBase.h>
+#include <rtm/CorbaPort.h>
+#include <rtm/DataInPort.h>
+#include <rtm/DataOutPort.h>
+#include <rtm/idl/BasicDataTypeSkel.h>
+#include <rtm/idl/ExtendedDataTypesSkel.h>
+#include <rtm/idl/InterfaceDataTypesSkel.h>
+
+#include <cv.h>
+#include <cxcore.h>
+#include <highgui.h>
+
+#define	MASK_THRESHOLD		1       /* backgroundMaskImageやstillObjectMaskImageを生成するための閾値 */
+#define THRESHOLD_MAX_VALUE	255   /* 2値化の際に使用する最大値 */
+
+#define	BACKGROUND_ALPHA				0.01      /* 背景更新の際の混合比率 */
+#define	BACKGROUND_INITIAL_THRESHOLD	20  /* 背景の初期閾値 */
+
+#define	STILL_OBJECT_ALPHA				0.1     /* 静止物体更新の際の混合比率 */
+#define	STILL_OBJECT_INITIAL_THRESHOLD	255 /* 静止物体の初期閾値 */
+
+#define	THRESHOLD_COEFFICIENT	5.0   /* 閾値の値を引く際の使用する閾値にかける数 */
+
+#define	NOT_STILL_DEC_STEP			10	/* 動いた場合のカウンタ減算量 */
+#define	STILL_OBJECT_TO_BACKGROUND	100 /* 背景として採用する基準 */
+
+
+// Service implementation headers
+// <rtc-template block="service_impl_h">
+
+// </rtc-template>
+
+// Service Consumer stub headers
+// <rtc-template block="consumer_stub_h">
+
+// </rtc-template>
+
+using namespace RTC;
+
+/*!
+ * @class SubStractCaptureImage
+ * @brief SubStractCaptureImage component
+ *
+ */
+class SubStractCaptureImage
+  : public RTC::DataFlowComponentBase
+{
+ public:
+  /*!
+   * @brief constructor
+   * @param manager Maneger Object
+   */
+  SubStractCaptureImage(RTC::Manager* manager);
+
+  /*!
+   * @brief destructor
+   */
+  ~SubStractCaptureImage();
+
+  // <rtc-template block="public_attribute">
+  
+  // </rtc-template>
+
+  // <rtc-template block="public_operation">
+  
+  // </rtc-template>
+
+  /***
+   *
+   * The initialize action (on CREATED->ALIVE transition)
+   * formaer rtc_init_entry() 
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+   virtual RTC::ReturnCode_t onInitialize();
+
+  /***
+   *
+   * The finalize action (on ALIVE->END transition)
+   * formaer rtc_exiting_entry()
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+  // virtual RTC::ReturnCode_t onFinalize();
+
+  /***
+   *
+   * The startup action when ExecutionContext startup
+   * former rtc_starting_entry()
+   *
+   * @param ec_id target ExecutionContext Id
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
+
+  /***
+   *
+   * The shutdown action when ExecutionContext stop
+   * former rtc_stopping_entry()
+   *
+   * @param ec_id target ExecutionContext Id
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
+
+  /***
+   *
+   * The activated action (Active state entry action)
+   * former rtc_active_entry()
+   *
+   * @param ec_id target ExecutionContext Id
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+   virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
+
+  /***
+   *
+   * The deactivated action (Active state exit action)
+   * former rtc_active_exit()
+   *
+   * @param ec_id target ExecutionContext Id
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+   virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
+
+  /***
+   *
+   * The execution action that is invoked periodically
+   * former rtc_active_do()
+   *
+   * @param ec_id target ExecutionContext Id
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+   virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
+
+  /***
+   *
+   * The aborting action when main logic error occurred.
+   * former rtc_aborting_entry()
+   *
+   * @param ec_id target ExecutionContext Id
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
+
+  /***
+   *
+   * The error action in ERROR state
+   * former rtc_error_do()
+   *
+   * @param ec_id target ExecutionContext Id
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
+
+  /***
+   *
+   * The reset action that is invoked resetting
+   * This is same but different the former rtc_init_entry()
+   *
+   * @param ec_id target ExecutionContext Id
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
+  
+  /***
+   *
+   * The state update action that is invoked after onExecute() action
+   * no corresponding operation exists in OpenRTm-aist-0.2.0
+   *
+   * @param ec_id target ExecutionContext Id
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
+
+  /***
+   *
+   * The action that is invoked when execution context's rate is changed
+   * no corresponding operation exists in OpenRTm-aist-0.2.0
+   *
+   * @param ec_id target ExecutionContext Id
+   *
+   * @return RTC::ReturnCode_t
+   * 
+   * 
+   */
+  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
+
+
+ protected:
+  // <rtc-template block="protected_attribute">
+  
+  // </rtc-template>
+
+  // <rtc-template block="protected_operation">
+  
+  // </rtc-template>
+
+  // Configuration variable declaration
+  // <rtc-template block="config_declare">
+
+  // </rtc-template>
+
+  // DataInPort declaration
+  // <rtc-template block="inport_declare">
+  RTC::CameraImage m_image_orig;
+  /*!
+   */
+  InPort<RTC::CameraImage> m_image_origIn;
+  
+  // </rtc-template>
+
+
+  // DataOutPort declaration
+  // <rtc-template block="outport_declare">
+  RTC::CameraImage m_image_out;
+  /*!
+   */
+  OutPort<RTC::CameraImage> m_image_outOut;
+  RTC::CameraImage m_foreMaskImg;
+  /*!
+   */
+  OutPort<RTC::CameraImage> m_foreMaskImgOut;
+  RTC::CameraImage m_stillMaskImg;
+  /*!
+   */
+  OutPort<RTC::CameraImage> m_stillMaskImgOut;
+  RTC::CameraImage m_backGroundImg;
+  /*!
+   */
+  OutPort<RTC::CameraImage> m_backGroundImgOut;
+  RTC::CameraImage m_stillImg;
+  /*!
+   */
+  OutPort<RTC::CameraImage> m_stillImgOut;
+  
+  // </rtc-template>
+
+  // CORBA Port declaration
+  // <rtc-template block="corbaport_declare">
+  
+  // </rtc-template>
+
+  // Service declaration
+  // <rtc-template block="service_declare">
+  
+  // </rtc-template>
+
+  // Consumer declaration
+  // <rtc-template block="consumer_declare">
+  
+  // </rtc-template>
+
+ private:
+  // <rtc-template block="private_attribute">
+  
+  // </rtc-template>
+
+  // <rtc-template block="private_operation">
+  
+  // </rtc-template>
+
+  IplImage* inputImage;
+  IplImage* backgroundAverageImage;     /* 背景の平均値保存用IplImage */
+  IplImage* backgroundThresholdImage;   /* 背景の閾値保存用IplImage */
+  IplImage* stillObjectAverageImage;    /* 静止物体の平均値保存用IplImage */
+  IplImage* stillObjectThresholdImage;  /* 静止物体の閾値保存用IplImage */
+  IplImage* stillObjectCounterImage;    /* 静止物体のカウンタ用IplImage */
+  IplImage* backgroundDifferenceImage;  /* 背景差分画像用IplImage */
+  IplImage* stillObjectDifferenceImage; /* 静止物体差分画像用IplIMage */
+  IplImage* thresholdImage32;           /* 32bitの閾値画像用IplImage */
+  IplImage* thresholdImage;             /* 閾値画像用IplImage */
+  IplImage* resultImage;                /* 結果画像用IplImage */
+  IplImage* backgroundMaskImage;        /* 背景マスク画像用IplImage */
+  IplImage* foregroundMaskImage;        /* 前景マスク用IplImage */
+  IplImage* stillObjectMaskImage;       /* 静止物体マスク用IplImage */
+  IplImage* movingObjectMask;           /* 動物体マスク用IplImage */
+  IplImage* backgroundCopyMaskImage;    /* 背景にコピーする際に使用するマスク用IplImage */
+  IplImage* tmpMaskImage;       /* テンポラリ用IplImage */
+  IplImage* tmp2MaskImage;      /* テンポラリ用IplImage(その2) */
+  IplImage* frameImage32;       /* 32bitのキャプチャした画像用IplImage */
+  IplImage* backgroundImage;    /* 背景画像用IplImage */
+  IplImage* stillObjectImage;   /* 静止物体画像用IplImage */
+  IplImage* outputImage;
+
+  IplImage* foreGroundMaskBuff;
+  IplImage* stillObjectMaskBuff;
+  IplImage* backGroundBuff;
+  IplImage* stillObjectImageBuff;
+  IplImage* stillObjectCounterBuff;
+
+  int key;    /* キー入力用の変数 */
+};
+
+
+extern "C"
+{
+  DLL_EXPORT void SubStractCaptureImageInit(RTC::Manager* manager);
+};
+
+#endif // SUBSTRACTCAPTUREIMAGE_H

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/src/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/src/CMakeLists.txt	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/src/CMakeLists.txt	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,63 +1,69 @@
-set(comp_srcs SubStractCaptureImage.cpp )
-set(standalone_srcs SubStractCaptureImageComp.cpp)
-
+set(comp_srcs SubStractCaptureImage.cpp )
+set(standalone_srcs SubStractCaptureImageComp.cpp)
+
 find_package(OpenCV REQUIRED)
 
-if (DEFINED OPENRTM_INCLUDE_DIRS)
-  string(REGEX REPLACE "-I" ";"
-    OPENRTM_INCLUDE_DIRS "${OPENRTM_INCLUDE_DIRS}")
-  string(REGEX REPLACE " ;" ";"
-    OPENRTM_INCLUDE_DIRS "${OPENRTM_INCLUDE_DIRS}")
-endif (DEFINED OPENRTM_INCLUDE_DIRS)
-
-if (DEFINED OPENRTM_LIBRARY_DIRS)
-  string(REGEX REPLACE "-L" ";"
-    OPENRTM_LIBRARY_DIRS "${OPENRTM_LIBRARY_DIRS}")
-  string(REGEX REPLACE " ;" ";"
-    OPENRTM_LIBRARY_DIRS "${OPENRTM_LIBRARY_DIRS}")
-endif (DEFINED OPENRTM_LIBRARY_DIRS)
-
-if (DEFINED OPENRTM_LIBRARIES)
-  string(REGEX REPLACE "-l" ";"
-    OPENRTM_LIBRARIES "${OPENRTM_LIBRARIES}")
-  string(REGEX REPLACE " ;" ";"
-    OPENRTM_LIBRARIES "${OPENRTM_LIBRARIES}")
-endif (DEFINED OPENRTM_LIBRARIES)
-
-include_directories(${PROJECT_SOURCE_DIR}/include)
-include_directories(${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME})
-include_directories(${PROJECT_BINARY_DIR})
-include_directories(${PROJECT_BINARY_DIR}/idl)
-include_directories(${OPENRTM_INCLUDE_DIRS})
-include_directories(${OMNIORB_INCLUDE_DIRS})
-add_definitions(${OPENRTM_CFLAGS})
-add_definitions(${OMNIORB_CFLAGS})
-
-MAP_ADD_STR(comp_hdrs "../" comp_headers)
-
-link_directories(${OPENRTM_LIBRARY_DIRS})
-link_directories(${OMNIORB_LIBRARY_DIRS})
-
-add_library(${PROJECT_NAME} ${LIB_TYPE} ${comp_srcs}
-  ${comp_headers} ${ALL_IDL_SRCS})
-set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
-set_source_files_properties(${ALL_IDL_SRCS} PROPERTIES GENERATED 1)
-add_dependencies(${PROJECT_NAME} ALL_IDL_TGT)
+if (DEFINED OPENRTM_INCLUDE_DIRS)
+  string(REGEX REPLACE "-I" ";"
+    OPENRTM_INCLUDE_DIRS "${OPENRTM_INCLUDE_DIRS}")
+  string(REGEX REPLACE " ;" ";"
+    OPENRTM_INCLUDE_DIRS "${OPENRTM_INCLUDE_DIRS}")
+endif (DEFINED OPENRTM_INCLUDE_DIRS)
+
+if (DEFINED OPENRTM_LIBRARY_DIRS)
+  string(REGEX REPLACE "-L" ";"
+    OPENRTM_LIBRARY_DIRS "${OPENRTM_LIBRARY_DIRS}")
+  string(REGEX REPLACE " ;" ";"
+    OPENRTM_LIBRARY_DIRS "${OPENRTM_LIBRARY_DIRS}")
+endif (DEFINED OPENRTM_LIBRARY_DIRS)
+
+if (DEFINED OPENRTM_LIBRARIES)
+  string(REGEX REPLACE "-l" ";"
+    OPENRTM_LIBRARIES "${OPENRTM_LIBRARIES}")
+  string(REGEX REPLACE " ;" ";"
+    OPENRTM_LIBRARIES "${OPENRTM_LIBRARIES}")
+endif (DEFINED OPENRTM_LIBRARIES)
+
+include_directories(${PROJECT_SOURCE_DIR}/include)
+include_directories(${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME})
+include_directories(${PROJECT_BINARY_DIR})
+include_directories(${PROJECT_BINARY_DIR}/idl)
+include_directories(${OPENRTM_INCLUDE_DIRS})
+include_directories(${OMNIORB_INCLUDE_DIRS})
+add_definitions(${OPENRTM_CFLAGS})
+add_definitions(${OMNIORB_CFLAGS})
+
+MAP_ADD_STR(comp_hdrs "../" comp_headers)
+
+link_directories(${OPENRTM_LIBRARY_DIRS})
+link_directories(${OMNIORB_LIBRARY_DIRS})
+
+add_library(${PROJECT_NAME} ${LIB_TYPE} ${comp_srcs}
+  ${comp_headers} ${ALL_IDL_SRCS})
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
+set_source_files_properties(${ALL_IDL_SRCS} PROPERTIES GENERATED 1)
+add_dependencies(${PROJECT_NAME} ALL_IDL_TGT)
 target_link_libraries(${PROJECT_NAME} ${OPENRTM_LIBRARIES} ${OpenCV_LIBS})
-
-add_executable(${PROJECT_NAME}Comp ${standalone_srcs}
-  ${comp_srcs} ${comp_headers} ${ALL_IDL_SRCS})
+
+add_executable(${PROJECT_NAME}Comp ${standalone_srcs}
+  ${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 ${INSTALL_PREFIX} COMPONENT component
+    LIBRARY DESTINATION ${INSTALL_PREFIX} COMPONENT component
+    ARCHIVE DESTINATION ${INSTALL_PREFIX} COMPONENT component)
+
 
-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)
-
 if (SolutionDir)
   if (MSVC)
     add_custom_command(

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/src/SubStractCaptureImage.cpp
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/src/SubStractCaptureImage.cpp	2014-03-17 06:39:18 UTC (rev 129)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/SubStractCaptureImage/src/SubStractCaptureImage.cpp	2014-03-17 08:36:10 UTC (rev 130)
@@ -1,598 +1,577 @@
-// -*- C++ -*-
-/*!
- * @file  SubStractCaptureImage.cpp
- * @brief SubStractCaptureImage component
- * @date $Date$
- *
- * $Id$
- */
-
-#include "SubStractCaptureImage.h"
-
-// Module specification
-// <rtc-template block="module_spec">
-static const char* substractcaptureimage_spec[] =
-  {
-    "implementation_id", "SubStractCaptureImage",
-    "type_name",         "SubStractCaptureImage",
-    "description",       "SubStractCaptureImage component",
-    "version",           "1.0.0",
-    "vendor",            "AIST",
-    "category",          "Category",
-    "activity_type",     "PERIODIC",
-    "kind",              "DataFlowComponent",
-    "max_instance",      "1",
-    "language",          "C++",
-    "lang_type",         "compile",
-    // Configuration variables
-    "conf.default.output_mode", "0",
-    "conf.default.image_height", "240",
-    "conf.default.image_width", "320",
-    // Widget
-    "conf.__widget__.output_mode", "text",
-    "conf.__widget__.image_height", "text",
-    "conf.__widget__.image_width", "text",
-    // Constraints
-    ""
-  };
-// </rtc-template>
-
-CvSize imageSize;
-
-//char *windowNameCapture = "Capture";					//	ƒLƒƒƒvƒ`ƒƒ‚µ‚½‰æ‘œ‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Ì–¼‘O
-//char *windowNameForeground  = "Foreground Mask";		//	‘OŒiƒ}ƒXƒN‰æ‘œ‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Ì–¼‘O
-//char *windowNameStillObjectMask  = "Still Object Mask";	//	ÃŽ~•¨‘̃}ƒXƒN‰æ‘œ‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Ì–¼‘O
-//char *windowNameBackground = "Background";				//	”wŒi‰æ‘œ‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Ì–¼‘O
-//char *windowNameStillObject  = "Still Object";			//	ÃŽ~•¨‘Ì‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Ì–¼‘O
-//char *windowNameCounter = "Counter";					//	ƒJƒEƒ“ƒ^‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Ì–¼‘O
-
-int g_temp_w = 0;
-int g_temp_h = 0;
-int SubStractCaptureImage_count = 0;
-
-void showFlipImage( char *windowName, IplImage *image ) {
-	if ( image->origin == 0 ) {
-		//cvFlip( image, image, 0 );
-		cvShowImage( windowName, image );
-		//cvFlip( image, image, 0 );
-	}
-}
-
-/*!
- * @brief constructor
- * @param manager Maneger Object
- */
-SubStractCaptureImage::SubStractCaptureImage(RTC::Manager* manager)
-    // <rtc-template block="initializer">
-  : RTC::DataFlowComponentBase(manager),
-    m_image_origIn("original_image", m_image_orig),
-    m_image_outOut("output_image", m_image_out),
-    m_foreMaskImgOut("foreMaskImg", m_foreMaskImg),
-    m_stillMaskImgOut("stillMaskImg", m_stillMaskImg),
-    m_backGroundImgOut("backGroundImg", m_backGroundImg),
-    m_stillImgOut("stillImg", m_stillImg)
-
-    // </rtc-template>
-{
-}
-
-/*!
- * @brief destructor
- */
-SubStractCaptureImage::~SubStractCaptureImage()
-{
-}
-
-
-
-RTC::ReturnCode_t SubStractCaptureImage::onInitialize()
-{
-  // Registration: InPort/OutPort/Service
-  // <rtc-template block="registration">
-  // Set InPort buffers
-  addInPort("original_image", m_image_origIn);
-  
-  // Set OutPort buffer
-  addOutPort("output_image", m_image_outOut);
-  addOutPort("foreMaskImg", m_foreMaskImgOut);
-  addOutPort("stillMaskImg", m_stillMaskImgOut);
-  addOutPort("backGroundImg", m_backGroundImgOut);
-  addOutPort("stillImg", m_stillImgOut);
-  
-  // Set service provider to Ports
-  
-  // Set service consumers to Ports
-  
-  // Set CORBA Service Ports
-  
-  // </rtc-template>
-
-  // <rtc-template block="bind_config">
-  // Bind variables and configuration variable
-  bindParameter("output_mode", m_output_mode, "0");
-  bindParameter("image_height", m_img_height, "240");
-  bindParameter("image_width", m_img_width, "320");
-  // </rtc-template>
-  
-  return RTC::RTC_OK;
-}
-
-/*
-RTC::ReturnCode_t SubStractCaptureImage::onFinalize()
-{
-  return RTC::RTC_OK;
-}
-*/
-
-/*
-RTC::ReturnCode_t SubStractCaptureImage::onStartup(RTC::UniqueId ec_id)
-{
-  return RTC::RTC_OK;
-}
-*/
-
-/*
-RTC::ReturnCode_t SubStractCaptureImage::onShutdown(RTC::UniqueId ec_id)
-{
-  return RTC::RTC_OK;
-}
-*/
-
-
-RTC::ReturnCode_t SubStractCaptureImage::onActivated(RTC::UniqueId ec_id)
-{
-	g_temp_w = 0;
-	g_temp_h = 0;
-	SubStractCaptureImage_count = 0;
-	
-	inputImage = NULL;
-	backgroundAverageImage = NULL;
-	backgroundThresholdImage = NULL;
-	stillObjectAverageImage = NULL;
-	stillObjectThresholdImage = NULL;
-	stillObjectCounterImage = NULL;
-	backgroundDifferenceImage = NULL;
-	stillObjectDifferenceImage = NULL;
-	thresholdImage32 = NULL;
-	thresholdImage = NULL;
-	resultImage = NULL;
-	backgroundMaskImage = NULL;
-	foregroundMaskImage = NULL;
-	stillObjectMaskImage = NULL;
-	movingObjectMask = NULL;
-	backgroundCopyMaskImage = NULL;
-	tmpMaskImage = NULL;
-	tmp2MaskImage = NULL;
-	frameImage32 = NULL;
-	backgroundImage = NULL;
-	stillObjectImage = NULL;
-	outputImage = NULL;
-
-	foreGroundMaskBuff = NULL;
-	stillObjectMaskBuff = NULL;
-	backGroundBuff = NULL;
-	stillObjectImageBuff = NULL;
-	stillObjectCounterBuff = NULL;
-
-    return RTC::RTC_OK;
-}
-
-
-RTC::ReturnCode_t SubStractCaptureImage::onDeactivated(RTC::UniqueId ec_id)
-{	
-	if(inputImage != NULL){
-		cvReleaseImage( &inputImage );
-	}
-	if(backgroundAverageImage != NULL){
-		cvReleaseImage( &backgroundAverageImage );
-	}
-	if(backgroundThresholdImage != NULL){
-		cvReleaseImage( &backgroundThresholdImage);
-	}
-	if(stillObjectAverageImage != NULL){
-		cvReleaseImage( &stillObjectAverageImage );
-	}
-	if(stillObjectThresholdImage != NULL){
-		cvReleaseImage( &stillObjectThresholdImage );
-	}
-	if(stillObjectCounterImage != NULL){
-		cvReleaseImage( &stillObjectCounterImage );
-	}
-	if(backgroundDifferenceImage != NULL){
-		cvReleaseImage( &backgroundDifferenceImage );
-	}
-	if(stillObjectDifferenceImage != NULL){
-		cvReleaseImage( &stillObjectDifferenceImage );
-	}
-	if(thresholdImage32 != NULL){
-		cvReleaseImage( &thresholdImage32 );
-	}
-	if(thresholdImage != NULL){
-		cvReleaseImage( &thresholdImage );
-	}
-	if(resultImage != NULL){
-		cvReleaseImage( &resultImage );
-	}
-	if(backgroundMaskImage != NULL){
-		cvReleaseImage( &backgroundMaskImage );
-	}
-	if(foregroundMaskImage != NULL){
-		cvReleaseImage( &foregroundMaskImage );
-	}
-	if(stillObjectMaskImage != NULL){
-		cvReleaseImage( &stillObjectMaskImage );
-	}
-	if(movingObjectMask != NULL){
-		cvReleaseImage( &movingObjectMask );
-	}
-	if(backgroundCopyMaskImage != NULL){
-		cvReleaseImage( &backgroundCopyMaskImage );
-	}
-	if(tmpMaskImage != NULL){
-		cvReleaseImage( &tmpMaskImage );
-	}
-	if(tmp2MaskImage != NULL){
-		cvReleaseImage( &tmp2MaskImage );
-	}
-	if(frameImage32 != NULL){
-		cvReleaseImage( &frameImage32 );
-	}
-	if(backgroundImage != NULL){
-		cvReleaseImage( &backgroundImage );
-	}
-	if(stillObjectImage != NULL){
-		cvReleaseImage( &stillObjectImage );
-	}
-	if(outputImage != NULL){
-		cvReleaseImage( &outputImage );
-	}
-	
-	if(foreGroundMaskBuff != NULL){
-		cvReleaseImage( &foreGroundMaskBuff);
-	}
-	if(stillObjectMaskBuff != NULL){
-		cvReleaseImage( &stillObjectMaskBuff);
-	}
-	if(backGroundBuff != NULL){
-		cvReleaseImage( &backGroundBuff);
-	}
-	if(stillObjectImageBuff != NULL){
-		cvReleaseImage( &stillObjectImageBuff);
-	}
-	if(stillObjectCounterBuff != NULL){
-		cvReleaseImage( &stillObjectCounterBuff);
-	}
-	
-	return RTC::RTC_OK;
-}
-
-
-RTC::ReturnCode_t SubStractCaptureImage::onExecute(RTC::UniqueId ec_id)
-{	
-	
-	if(m_image_origIn.isNew() && SubStractCaptureImage_count == 0){
-	
-		m_image_origIn.read();
-
-		if(g_temp_w != m_image_orig.width || g_temp_h != m_image_orig.height){
-			
-			//	‰æ‘œƒTƒCƒY‚ð•Û‘¶
-			imageSize = cvSize(m_image_orig.width, m_image_orig.height);
-
-			//	‰æ‘œ‚𐶐¬‚·‚é
-			inputImage = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
-			backgroundAverageImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );		//	”wŒi‚Ì•½‹Ï’l•Û‘¶—pIplImage
-			backgroundThresholdImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );		//	”wŒi‚Ì臒l•Û‘¶—pIplImage
-			stillObjectAverageImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );		//	ÃŽ~•¨‘Ì‚Ì•½‹Ï’l•Û‘¶—pIplImage
-			stillObjectThresholdImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );		//	ÃŽ~•¨‘Ì‚Ì臒l•Û‘¶—pIplImage
-			stillObjectCounterImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );		//	ÃŽ~•¨‘̂̃JƒEƒ“ƒ^—pIplImage
-			backgroundDifferenceImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );		//	”wŒi·•ª‰æ‘œ—pIplImage
-			stillObjectDifferenceImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );	//	ÃŽ~•¨‘̍·•ª‰æ‘œ—pIplIMage
-			thresholdImage32 = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );				//	32bit‚Ì臒l‰æ‘œ—pIplImage
-			thresholdImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 3 );					//	臒l‰æ‘œ—pIplImage
-			resultImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );					//	Œ‹‰Ê‰æ‘œ—pIplImage
-			backgroundMaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );			//	”wŒiƒ}ƒXƒN‰æ‘œ—pIplImage
-			foregroundMaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );			//	‘OŒiƒ}ƒXƒN—pIplImage
-			stillObjectMaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );			//	ÃŽ~•¨‘̃}ƒXƒN—pIplImage
-			movingObjectMask = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );				//	“®•¨‘̃}ƒXƒN—pIplImage
-			backgroundCopyMaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );		//	”wŒi‚ɃRƒs[‚·‚éÛ‚ÉŽg—p‚·‚éƒ}ƒXƒN—pIplImage
-			tmpMaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );					//	ƒeƒ“ƒ|ƒ‰ƒŠ—pIplImage
-			tmp2MaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );					//	ƒeƒ“ƒ|ƒ‰ƒŠ—pIplImage(‚»‚Ì2)
-			frameImage32 = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );					//	32bit‚̃Lƒƒƒvƒ`ƒƒ‚µ‚½‰æ‘œ—pIplImage
-			backgroundImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 3 );				//	”wŒi‰æ‘œ—pIplImage
-			stillObjectImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 3 );
-			outputImage = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
-
-			foreGroundMaskBuff = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
-			stillObjectMaskBuff  = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
-			backGroundBuff = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
-			stillObjectImageBuff = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
-			stillObjectCounterBuff = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
-
-			memcpy(inputImage->imageData,(void *)&(m_image_orig.pixels[0]), m_image_orig.pixels.length());
-
-			//	‰Šú‰»‚·‚é
-			cvConvert( inputImage, backgroundAverageImage );
-			cvSet( backgroundThresholdImage, cvScalarAll( BACKGROUND_INITIAL_THRESHOLD ) );
-			cvSetZero( stillObjectAverageImage );
-			cvSetZero( stillObjectThresholdImage );
-			cvSetZero( stillObjectCounterImage );
-			
-			g_temp_w = m_image_orig.width;
-			g_temp_h = m_image_orig.height;
-
-			SubStractCaptureImage_count = 1;
-
-		}
-
-	}else if(m_image_origIn.isNew() && SubStractCaptureImage_count != 0 ){
-		
-		m_image_origIn.read();
-
-		if(g_temp_w == m_image_orig.width && g_temp_h == m_image_orig.height){
-			
-			memcpy(inputImage->imageData,(void *)&(m_image_orig.pixels[0]), m_image_orig.pixels.length());
-		
-			//	float 32bit‚É•ÏŠ·‚·‚é
-			cvConvert( inputImage, frameImage32 );
-
-			//	”wŒi‚Ƃ̍· /////////////////////////////////////////////////////////
-
-			//	Œ»Ý‚Ì”wŒi‚Ƃ̍·‚̐â‘Î’l‚𐬕ª‚²‚Æ‚ÉŽæ‚é
-			cvAbsDiff( frameImage32, backgroundAverageImage, backgroundDifferenceImage );
-
-			//	臒l‚Ì’l‚ðˆø‚­
-			cvAddWeighted( backgroundDifferenceImage, 1.0, backgroundThresholdImage, -THRESHOLD_COEFFICIENT, 0.0, thresholdImage32 );
-
-			// thresholdImage ‚Ì—v‘f‚ª1‚‚łà0ˆÈã‚¾‚Á‚½‚ç”wŒi‚Å‚Í‚È‚¢
-			cvConvert( thresholdImage32, thresholdImage );
-			cvCvtColor( thresholdImage, resultImage, CV_BGR2GRAY );
-			cvThreshold( resultImage, backgroundMaskImage, MASK_THRESHOLD, THRESHOLD_MAX_VALUE, CV_THRESH_BINARY_INV );
-
-			//	”wŒiŒó•â‚Ƃ̍· /////////////////////////////////////////////////////
-
-			//	Œ»Ý‚Ì”wŒiŒó•â‚Ƃ̍·‚̐â‘Î’l‚𐬕ª‚²‚Æ‚ÉŽæ‚é
-			cvAbsDiff( frameImage32, stillObjectAverageImage, stillObjectDifferenceImage );
-
-			//	臒l‚Ì’l‚ðˆø‚­
-			cvAddWeighted( stillObjectDifferenceImage, 1.0, stillObjectThresholdImage, -THRESHOLD_COEFFICIENT, 0.0, thresholdImage32 );
-
-			//	thresholdImage ‚Ì—v‘f‚ª1‚‚łà0ˆÈã‚¾‚Á‚½‚ç”wŒiŒó•â‚Å‚Í‚È‚¢
-			cvConvert( thresholdImage32, thresholdImage );
-			cvCvtColor( thresholdImage, resultImage, CV_BGR2GRAY );
-			cvThreshold( resultImage, stillObjectMaskImage, MASK_THRESHOLD, THRESHOLD_MAX_VALUE, CV_THRESH_BINARY_INV );
-			
-			//	‚±‚±‚܂łŁA
-			//	backgroundDifferenceImage, backgroundMaskImage
-			//	stillObjectDifferenceImage, stillObjectMaskImage
-			//	‚ɈӖ¡‚Ì‚ ‚é’l‚ª“ü‚éB
-
-			//	ŠeŽíî•ñ‚ðXV‚·‚é /////////////////////////////////////////////////
-
-			//	”wŒi‚É“¯‰»‚·‚éê‡ (backgroundMaskImage=1‚̏ꍇ)
-			cvRunningAvg( frameImage32, backgroundAverageImage, BACKGROUND_ALPHA, backgroundMaskImage );
-			cvRunningAvg( backgroundDifferenceImage, backgroundThresholdImage, BACKGROUND_ALPHA, backgroundMaskImage );
-
-			//	”wŒiŒó•â‚É“¯‰»‚·‚éê‡ (backgroundMaskImage=0 && stillObjectMaskImage=1)
-			cvNot( backgroundMaskImage, foregroundMaskImage );
-			cvAnd( foregroundMaskImage, stillObjectMaskImage, tmpMaskImage );	//	”wŒiŒó•â
-			
-			cvRunningAvg( frameImage32, stillObjectAverageImage, STILL_OBJECT_ALPHA, tmpMaskImage );
-			cvRunningAvg( stillObjectDifferenceImage, stillObjectThresholdImage, STILL_OBJECT_ALPHA, tmpMaskImage );
-						  
-			//	”wŒiŒó•âƒJƒEƒ“ƒ^‚𑝂₷
-			cvAddS( stillObjectCounterImage, cvScalar( 1 ), stillObjectCounterImage, tmpMaskImage );
-			
-			//	ƒJƒEƒ“ƒ^‚ªè‡’lˆÈã‚É‚È‚Á‚½‚çA”wŒiŒó•â‚ð”wŒi‚Æ‚µ‚č̗p‚·‚é
-			cvThreshold( stillObjectCounterImage, tmp2MaskImage, STILL_OBJECT_TO_BACKGROUND, THRESHOLD_MAX_VALUE, CV_THRESH_BINARY );
-			cvAnd( tmpMaskImage, tmp2MaskImage, backgroundCopyMaskImage );
-			cvCopy( stillObjectAverageImage, backgroundAverageImage, backgroundCopyMaskImage );
-			cvCopy( stillObjectThresholdImage, backgroundThresholdImage, backgroundCopyMaskImage );
-
-			//	‚±‚Ì backgroundCopyMaskImage ‚́AŒã‚Å”wŒiŒó•â‚ð0‚ɏ‰Šú‰»‚·‚éÛ‚ÉŽg—p
-			cvSet( stillObjectCounterImage, cvScalarAll( 0 ), backgroundCopyMaskImage );
-
-			//	”wŒiŒó•â‚Å‚à‚È‚­A”wŒi‚Å‚à‚È‚¢ê‡
-			//	(foregroundMaskImage = 1 && stillObjectMaskImage = 0)
-			cvNot( stillObjectMaskImage, movingObjectMask );
-			
-			//	ƒJƒEƒ“ƒ^‚ðŒ¸‚ç‚·(’ZŽž,ŠÔƒmƒCƒY‘Ήž)
-			//	‚±‚ê‚́A”wŒi‚É•ª—Þ‚³‚ꂽƒsƒNƒZƒ‹‚ɑ΂µ‚Ä‚às‚¤B‚·‚È‚í‚¿A
-			//	movingObjectMask == 1 || backgroundMaskImage == 1
-			cvOr( backgroundMaskImage, movingObjectMask, tmpMaskImage );
-			cvSubS( stillObjectCounterImage, cvScalarAll( NOT_STILL_DEC_STEP ), stillObjectCounterImage, tmpMaskImage );
-			
-			//	ƒJƒEƒ“ƒ^‚ª0‚É‚È‚Á‚½‚ç”wŒiŒó•â‚ð‰Šú‰»‚·‚é
-			cvNot( stillObjectCounterImage, tmp2MaskImage );	// tmp2 = 1 ‚Ȃ珉Šú‰»
-
-			//	‰Šú‰»‚·‚é’l‚ÌŒó•â‚Í2Ží—Þ‚ ‚éB
-			//	(1)Œ»Ý‚̉摜‚ŏ‰Šú‰» --- ”wŒi‚Å‚à‚È‚­”wŒiŒó•â‚Å‚à‚È‚¢ê‡
-			//	(2)“o˜^‚È‚µó‘Ԃŏ‰Šú‰» --- ”wŒi‚à‚µ‚­‚Í”wŒiŒó•â‚ðƒRƒs[‚µ‚½ê‡
-			//	‚±‚±‚Å‚Í(1)‚ŏ‰Šú‰»‚µ‚Ä‚¨‚­
-			cvOr( tmpMaskImage, backgroundCopyMaskImage, tmpMaskImage );
-			cvAnd( tmpMaskImage, tmp2MaskImage, tmpMaskImage );
-
-			cvCopy( frameImage32, stillObjectAverageImage, tmpMaskImage );
-			cvSet( stillObjectThresholdImage, cvScalarAll( STILL_OBJECT_INITIAL_THRESHOLD ), tmpMaskImage );
-			
-			//	ƒmƒCƒY‚ðœ‹Ž‚·‚é
-			cvSmooth( foregroundMaskImage, foregroundMaskImage, CV_MEDIAN );
-
-			cvConvert( backgroundAverageImage, backgroundImage );
-			cvConvert( stillObjectAverageImage, stillObjectImage );
-
-			//	ƒL[“ü—Í”»’è
-			cvWaitKey( 1 );
-			
-			// ‰æ‘œƒf[ƒ^‚̃TƒCƒYŽæ“¾
-			double len;
-
-			len = (outputImage->nChannels * outputImage->width * outputImage->height);
-			m_image_out.pixels.length(len);
-
-			memcpy((void *)&(m_image_out.pixels[0]), inputImage->imageData, len);
-			
-			m_image_out.width = m_image_orig.width;
-			m_image_out.height = m_image_orig.height;
-
-			m_image_outOut.write();
-
-			cvMerge( foregroundMaskImage, foregroundMaskImage, foregroundMaskImage, NULL, foreGroundMaskBuff);
-			
-			len = (foreGroundMaskBuff->nChannels * foreGroundMaskBuff->width * foreGroundMaskBuff->height);
-			m_foreMaskImg.pixels.length(len);
-
-			memcpy((void *)&(m_foreMaskImg.pixels[0]), foreGroundMaskBuff->imageData, len);
-			
-			m_foreMaskImg.width = m_image_orig.width;
-			m_foreMaskImg.height = m_image_orig.height;
-
-			m_foreMaskImgOut.write();
-
-
-			cvMerge( stillObjectMaskImage, stillObjectMaskImage, stillObjectMaskImage, NULL, stillObjectMaskBuff );
-
-			len = (stillObjectMaskBuff->nChannels * stillObjectMaskBuff->width * stillObjectMaskBuff->height);
-			m_stillMaskImg.pixels.length(len);
-
-			memcpy((void *)&(m_stillMaskImg.pixels[0]), stillObjectMaskBuff->imageData, len);
-
-			m_stillMaskImg.width = m_image_orig.width;
-			m_stillMaskImg.height = m_image_orig.height;
-
-			m_stillMaskImgOut.write();
-
-			
-			len = (backgroundImage->nChannels * backgroundImage->width * backgroundImage->height);
-			m_backGroundImg.pixels.length(len);
-
-			memcpy((void *)&(m_backGroundImg.pixels[0]), backgroundImage->imageData, len);
-
-			m_backGroundImg.width = m_image_orig.width;
-			m_backGroundImg.height = m_image_orig.height;
-
-			m_backGroundImgOut.write();
-
-
-			len = (stillObjectImage->nChannels * stillObjectImage->width * stillObjectImage->height);
-			m_stillImg.pixels.length(len);
-
-			memcpy((void *)&(m_stillImg.pixels[0]), stillObjectImage->imageData, len);
-
-			m_stillImg.width = m_image_orig.width;
-			m_stillImg.height = m_image_orig.height;
-
-			m_stillImgOut.write();
-
-			/*
-			cvMerge( stillObjectCounterImage, stillObjectCounterImage, stillObjectCounterImage, NULL, stillObjectCounterBuff );
-
-			len = (stillObjectCounterBuff->nChannels * stillObjectCounterBuff->width * stillObjectCounterBuff->height);
-			m_stillCounterImg.pixels.length(len);
-
-			memcpy((void *)&(m_stillCounterImg.pixels[0]), stillObjectCounterBuff->imageData, len);
-
-			m_stillCounterImg.width = m_image_orig.width;
-			m_stillCounterImg.height = m_image_orig.height;
-
-			m_stillCounterImgOut.write();
-			*/
-			g_temp_w = m_image_orig.width;
-			g_temp_h = m_image_orig.height;
-
-			key = '0';
-		}
-
-	}
-
-	if(g_temp_w != m_image_orig.width || g_temp_h != m_image_orig.height){
-
-		cvReleaseImage( &inputImage );
-		cvReleaseImage( &backgroundAverageImage );
-		cvReleaseImage( &backgroundThresholdImage);
-		cvReleaseImage( &stillObjectAverageImage );
-		cvReleaseImage( &stillObjectThresholdImage );
-		cvReleaseImage( &stillObjectCounterImage );
-		cvReleaseImage( &backgroundDifferenceImage );
-		cvReleaseImage( &stillObjectDifferenceImage );
-		cvReleaseImage( &thresholdImage32 );
-		cvReleaseImage( &thresholdImage );
-		cvReleaseImage( &resultImage );
-		cvReleaseImage( &backgroundMaskImage );
-		cvReleaseImage( &foregroundMaskImage );
-		cvReleaseImage( &stillObjectMaskImage );
-		cvReleaseImage( &movingObjectMask );
-		cvReleaseImage( &backgroundCopyMaskImage );
-		cvReleaseImage( &tmpMaskImage );
-		cvReleaseImage( &tmp2MaskImage );
-		cvReleaseImage( &frameImage32 );
-		cvReleaseImage( &backgroundImage );
-		cvReleaseImage( &stillObjectImage );
-		cvReleaseImage( &outputImage );
-
-		cvReleaseImage( &foreGroundMaskBuff);
-		cvReleaseImage( &stillObjectMaskBuff);
-		cvReleaseImage( &backGroundBuff);
-		cvReleaseImage( &stillObjectImageBuff);
-		cvReleaseImage( &stillObjectCounterBuff);
-		
-		//g_temp_w = m_image_orig.width;
-		//g_temp_h = m_image_orig.height;
-
-		SubStractCaptureImage_count = 0;
-	}
-
-    return RTC::RTC_OK;
-}
-
-/*
-RTC::ReturnCode_t SubStractCaptureImage::onAborting(RTC::UniqueId ec_id)
-{
-  return RTC::RTC_OK;
-}
-*/
-
-/*
-RTC::ReturnCode_t SubStractCaptureImage::onError(RTC::UniqueId ec_id)
-{
-  return RTC::RTC_OK;
-}
-*/
-
-/*
-RTC::ReturnCode_t SubStractCaptureImage::onReset(RTC::UniqueId ec_id)
-{
-  return RTC::RTC_OK;
-}
-*/
-
-/*
-RTC::ReturnCode_t SubStractCaptureImage::onStateUpdate(RTC::UniqueId ec_id)
-{
-  return RTC::RTC_OK;
-}
-*/
-
-/*
-RTC::ReturnCode_t SubStractCaptureImage::onRateChanged(RTC::UniqueId ec_id)
-{
-  return RTC::RTC_OK;
-}
-*/
-
-
-
-extern "C"
-{
- 
-  void SubStractCaptureImageInit(RTC::Manager* manager)
-  {
-    coil::Properties profile(substractcaptureimage_spec);
-    manager->registerFactory(profile,
-                             RTC::Create<SubStractCaptureImage>,
-                             RTC::Delete<SubStractCaptureImage>);
-  }
-  
-};
-
-
+// -*- C++ -*-
+/*!
+ * @file  SubStractCaptureImage.cpp
+ * @brief SubStractCaptureImage component
+ * @date $Date$
+ *
+ * $Id$
+ */
+
+#include "SubStractCaptureImage.h"
+
+// Module specification
+// <rtc-template block="module_spec">
+static const char* substractcaptureimage_spec[] =
+  {
+    "implementation_id", "SubStractCaptureImage",
+    "type_name",         "SubStractCaptureImage",
+    "description",       "SubStractCaptureImage component",
+    "version",           "1.1.0",
+    "vendor",            "AIST",
+    "category",          "Category",
+    "activity_type",     "PERIODIC",
+    "kind",              "DataFlowComponent",
+    "max_instance",      "1",
+    "language",          "C++",
+    "lang_type",         "compile",
+    ""
+  };
+// </rtc-template>
+
+CvSize imageSize;
+
+int g_temp_w = 0;
+int g_temp_h = 0;
+int SubStractCaptureImage_count = 0;
+
+void showFlipImage( char *windowName, IplImage *image ) {
+	if ( image->origin == 0 ) {
+		//cvFlip( image, image, 0 );
+		cvShowImage( windowName, image );
+		//cvFlip( image, image, 0 );
+	}
+}
+
+/*!
+ * @brief constructor
+ * @param manager Maneger Object
+ */
+SubStractCaptureImage::SubStractCaptureImage(RTC::Manager* manager)
+    // <rtc-template block="initializer">
+  : RTC::DataFlowComponentBase(manager),
+    m_image_origIn("original_image", m_image_orig),
+    m_image_outOut("output_image", m_image_out),
+    m_foreMaskImgOut("foreMaskImg", m_foreMaskImg),
+    m_stillMaskImgOut("stillMaskImg", m_stillMaskImg),
+    m_backGroundImgOut("backGroundImg", m_backGroundImg),
+    m_stillImgOut("stillImg", m_stillImg)
+
+    // </rtc-template>
+{
+}
+
+/*!
+ * @brief destructor
+ */
+SubStractCaptureImage::~SubStractCaptureImage()
+{
+}
+
+
+
+RTC::ReturnCode_t SubStractCaptureImage::onInitialize()
+{
+  // Registration: InPort/OutPort/Service
+  // <rtc-template block="registration">
+  // Set InPort buffers
+  addInPort("original_image", m_image_origIn);
+  
+  // Set OutPort buffer
+  addOutPort("output_image", m_image_outOut);
+  addOutPort("foreMaskImg", m_foreMaskImgOut);
+  addOutPort("stillMaskImg", m_stillMaskImgOut);
+  addOutPort("backGroundImg", m_backGroundImgOut);
+  addOutPort("stillImg", m_stillImgOut);
+  
+  // Set service provider to Ports
+  
+  // Set service consumers to Ports
+  
+  // Set CORBA Service Ports
+  
+  // </rtc-template>
+
+  // <rtc-template block="bind_config">
+  // </rtc-template>
+  
+  return RTC::RTC_OK;
+}
+
+/*
+RTC::ReturnCode_t SubStractCaptureImage::onFinalize()
+{
+  return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t SubStractCaptureImage::onStartup(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t SubStractCaptureImage::onShutdown(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+
+RTC::ReturnCode_t SubStractCaptureImage::onActivated(RTC::UniqueId ec_id)
+{
+  g_temp_w = 0;
+  g_temp_h = 0;
+  SubStractCaptureImage_count = 0;
+
+  inputImage = NULL;
+  backgroundAverageImage = NULL;
+  backgroundThresholdImage = NULL;
+  stillObjectAverageImage = NULL;
+  stillObjectThresholdImage = NULL;
+  stillObjectCounterImage = NULL;
+  backgroundDifferenceImage = NULL;
+  stillObjectDifferenceImage = NULL;
+  thresholdImage32 = NULL;
+  thresholdImage = NULL;
+  resultImage = NULL;
+  backgroundMaskImage = NULL;
+  foregroundMaskImage = NULL;
+  stillObjectMaskImage = NULL;
+  movingObjectMask = NULL;
+  backgroundCopyMaskImage = NULL;
+  tmpMaskImage = NULL;
+  tmp2MaskImage = NULL;
+  frameImage32 = NULL;
+  backgroundImage = NULL;
+  stillObjectImage = NULL;
+  outputImage = NULL;
+
+  foreGroundMaskBuff = NULL;
+  stillObjectMaskBuff = NULL;
+  backGroundBuff = NULL;
+  stillObjectImageBuff = NULL;
+  stillObjectCounterBuff = NULL;
+
+  return RTC::RTC_OK;
+}
+
+
+RTC::ReturnCode_t SubStractCaptureImage::onDeactivated(RTC::UniqueId ec_id)
+{	
+	if(inputImage != NULL){
+		cvReleaseImage( &inputImage );
+	}
+	if(backgroundAverageImage != NULL){
+		cvReleaseImage( &backgroundAverageImage );
+	}
+	if(backgroundThresholdImage != NULL){
+		cvReleaseImage( &backgroundThresholdImage);
+	}
+	if(stillObjectAverageImage != NULL){
+		cvReleaseImage( &stillObjectAverageImage );
+	}
+	if(stillObjectThresholdImage != NULL){
+		cvReleaseImage( &stillObjectThresholdImage );
+	}
+	if(stillObjectCounterImage != NULL){
+		cvReleaseImage( &stillObjectCounterImage );
+	}
+	if(backgroundDifferenceImage != NULL){
+		cvReleaseImage( &backgroundDifferenceImage );
+	}
+	if(stillObjectDifferenceImage != NULL){
+		cvReleaseImage( &stillObjectDifferenceImage );
+	}
+	if(thresholdImage32 != NULL){
+		cvReleaseImage( &thresholdImage32 );
+	}
+	if(thresholdImage != NULL){
+		cvReleaseImage( &thresholdImage );
+	}
+	if(resultImage != NULL){
+		cvReleaseImage( &resultImage );
+	}
+	if(backgroundMaskImage != NULL){
+		cvReleaseImage( &backgroundMaskImage );
+	}
+	if(foregroundMaskImage != NULL){
+		cvReleaseImage( &foregroundMaskImage );
+	}
+	if(stillObjectMaskImage != NULL){
+		cvReleaseImage( &stillObjectMaskImage );
+	}
+	if(movingObjectMask != NULL){
+		cvReleaseImage( &movingObjectMask );
+	}
+	if(backgroundCopyMaskImage != NULL){
+		cvReleaseImage( &backgroundCopyMaskImage );
+	}
+	if(tmpMaskImage != NULL){
+		cvReleaseImage( &tmpMaskImage );
+	}
+	if(tmp2MaskImage != NULL){
+		cvReleaseImage( &tmp2MaskImage );
+	}
+	if(frameImage32 != NULL){
+		cvReleaseImage( &frameImage32 );
+	}
+	if(backgroundImage != NULL){
+		cvReleaseImage( &backgroundImage );
+	}
+	if(stillObjectImage != NULL){
+		cvReleaseImage( &stillObjectImage );
+	}
+	if(outputImage != NULL){
+		cvReleaseImage( &outputImage );
+	}
+	
+	if(foreGroundMaskBuff != NULL){
+		cvReleaseImage( &foreGroundMaskBuff);
+	}
+	if(stillObjectMaskBuff != NULL){
+		cvReleaseImage( &stillObjectMaskBuff);
+	}
+	if(backGroundBuff != NULL){
+		cvReleaseImage( &backGroundBuff);
+	}
+	if(stillObjectImageBuff != NULL){
+		cvReleaseImage( &stillObjectImageBuff);
+	}
+	if(stillObjectCounterBuff != NULL){
+		cvReleaseImage( &stillObjectCounterBuff);
+	}
+	
+	return RTC::RTC_OK;
+}
+
+
+RTC::ReturnCode_t SubStractCaptureImage::onExecute(RTC::UniqueId ec_id)
+{	
+  if(m_image_origIn.isNew() && SubStractCaptureImage_count == 0)
+  {
+    m_image_origIn.read();
+
+    if(g_temp_w != m_image_orig.width || g_temp_h != m_image_orig.height)
+    {
+      /* 画像サイズを保存 */
+      imageSize = cvSize(m_image_orig.width, m_image_orig.height);
+
+      /* 画像を生成する */
+      inputImage = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
+      backgroundAverageImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );     /* 背景の平均値保存用IplImage */
+      backgroundThresholdImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );   /* 背景の閾値保存用IplImage */
+      stillObjectAverageImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );    /* 静止物体の平均値保存用IplImage */
+      stillObjectThresholdImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );    /* 静止物体の閾値保存用IplImage */
+      stillObjectCounterImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );    /* 静止物体のカウンタ用IplImage */
+      backgroundDifferenceImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );    /* 背景差分画像用IplImage */
+      stillObjectDifferenceImage = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );    /* 静止物体差分画像用IplIMage */
+      thresholdImage32 = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );    /* 32bitの閾値画像用IplImage */
+      thresholdImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 3 );    /* 閾値画像用IplImage */
+      resultImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );    /* 結果画像用IplImage */
+      backgroundMaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );    /* 背景マスク画像用IplImage */
+      foregroundMaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );    /* 前景マスク用IplImage */
+      stillObjectMaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );    /* 静止物体マスク用IplImage */
+      movingObjectMask = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );    /* 動物体マスク用IplImage */
+      backgroundCopyMaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );    /* 背景にコピーする際に使用するマスク用IplImage */
+      tmpMaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );    /* テンポラリ用IplImage */
+      tmp2MaskImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 1 );    /* テンポラリ用IplImage(その2) */
+      frameImage32 = cvCreateImage( imageSize, IPL_DEPTH_32F, 3 );    /* 32bitのキャプチャした画像用IplImage */
+      backgroundImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 3 );    /* 背景画像用IplImage */
+      stillObjectImage = cvCreateImage( imageSize, IPL_DEPTH_8U, 3 );
+      outputImage = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
+
+      foreGroundMaskBuff = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
+      stillObjectMaskBuff  = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
+      backGroundBuff = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
+      stillObjectImageBuff = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
+      stillObjectCounterBuff = cvCreateImage(imageSize, IPL_DEPTH_8U, 3);
+
+      memcpy(inputImage->imageData,(void *)&(m_image_orig.pixels[0]), m_image_orig.pixels.length());
+
+      /* 初期化する */
+      cvConvert( inputImage, backgroundAverageImage );
+      cvSet( backgroundThresholdImage, cvScalarAll( BACKGROUND_INITIAL_THRESHOLD ) );
+      cvSetZero( stillObjectAverageImage );
+      cvSetZero( stillObjectThresholdImage );
+      cvSetZero( stillObjectCounterImage );
+
+      g_temp_w = m_image_orig.width;
+      g_temp_h = m_image_orig.height;
+
+      SubStractCaptureImage_count = 1;
+
+    }
+
+  }else if(m_image_origIn.isNew() && SubStractCaptureImage_count != 0 )
+  {
+    m_image_origIn.read();
+
+    if(g_temp_w == m_image_orig.width && g_temp_h == m_image_orig.height)
+    {
+      memcpy(inputImage->imageData,(void *)&(m_image_orig.pixels[0]), m_image_orig.pixels.length());
+
+      /* float 32bitに変換する */
+      cvConvert( inputImage, frameImage32 );
+
+      // 背景との差 /////////////////////////////////////////////////////////
+
+      /* 現在の背景との差の絶対値を成分ごとに取る */
+      cvAbsDiff( frameImage32, backgroundAverageImage, backgroundDifferenceImage );
+
+      /* 閾値の値を引く */
+      cvAddWeighted( backgroundDifferenceImage, 1.0, backgroundThresholdImage, -THRESHOLD_COEFFICIENT, 0.0, thresholdImage32 );
+
+      /* thresholdImage の要素が1つでも0以上だったら背景ではない */
+      cvConvert( thresholdImage32, thresholdImage );
+      cvCvtColor( thresholdImage, resultImage, CV_BGR2GRAY );
+      cvThreshold( resultImage, backgroundMaskImage, MASK_THRESHOLD, THRESHOLD_MAX_VALUE, CV_THRESH_BINARY_INV );
+
+      // 背景候補との差 /////////////////////////////////////////////////////
+
+      /* 現在の背景候補との差の絶対値を成分ごとに取る */
+      cvAbsDiff( frameImage32, stillObjectAverageImage, stillObjectDifferenceImage );
+
+      /* 閾値の値を引く */
+      cvAddWeighted( stillObjectDifferenceImage, 1.0, stillObjectThresholdImage, -THRESHOLD_COEFFICIENT, 0.0, thresholdImage32 );
+
+      /* thresholdImage の要素が1つでも0以上だったら背景候補ではない */
+      cvConvert( thresholdImage32, thresholdImage );
+      cvCvtColor( thresholdImage, resultImage, CV_BGR2GRAY );
+      cvThreshold( resultImage, stillObjectMaskImage, MASK_THRESHOLD, THRESHOLD_MAX_VALUE, CV_THRESH_BINARY_INV );
+
+      /* ここまでで、
+       * backgroundDifferenceImage, backgroundMaskImage
+       * stillObjectDifferenceImage, stillObjectMaskImage
+       * に意味のある値が入る。
+       */
+
+      // 各種情報を更新する /////////////////////////////////////////////////
+
+      /* 背景に同化する場合 (backgroundMaskImage=1の場合) */
+      cvRunningAvg( frameImage32, backgroundAverageImage, BACKGROUND_ALPHA, backgroundMaskImage );
+      cvRunningAvg( backgroundDifferenceImage, backgroundThresholdImage, BACKGROUND_ALPHA, backgroundMaskImage );
+
+      /* 背景候補に同化する場合 (backgroundMaskImage=0 && stillObjectMaskImage=1) */
+      cvNot( backgroundMaskImage, foregroundMaskImage );
+      cvAnd( foregroundMaskImage, stillObjectMaskImage, tmpMaskImage ); /*  */
+
+      cvRunningAvg( frameImage32, stillObjectAverageImage, STILL_OBJECT_ALPHA, tmpMaskImage );
+      cvRunningAvg( stillObjectDifferenceImage, stillObjectThresholdImage, STILL_OBJECT_ALPHA, tmpMaskImage );
+
+      /* 背景候補カウンタを増やす */
+      cvAddS( stillObjectCounterImage, cvScalar( 1 ), stillObjectCounterImage, tmpMaskImage );
+
+      /* カウンタが閾値以上になったら、背景候補を背景として採用する */
+      cvThreshold( stillObjectCounterImage, tmp2MaskImage, STILL_OBJECT_TO_BACKGROUND, THRESHOLD_MAX_VALUE, CV_THRESH_BINARY );
+      cvAnd( tmpMaskImage, tmp2MaskImage, backgroundCopyMaskImage );
+      cvCopy( stillObjectAverageImage, backgroundAverageImage, backgroundCopyMaskImage );
+      cvCopy( stillObjectThresholdImage, backgroundThresholdImage, backgroundCopyMaskImage );
+
+      /* この backgroundCopyMaskImage は、後で背景候補を0に初期化する際に使用 */
+      cvSet( stillObjectCounterImage, cvScalarAll( 0 ), backgroundCopyMaskImage );
+
+      /* 背景候補でもなく、背景でもない場合 */
+      /* (foregroundMaskImage = 1 && stillObjectMaskImage = 0) */
+      cvNot( stillObjectMaskImage, movingObjectMask );
+
+      /* カウンタを減らす(短時,間ノイズ対応)
+       * これは、背景に分類されたピクセルに対しても行う。すなわち、
+       * movingObjectMask == 1 || backgroundMaskImage == 1
+       */
+      cvOr( backgroundMaskImage, movingObjectMask, tmpMaskImage );
+      cvSubS( stillObjectCounterImage, cvScalarAll( NOT_STILL_DEC_STEP ), stillObjectCounterImage, tmpMaskImage );
+
+      /* カウンタが0になったら背景候補を初期化する */
+      cvNot( stillObjectCounterImage, tmp2MaskImage );	/* tmp2 = 1 なら初期化 */
+
+      /* 初期化する値の候補は2種類ある。
+       * (1)現在の画像で初期化 --- 背景でもなく背景候補でもない場合
+       * (2)登録なし状態で初期化 --- 背景もしくは背景候補をコピーした場合
+       * ここでは(1)で初期化しておく
+       */
+      cvOr( tmpMaskImage, backgroundCopyMaskImage, tmpMaskImage );
+      cvAnd( tmpMaskImage, tmp2MaskImage, tmpMaskImage );
+
+      cvCopy( frameImage32, stillObjectAverageImage, tmpMaskImage );
+      cvSet( stillObjectThresholdImage, cvScalarAll( STILL_OBJECT_INITIAL_THRESHOLD ), tmpMaskImage );
+
+      /* ノイズを除去する */
+      cvSmooth( foregroundMaskImage, foregroundMaskImage, CV_MEDIAN );
+
+      cvConvert( backgroundAverageImage, backgroundImage );
+      cvConvert( stillObjectAverageImage, stillObjectImage );
+
+      cvWaitKey( 1 );
+
+      /* 画像データのサイズ取得 */
+      double len;
+      len = (outputImage->nChannels * outputImage->width * outputImage->height);
+      m_image_out.pixels.length(len);
+
+      memcpy((void *)&(m_image_out.pixels[0]), inputImage->imageData, len);
+
+      m_image_out.width = m_image_orig.width;
+      m_image_out.height = m_image_orig.height;
+
+      m_image_outOut.write();
+
+      cvMerge( foregroundMaskImage, foregroundMaskImage, foregroundMaskImage, NULL, foreGroundMaskBuff);
+
+      len = (foreGroundMaskBuff->nChannels * foreGroundMaskBuff->width * foreGroundMaskBuff->height);
+      m_foreMaskImg.pixels.length(len);
+
+      memcpy((void *)&(m_foreMaskImg.pixels[0]), foreGroundMaskBuff->imageData, len);
+
+      m_foreMaskImg.width = m_image_orig.width;
+      m_foreMaskImg.height = m_image_orig.height;
+
+      m_foreMaskImgOut.write();
+
+
+      cvMerge( stillObjectMaskImage, stillObjectMaskImage, stillObjectMaskImage, NULL, stillObjectMaskBuff );
+
+      len = (stillObjectMaskBuff->nChannels * stillObjectMaskBuff->width * stillObjectMaskBuff->height);
+      m_stillMaskImg.pixels.length(len);
+
+      memcpy((void *)&(m_stillMaskImg.pixels[0]), stillObjectMaskBuff->imageData, len);
+
+      m_stillMaskImg.width = m_image_orig.width;
+      m_stillMaskImg.height = m_image_orig.height;
+
+      m_stillMaskImgOut.write();
+
+
+      len = (backgroundImage->nChannels * backgroundImage->width * backgroundImage->height);
+      m_backGroundImg.pixels.length(len);
+
+      memcpy((void *)&(m_backGroundImg.pixels[0]), backgroundImage->imageData, len);
+
+      m_backGroundImg.width = m_image_orig.width;
+      m_backGroundImg.height = m_image_orig.height;
+
+      m_backGroundImgOut.write();
+
+
+      len = (stillObjectImage->nChannels * stillObjectImage->width * stillObjectImage->height);
+      m_stillImg.pixels.length(len);
+
+      memcpy((void *)&(m_stillImg.pixels[0]), stillObjectImage->imageData, len);
+
+      m_stillImg.width = m_image_orig.width;
+      m_stillImg.height = m_image_orig.height;
+
+      m_stillImgOut.write();
+
+      /*
+      cvMerge( stillObjectCounterImage, stillObjectCounterImage, stillObjectCounterImage, NULL, stillObjectCounterBuff );
+
+      len = (stillObjectCounterBuff->nChannels * stillObjectCounterBuff->width * stillObjectCounterBuff->height);
+      m_stillCounterImg.pixels.length(len);
+
+      memcpy((void *)&(m_stillCounterImg.pixels[0]), stillObjectCounterBuff->imageData, len);
+
+      m_stillCounterImg.width = m_image_orig.width;
+      m_stillCounterImg.height = m_image_orig.height;
+
+      m_stillCounterImgOut.write();
+      */
+      g_temp_w = m_image_orig.width;
+      g_temp_h = m_image_orig.height;
+
+      key = '0';
+    }
+  }
+
+  if(g_temp_w != m_image_orig.width || g_temp_h != m_image_orig.height)
+  {
+    cvReleaseImage( &inputImage );
+    cvReleaseImage( &backgroundAverageImage );
+    cvReleaseImage( &backgroundThresholdImage);
+    cvReleaseImage( &stillObjectAverageImage );
+    cvReleaseImage( &stillObjectThresholdImage );
+    cvReleaseImage( &stillObjectCounterImage );
+    cvReleaseImage( &backgroundDifferenceImage );
+    cvReleaseImage( &stillObjectDifferenceImage );
+    cvReleaseImage( &thresholdImage32 );
+    cvReleaseImage( &thresholdImage );
+    cvReleaseImage( &resultImage );
+    cvReleaseImage( &backgroundMaskImage );
+    cvReleaseImage( &foregroundMaskImage );
+    cvReleaseImage( &stillObjectMaskImage );
+    cvReleaseImage( &movingObjectMask );
+    cvReleaseImage( &backgroundCopyMaskImage );
+    cvReleaseImage( &tmpMaskImage );
+    cvReleaseImage( &tmp2MaskImage );
+    cvReleaseImage( &frameImage32 );
+    cvReleaseImage( &backgroundImage );
+    cvReleaseImage( &stillObjectImage );
+    cvReleaseImage( &outputImage );
+
+    cvReleaseImage( &foreGroundMaskBuff);
+    cvReleaseImage( &stillObjectMaskBuff);
+    cvReleaseImage( &backGroundBuff);
+    cvReleaseImage( &stillObjectImageBuff);
+    cvReleaseImage( &stillObjectCounterBuff);
+
+    //g_temp_w = m_image_orig.width;
+    //g_temp_h = m_image_orig.height;
+
+    SubStractCaptureImage_count = 0;
+  }
+
+  return RTC::RTC_OK;
+}
+
+/*
+RTC::ReturnCode_t SubStractCaptureImage::onAborting(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t SubStractCaptureImage::onError(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t SubStractCaptureImage::onReset(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t SubStractCaptureImage::onStateUpdate(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t SubStractCaptureImage::onRateChanged(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+
+
+extern "C"
+{
+ 
+  void SubStractCaptureImageInit(RTC::Manager* manager)
+  {
+    coil::Properties profile(substractcaptureimage_spec);
+    manager->registerFactory(profile,
+                             RTC::Create<SubStractCaptureImage>,
+                             RTC::Delete<SubStractCaptureImage>);
+  }
+  
+};
+
+



More information about the openrtm-commit mailing list