[openrtm-commit:01444] r152 - in branches/newCMakeForVC2010/ImageProcessing/opencv/components: . MFCamera MFCamera/cmake MFCamera/cmake/Modules MFCamera/doc MFCamera/doc/content MFCamera/idl MFCamera/include MFCamera/include/MFCamera MFCamera/src

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 4月 25日 (金) 13:10:40 JST


Author: kawauchi
Date: 2014-04-25 13:10:40 +0900 (Fri, 25 Apr 2014)
New Revision: 152

Added:
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/.project
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/COPYING
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/COPYING.LESSER
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/MFCamera.conf
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/README.MFCamera
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/RTC.xml
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/License.rtf
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/Modules/
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/Modules/FindOpenRTM.cmake
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/cpack_options.cmake.in
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera-config-version.cmake.in
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera-config.cmake.in
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera.pc.in
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/uninstall_target.cmake.in
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/utils.cmake
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/wix.xsl.in
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/conf.py.in
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/content/
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/content/index.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/content/index_j.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/doxyfile.in
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/idl/
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/idl/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFCamera.h
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFCapture.h
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFUtils.h
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/rtc.conf
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/CMakeLists.txt
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCamera.cpp
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCameraComp.cpp
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCapture.cpp
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFUtils.cpp
Modified:
   branches/newCMakeForVC2010/ImageProcessing/opencv/components/CMakeLists.txt
Log:
Added camera component of Media Foundation. refs #2704

Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/CMakeLists.txt	2014-04-25 03:52:24 UTC (rev 151)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/CMakeLists.txt	2014-04-25 04:10:40 UTC (rev 152)
@@ -12,16 +12,12 @@
 add_subdirectory(Chromakey)
 add_subdirectory(Dilationerosion)
 
-if ($ENV{VC_VERSION} MATCHES "10"OR $ENV{VC_VERSION} MATCHES "9")
+if ($ENV{VC_VERSION} MATCHES "10" OR $ENV{VC_VERSION} MATCHES "9")
   add_subdirectory(DirectShowCam)
 else()
-  message(STATUS "VC2012~ you can't use Baseclasses.lib. so set new camera components here.")
+  add_subdirectory(MFCamera)
 endif()
 
-#if(DIRECTSHOW_FOUND)
-#  add_subdirectory(DirectShowCam)
-#endif()
-
 add_subdirectory(Edge)
 add_subdirectory(Findcontour)
 add_subdirectory(Flip)

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/.project
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/.project	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/.project	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>MFCamera</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/CMakeLists.txt	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/CMakeLists.txt	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,122 @@
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+cmake_policy(SET CMP0002 OLD)
+
+project(MFCamera)
+string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
+include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
+set(PROJECT_VERSION 1.1.0 CACHE STRING "MFCamera version")
+DISSECT_VERSION()
+set(PROJECT_DESCRIPTION "USB Camera Acquire component")
+set(PROJECT_VENDOR "AIST")
+set(PROJECT_AUTHOR "AIST")
+set(PROJECT_AUTHOR_SHORT "AIST")
+
+set(LINUX_PACKAGE_GENERATOR "DEB")
+#set(LINUX_PACKAGE_GENERATOR "RPM")
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
+# Add an "uninstall" target
+CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
+    "${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+    "${PROJECT_BINARY_DIR}/uninstall_target.cmake")
+
+#option(BUILD_EXAMPLES "Build and install examples" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" 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)
+
+#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)
+
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/COPYING
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/COPYING	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/COPYING	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/COPYING.LESSER
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/COPYING.LESSER	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/COPYING.LESSER	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,165 @@
+                   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/MFCamera.conf
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/MFCamera.conf	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/MFCamera.conf	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,133 @@
+# -*- sh -*-
+#------------------------------------------------------------
+# Configuration file for MFCamera
+#
+# This configuration file name should be specified in rtc.conf (or other
+# configuration file specified by -f option) by "config_file" property.
+#
+# Category.MFCamera.config_file: MFCamera.conf
+# or
+# Category.MFCamera0.config_file: MFCamera0.conf
+# Category.MFCamera1.config_file: MFCamera1.conf
+# Category.MFCamera2.config_file: MFCamera2.conf
+#
+# ------------------------------------------------------------
+# An example configuration file for MFCamera
+#
+# 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__.device_id, text
+# conf.__widget__.vfmt_id, 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
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/README.MFCamera
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/README.MFCamera	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/README.MFCamera	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,134 @@
+======================================================================
+  RTComponent: MFCamera specificatioin
+
+  OpenRTM-aist-1.0.0
+  Date: $Date$
+
+  This file is generated by rtc-template with the following argments.
+
+#   rtc-template -bcxx --module-name=MFCamera 
+#   --module-desc='USB Camera Acquire component' --module-version=1.1.0 --module-vendor=AIST 
+#   --module-category=Category --module-comp-type=STATIC 
+#   --module-act-type=PERIODIC --module-max-inst=1 
+#   --config=device_id:int:0 --config=vfmt_id:int:0 
+#   --outport=out:RTC::CameraImage 
+
+
+======================================================================
+    Basic Information
+======================================================================
+# <rtc-template block="module">
+Module Name: MFCamera
+Description: USB Camera Acquire 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]      implemented
+
+[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">
+
+
+# </rtc-template>
+
+======================================================================
+    OutPorts definition
+======================================================================
+# <rtc-template block="outport">
+
+	Name:        out
+	PortNumber:  0
+	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:             device_id
+		Description:     
+		Type:            int
+		DefaultValue:     0
+		Unit:            
+		Range:           
+		Constraint:      
+
+		Name:             vfmt_id
+		Description:     
+		Type:            int
+		DefaultValue:     0
+		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.
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/RTC.xml
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/RTC.xml	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/RTC.xml	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.2" rtc:id="RTC:AIST:Category:MFCamera: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="MFCamera" rtc:updateDate="2014-04-23T09:34:21+09:00" rtc:creationDate="2014-04-23T09:34:21+09:00" rtc:version="1.1.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1000.0" rtc:description="USB Camera Acquire component" rtc:category="Category" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="MFCamera">
+        <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="true"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="true"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="true"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="true"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <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="device_id" rtc:unit="" rtc:defaultValue="0" rtc:type="int" rtc:name="device_id">
+            <rtcExt:Properties rtcExt:value="text" rtcExt:name="__widget__"/>
+        </rtc:Configuration>
+        <rtc:Configuration xsi:type="rtcExt:configuration_ext" rtcExt:variableName="vfmt_id" rtc:unit="" rtc:defaultValue="0" rtc:type="int" rtc:name="vfmt_id">
+            <rtcExt:Properties rtcExt:value="text" rtcExt:name="__widget__"/>
+        </rtc:Configuration>
+    </rtc:ConfigurationSet>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="RIGHT" rtcExt:variableName="out" rtc:unit="" rtc:subscriptionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="RTC::CameraImage" rtc:name="out" rtc:portType="DataOutPort"/>
+    <rtc:Language xsi:type="rtcExt:language_ext" rtc:kind="C++"/>
+</rtc:RtcProfile>

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/CMakeLists.txt	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/CMakeLists.txt	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,18 @@
+set(PKG_DEPS "openrtm-aist")
+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 CMake modules
+set(cmake_config ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME_LOWER}-config.cmake.in
+    ${cmake_config} @ONLY)
+set(cmake_version_config
+    ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake)
+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)
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/License.rtf
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/License.rtf	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/License.rtf	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,7 @@
+{\rtf1\ansi\ansicpg932\deff0\deflang1033\deflangfe1041{\fonttbl{\f0\froman\fprq1\fcharset128 \'82\'6c\'82\'72 \'82\'6f\'83\'53\'83\'56\'83\'62\'83\'4e;}}
+{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\lang1041\f0\fs20 LICENSE\par
+=======\par
+\par
+This is an installer created using CPack (http://www.cmake.org). No license provided.\par
+\par
+}

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/Modules/FindOpenRTM.cmake
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/Modules/FindOpenRTM.cmake	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/Modules/FindOpenRTM.cmake	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,134 @@
+# Find OpenRTM-aist
+#
+# The following additional directories are searched:
+# OPENRTM_ROOT (CMake variable)
+# OPENRTM_ROOT (Environment variable)
+#
+# This sets the following variables:
+# OPENRTM_FOUND - True if OpenRTM-aist was found.
+# OPENRTM_INCLUDE_DIRS - Directories containing the OpenRTM-aist include files.
+# OPENRTM_LIBRARIES - Libraries needed to use OpenRTM-aist.
+# OPENRTM_CFLAGS - Compiler flags for OpenRTM-aist.
+# OPENRTM_VERSION - The version of OpenRTM-aist found.
+# OPENRTM_VERSION_MAJOR - The major version of OpenRTM-aist found.
+# OPENRTM_VERSION_MINOR - The minor version of OpenRTM-aist found.
+# OPENRTM_VERSION_REVISION - The revision version of OpenRTM-aist found.
+# OPENRTM_VERSION_CANDIDATE - The candidate version of OpenRTM-aist found.
+# OPENRTM_IDL_COMPILER - The IDL compiler used by OpenRTM-aist.
+# OPENRTM_IDL_FLAGS - The flags used to compile OpenRTM-aist IDL files.
+# OPENRTM_IDL_DIR - The directory containing the OpenRTM-aist IDL files.
+#
+# This module also defines one macro usable in your CMakeLists.txt files:
+# OPENRTM_COMPILE_IDL_FILES(file1 file2 ...)
+#   Compiles the specified IDL files, placing the generated C++ source files in
+#   ${CMAKE_CURRENT_BINARY_DIR}. The source files can be found in file1_SRCS,
+#   file2_SRCS, etc., and all source files for all IDL files are available in
+#   ALL_IDL_SRCS. To depend on the generated files, depend on the targets
+#   file1_TGT, file2_TGT, etc. The target ALL_IDL_TGT is available to depend on
+#   all source files generated from IDL files.
+
+find_package(PkgConfig)
+pkg_check_modules(PC_OPENRTM openrtm-aist)
+pkg_check_modules(PC_COIL libcoil)
+pkg_check_modules(PC_OMNIORB4 omniORB4)
+pkg_check_modules(PC_OMNITHREAD3 omnithread3)
+pkg_check_modules(PC_OMNIDYNAMIC4 omniDynamic4)
+if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
+  pkg_check_modules(PC_UUID uuid)
+endif ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
+
+find_path(OPENRTM_INCLUDE_DIR rtm/RTC.h
+    HINTS ${OPENRTM_ROOT}/include ${OPENRTM_ROOT} $ENV{OPENRTM_ROOT}/include ${PC_OPENRTM_INCLUDE_DIRS})
+
+find_path(COIL_INCLUDE_DIR coil/config_coil.h
+    HINTS ${OPENRTM_ROOT}/include $ENV{OPENRTM_ROOT}/include ${PC_COIL_INCLUDE_DIRS})
+
+find_path(OMNIORB4_INCLUDE_DIR omniORB4/omniORB.h
+    HITS ${OMNI_ROOT}/include ${PC_OMNIORB4_INCLUDE_DIRS})
+
+find_library(OPENRTM_LIBRARY RTC
+    HINTS ${OPENRTM_ROOT}/lib $ENV{OPENRTM_ROOT}/lib
+    ${PC_OPENRTM_LIBRARY_DIRS})
+find_library(COIL_LIBRARY coil
+    HINTS ${OPENRTM_ROOT}/lib $ENV{OPENRTM_ROOT}/lib
+    ${PC_COIL_LIBRARY_DIRS})
+find_library(OMNIORB4_LIBRARY omniORB4
+    HINTS ${PC_OMNIORB4_LIBRARY_DIRS})
+find_library(OMNITHREAD3_LIBRARY omnithread
+    HINTS ${PC_OMNITHREAD3_LIBRARY_DIRS})
+find_library(OMNIDYNAMIC4_LIBRARY omniDynamic4
+    HINTS ${PC_OMNIDYNAMIC4_LIBRARY_DIRS})
+if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
+  find_library(UUID_LIBRARY uuid
+    HINTS ${PC_UUID_LIBRARY_DIRS})
+else ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
+  set(UUID_LIBRARY "")
+endif ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
+
+set(OPENRTM_CFLAGS ${PC_OPENRTM_CFLAGS_OTHER} ${PC_COIL_CFLAGS_OTHER} ${PC_OMNIORB4_CFLAGS_OTHER})
+set(OPENRTM_INCLUDE_DIRS ${OPENRTM_INCLUDE_DIR} ${OPENRTM_INCLUDE_DIR}/rtm/idl
+    ${COIL_INCLUDE_DIR} ${OMNIORB4_INCLUDE_DIR})
+set(OPENRTM_LIBRARIES ${OPENRTM_LIBRARY} ${COIL_LIBRARY} ${OMNIORB4_LIBRARY} ${OMNITHREAD3_LIBRARY} ${OMNIDYNAMIC4_LIBRARY} ${UUID_LIBRARY} dl pthread)
+
+file(STRINGS ${OPENRTM_INCLUDE_DIR}/rtm/version.h OPENRTM_VERSION
+    NEWLINE_CONSUME)
+#set(OPENRTM_VERSION "1.1.0")
+string(REGEX MATCH "version = \"([0-9]+)\\.([0-9]+)\\.([0-9]+)-?([a-zA-Z0-9]*)\""
+    OPENRTM_VERSION "${OPENRTM_VERSION}")
+set(OPENRTM_VERSION_MAJOR ${CMAKE_MATCH_1})
+set(OPENRTM_VERSION_MINOR ${CMAKE_MATCH_2})
+set(OPENRTM_VERSION_REVISION ${CMAKE_MATCH_3})
+set(OPENRTM_VERSION_CANDIDATE ${CMAKE_MATCH_4})
+
+execute_process(COMMAND rtm-config --libs-only-l OUTPUT_VARIABLE
+  OPENRTM_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND rtm-config --libs-only-L OUTPUT_VARIABLE
+  OPENRTM_LIBRARY_DIRS OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND rtm-config --idlc OUTPUT_VARIABLE OPENRTM_IDL_COMPILER
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND rtm-config --idlflags OUTPUT_VARIABLE OPENRTM_IDL_FLAGS
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+separate_arguments(OPENRTM_IDL_FLAGS)
+execute_process(COMMAND rtm-config --prefix OUTPUT_VARIABLE _rtm_prefix
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+set(OPENRTM_IDL_DIR
+    ${_rtm_prefix}/include/openrtm-${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}/rtm/idl
+    CACHE STRING "Directory containing the OpenRTM-aist IDL files.")
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(OpenRTM
+    REQUIRED_VARS OPENRTM_INCLUDE_DIR COIL_INCLUDE_DIR OPENRTM_LIBRARY
+    COIL_LIBRARY OPENRTM_IDL_COMPILER)
+
+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)
+    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 ${OPENRTM_IDL_COMPILER} ${OPENRTM_IDL_FLAGS}
+        -I${OPENRTM_IDL_DIR} ${_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)
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/cpack_options.cmake.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/cpack_options.cmake.in	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/cpack_options.cmake.in	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,98 @@
+set(CPACK_PACKAGE_NAME "@PROJECT_NAME@")
+set(CPACK_PACKAGE_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@")
+set(CPACK_PACKAGE_VERSION_MINOR "@PROJECT_VERSION_MINOR@")
+set(CPACK_PACKAGE_VERSION_PATCH "@PROJECT_VERSION_REVISION@")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
+set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
+set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
+
+set(CPACK_COMPONENTS_ALL component)
+set(CPACK_COMPONENT_COMPONENT_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_COMPONENT_DESCRIPTION
+    "Component library and stand-alone executable")
+if(INSTALL_HEADERS)
+    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL}  headers)
+    set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Header files")
+    set(CPACK_COMPONENT_HEADERS_DESCRIPTION
+        "Header files from the component.")
+    set(CPACK_COMPONENT_HEADERS_DEPENDS component)
+endif(INSTALL_HEADERS)
+if(INSTALL_IDL)
+    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} idl)
+    set(CPACK_COMPONENT_IDL_DISPLAY_NAME "IDL files")
+    set(CPACK_COMPONENT_IDL_DESCRIPTION
+        "IDL files for the component's services.")
+    set(CPACK_COMPONENT_IDL_DEPENDS component)
+endif(INSTALL_IDL)
+set(INSTALL_EXAMPLES @BUILD_EXAMPLES@)
+if(INSTALL_EXAMPLES)
+    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples)
+    set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples")
+    set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION
+        "Sample configuration files and other component resources.")
+    set(CPACK_COMPONENT_EXAMPLES_DEPENDS component)
+endif(INSTALL_EXAMPLES)
+set(INSTALL_DOCUMENTATION @BUILD_DOCUMENTATION@)
+if(INSTALL_DOCUMENTATION)
+    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} documentation)
+    set(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
+    set(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
+        "Component documentation")
+    set(CPACK_COMPONENT_DOCUMENTATION_DEPENDS component)
+endif(INSTALL_DOCUMENTATION)
+if(INSTALL_SOURCES)
+    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} sources)
+    set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+    set(CPACK_COMPONENT_SOURCES_DESCRIPTION
+        "Source files from the component.")
+endif(INSTALL_SOURCES)
+
+IF (WIN32)
+
+    # Windows WiX package settings
+
+    set(CPACK_WIX_XSL "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl")
+    set(CPACK_WIX_LANG "ja-jp")
+    set(CPACK_RESOURCE_FILE_LICENSE
+        "@CMAKE_CURRENT_SOURCE_DIR@/cmake/License.rtf")
+    configure_file(
+        "@CMAKE_CURRENT_SOURCE_DIR@/cmake/wix.xsl.in"
+        "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl" @ONLY)
+
+    set(CPACK_PACKAGE_FILE_NAME
+        "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
+
+
+    #
+    #
+    #
+#    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)
+    set(CPACK_PACKAGE_EXECUTABLES @PROJECT_EXECUTABLES@)
+    if(INSTALL_DOCUMENTATION)
+        set(CPACK_NSIS_MENU_LINKS
+            "@CMAKE_INSTALL_PREFIX@/share/doc/@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@/html/index.html"
+            "Component documentation")
+    endif(INSTALL_DOCUMENTATION)
+    string(REPLACE "/@PROJECT_NAME@" "" install_prefix_root
+        "@CMAKE_INSTALL_PREFIX@")
+    file(TO_NATIVE_PATH "${install_prefix_root}" install_prefix_root)
+    set(CPACK_NSIS_INSTALL_ROOT "${install_prefix_root}")
+    set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
+        "  Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
+  Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config-version.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
+    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)
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera-config-version.cmake.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera-config-version.cmake.in	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera-config-version.cmake.in	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,10 @@
+set(PACKAGE_VERSION @PROJECT_VERSION@)
+if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
+    set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
+    set(PACKAGE_VERSION_COMPATIBLE TRUE)
+    if(PACKAGE_VERSION VERSION_EQUAL PACKAGE_FIND_VERSION)
+        set(PACKAGE_VERSION_EXACT TRUE)
+    endif(PACKAGE_VERSION VERSION_EQUAL PACKAGE_FIND_VERSION)
+endif(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera-config.cmake.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera-config.cmake.in	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera-config.cmake.in	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,54 @@
+# MFCamera CMake config file
+#
+# This file sets the following variables:
+# MFCamera_FOUND - Always TRUE.
+# MFCamera_INCLUDE_DIRS - Directories containing the MFCamera include files.
+# MFCamera_IDL_DIRS - Directories containing the MFCamera IDL files.
+# MFCamera_LIBRARIES - Libraries needed to use MFCamera.
+# MFCamera_DEFINITIONS - Compiler flags for MFCamera.
+# MFCamera_VERSION - The version of MFCamera found.
+# MFCamera_VERSION_MAJOR - The major version of MFCamera found.
+# MFCamera_VERSION_MINOR - The minor version of MFCamera found.
+# MFCamera_VERSION_REVISION - The revision version of MFCamera found.
+# MFCamera_VERSION_CANDIDATE - The candidate version of MFCamera found.
+
+message(STATUS "Found MFCamera- at PROJECT_VERSION@")
+set(MFCamera_FOUND TRUE)
+
+find_package(<dependency> REQUIRED)
+
+#set(MFCamera_INCLUDE_DIRS
+#    "@CMAKE_INSTALL_PREFIX@/include/@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@"
+#    ${<dependency>_INCLUDE_DIRS}
+#    )
+#
+#set(MFCamera_IDL_DIRS
+#    "@CMAKE_INSTALL_PREFIX@/include/@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@/idl")
+set(MFCamera_INCLUDE_DIRS
+    "@CMAKE_INSTALL_PREFIX@/include/@CPACK_PACKAGE_FILE_NAME@"
+    ${<dependency>_INCLUDE_DIRS}
+    )
+set(MFCamera_IDL_DIRS
+    "@CMAKE_INSTALL_PREFIX@/include/@CPACK_PACKAGE_FILE_NAME@/idl")
+
+
+if(WIN32)
+    set(MFCamera_LIBRARIES
+        "@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@@PROJECT_NAME_LOWER@@CMAKE_STATIC_LIBRARY_SUFFIX@"
+        ${<dependency>_LIBRARIES}
+        )
+else(WIN32)
+    set(MFCamera_LIBRARIES
+        "@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@@PROJECT_NAME_LOWER@@CMAKE_SHARED_LIBRARY_SUFFIX@"
+        ${<dependency>_LIBRARIES}
+        )
+endif(WIN32)
+
+set(MFCamera_DEFINITIONS ${<dependency>_DEFINITIONS})
+
+set(MFCamera_VERSION @PROJECT_VERSION@)
+set(MFCamera_VERSION_MAJOR @PROJECT_VERSION_MAJOR@)
+set(MFCamera_VERSION_MINOR @PROJECT_VERSION_MINOR@)
+set(MFCamera_VERSION_REVISION @PROJECT_VERSION_REVISION@)
+set(MFCamera_VERSION_CANDIDATE @PROJECT_VERSION_CANDIDATE@)
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera.pc.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera.pc.in	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/mfcamera.pc.in	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,13 @@
+# This file was generated by CMake for @PROJECT_NAME@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/@LIB_INSTALL_DIR@
+includedir=${prefix}/include
+
+Name: @PROJECT_NAME@
+Description: @PROJECT_DESCRIPTION@
+Version: @PROJECT_VERSION@
+Requires: @PKG_DEPS@
+Libs: -L${libdir} @PKG_LIBS@
+Cflags: -I${includedir}/@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/uninstall_target.cmake.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/uninstall_target.cmake.in	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/uninstall_target.cmake.in	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,18 @@
+if(NOT EXISTS "@PROJECT_BINARY_DIR@/install_manifest.txt")
+    message(FATAL_ERROR "Cannot find install manifest: \"@PROJECT_BINARY_DIR@/install_manifest.txt\"")
+endif(NOT EXISTS "@PROJECT_BINARY_DIR@/install_manifest.txt")
+
+file(READ "@PROJECT_BINARY_DIR@/install_manifest.txt" files)
+string(REGEX REPLACE "\n" ";" files "${files}")
+foreach(file ${files})
+    message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
+    if(EXISTS "$ENV{DESTDIR}${file}")
+        exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+                     OUTPUT_VARIABLE rm_out RETURN_VALUE rm_retval)
+        if(NOT "${rm_retval}" STREQUAL 0)
+            message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
+        endif(NOT "${rm_retval}" STREQUAL 0)
+    else(EXISTS "$ENV{DESTDIR}${file}")
+        message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
+    endif(EXISTS "$ENV{DESTDIR}${file}")
+endforeach(file)

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/utils.cmake
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/utils.cmake	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/utils.cmake	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,32 @@
+# Dissect the version specified in PROJECT_VERSION, placing the major,
+# minor, revision and candidate components in PROJECT_VERSION_MAJOR, etc.
+# _prefix: The prefix string for the version variable names.
+macro(DISSECT_VERSION)
+    # Find version components
+    string(REGEX REPLACE "^([0-9]+).*" "\\1"
+        PROJECT_VERSION_MAJOR "${PROJECT_VERSION}")
+    string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1"
+        PROJECT_VERSION_MINOR "${PROJECT_VERSION}")
+    string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1"
+        PROJECT_VERSION_REVISION "${PROJECT_VERSION}")
+    string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+(.*)" "\\1"
+        PROJECT_VERSION_CANDIDATE "${PROJECT_VERSION}")
+endmacro(DISSECT_VERSION)
+
+# Filter a list to remove all strings matching the regex in _pattern. The
+# output is placed in the variable pointed at by _output.
+macro(FILTER_LIST _list _pattern _output)
+    set(${_output})
+    foreach(_item ${${_list}})
+        if("${_item}" MATCHES ${_pattern})
+            set(${_output} ${${_output}} ${_item})
+        endif("${_item}" MATCHES ${_pattern})
+    endforeach(_item)
+endmacro(FILTER_LIST)
+
+macro(MAP_ADD_STR _list _str _output)
+    set(${_output})
+    foreach(_item ${${_list}})
+        set(${_output} ${${_output}} ${_str}${_item})
+    endforeach(_item)
+endmacro(MAP_ADD_STR)

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/wix.xsl.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/wix.xsl.in	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/cmake/wix.xsl.in	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +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="53541B7C-66EC-4CA1-88C5-ED4C441BF1A8" Name="@CPACK_PACKAGE_NAME@ @CPACK_PACKAGE_VERSION@" Language="1041" Codepage="932" Version="@CPACK_PACKAGE_VERSION@" Manufacturer="@CPACK_PACKAGE_VENDOR@" UpgradeCode="573A3D39-984C-48FD-A5BE-4AD42843D6A6">
+        <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>

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/CMakeLists.txt	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/CMakeLists.txt	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +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})
+    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)
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/conf.py.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/conf.py.in	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/conf.py.in	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,216 @@
+# -*- coding: utf-8 -*-
+#
+# MFCamera documentation build configuration file, created by
+# sphinx-quickstart on Mon Aug  8 11:28:05 2011.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['breathe']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.txt'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'@PROJECT_NAME@'
+copyright = u'@PROJECT_COPYRIGHT_YEAR@, @PROJECT_AUTHOR@'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '@PROJECT_VERSION_MAJOR at .@PROJECT_VERSION_MINOR@'
+# The full version, including alpha/beta/rc tags.
+release = '@PROJECT_VERSION@'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = '@PROJECT_NAME at doc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', '@PROJECT_NAME at .tex', u'@PROJECT_NAME@ Documentation',
+   u'@PROJECT_AUTHOR@', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', '@PROJECT_NAME@', u'@PROJECT_NAME@ Documentation',
+     [u'@PROJECT_AUTHOR@'], 1)
+]

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/content/index.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/content/index.txt	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/content/index.txt	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,142 @@
+MFCameraName - 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
+============
+
+MFCamera 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
+``MFCameraComp`` executable. The ``MFCamera`` library
+is available for loading into a manager, using the initialisation function
+``MFCameraInit``.
+
+From source
+-----------
+
+Follow these steps to install MFCamera from source in any operating
+system:
+
+- Download the source, either from the repository or a source archive,
+  and extract it somewhere::
+
+    tar -xvzf MFCamera-1.0.0.tar.gz
+
+- Change to the directory containing the extracted source::
+
+    cd MFCamera-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.
+
+MFCamera can be launched in stand-alone mode by executing the
+``MFCameraComp`` executable (installed into ``${prefix}/components/bin``).
+Alternatively, ``libMFCamera.so`` can be loaded into a manager, using the
+initialisation function ``MFCameraInit``. 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
+================ ================== ================ ======
+device_id        int                0                
+vfmt_id          int                0                
+================ ================== ================ ======
+
+Ports
+=====
+
+The ports provided by the component are described below:
+
+=============== =========== ============================== =======
+Name            Type        Data type                      Purpose
+=============== =========== ============================== =======
+out             OutPort     RTC::CameraImage               
+=============== =========== ============================== =======
+
+Examples
+========
+
+An example configuration file is provided in the
+``${prefix}/components/share/MFCamera/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.
+

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

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/doxyfile.in
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/doxyfile.in	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/doc/doxyfile.in	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,297 @@
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING      = UTF-8
+PROJECT_NAME           = "@PROJECT_NAME@"
+PROJECT_NUMBER         = @PROJECT_VERSION@
+OUTPUT_DIRECTORY       = "@doxygen_dir@"
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = YES
+STRIP_FROM_PATH        = 
+STRIP_FROM_INC_PATH    = @PROJECT_SOURCE_DIR@/include
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = YES
+QT_AUTOBRIEF           = NO
+MULTILINE_CPP_IS_BRIEF = NO
+INHERIT_DOCS           = YES
+SEPARATE_MEMBER_PAGES  = NO
+TAB_SIZE               = 2
+ALIASES                = 
+OPTIMIZE_OUTPUT_FOR_C  = NO
+OPTIMIZE_OUTPUT_JAVA   = NO
+OPTIMIZE_FOR_FORTRAN   = NO
+OPTIMIZE_OUTPUT_VHDL   = NO
+EXTENSION_MAPPING      = 
+BUILTIN_STL_SUPPORT    = NO
+CPP_CLI_SUPPORT        = NO
+SIP_SUPPORT            = NO
+IDL_PROPERTY_SUPPORT   = YES
+DISTRIBUTE_GROUP_DOC   = NO
+SUBGROUPING            = YES
+TYPEDEF_HIDES_STRUCT   = NO
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = NO
+EXTRACT_STATIC         = NO
+EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_METHODS  = NO
+EXTRACT_ANON_NSPACES   = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = NO
+CASE_SENSE_NAMES       = NO
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+FORCE_LOCAL_INCLUDES   = NO
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_MEMBERS_CTORS_1ST = NO
+SORT_GROUP_NAMES       = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+SHOW_DIRECTORIES       = YES
+SHOW_FILES             = YES
+SHOW_NAMESPACES        = YES
+FILE_VERSION_FILTER    = 
+LAYOUT_FILE            = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = YES
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = "@PROJECT_SOURCE_DIR@" \
+                         "@PROJECT_SOURCE_DIR@/doc"
+INPUT_ENCODING         = UTF-8
+FILE_PATTERNS          = *.h \
+                         *.hpp \
+                         *.doxy
+RECURSIVE              = YES
+EXCLUDE                = "@PROJECT_SOURCE_DIR@/cmake" \
+                         "@PROJECT_SOURCE_DIR@/build"
+EXCLUDE_SYMLINKS       = YES
+EXCLUDE_PATTERNS       = 
+EXCLUDE_SYMBOLS        = 
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = *
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = 
+INPUT_FILTER           = 
+FILTER_PATTERNS        = 
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = YES
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION    = NO
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS              = NO
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = YES
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            =
+HTML_STYLESHEET        = 
+HTML_COLORSTYLE_HUE    = 220
+HTML_COLORSTYLE_SAT    = 100
+HTML_COLORSTYLE_GAMMA  = 80
+HTML_TIMESTAMP         = YES
+HTML_ALIGN_MEMBERS     = YES
+HTML_DYNAMIC_SECTIONS  = NO
+GENERATE_DOCSET        = YES
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+DOCSET_BUNDLE_ID       = @PROJECT_NAME_LOWER at .@PROJECT_AUTHOR_SHORT@
+DOCSET_PUBLISHER_ID    = @PROJECT_NAME_LOWER at .@PROJECT_AUTHOR_SHORT at .Publisher
+DOCSET_PUBLISHER_NAME  = @PROJECT_AUTHOR@/@PROJECT_VENDOR@
+GENERATE_HTMLHELP      = YES
+CHM_FILE               = "@PROJECT_NAME at -@PROJECT_VERSION_MAJOR at .@PROJECT_VERSION_MINOR at .chm"
+HHC_LOCATION           = "@HTML_HELP_COMPILER@"
+GENERATE_CHI           = NO
+CHM_INDEX_ENCODING     = 
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+GENERATE_QHP           = NO
+QCH_FILE               = 
+QHP_NAMESPACE          = @PROJECT_NAME_LOWER at .@PROJECT_AUTHOR_SHORT at .Project
+QHP_VIRTUAL_FOLDER     = doc
+QHP_CUST_FILTER_NAME   = 
+QHP_CUST_FILTER_ATTRS  = 
+QHP_SECT_FILTER_ATTRS  = 
+QHG_LOCATION           = 
+GENERATE_ECLIPSEHELP   = NO
+ECLIPSE_DOC_ID         = @PROJECT_NAME_LOWER at .@PROJECT_AUTHOR_SHORT at .Project
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = NO
+USE_INLINE_TREES       = NO
+TREEVIEW_WIDTH         = 250
+EXT_LINKS_IN_WINDOW    = NO
+FORMULA_FONTSIZE       = 10
+FORMULA_TRANSPARENT    = YES
+SEARCHENGINE           = YES
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = YES
+USE_PDFLATEX           = YES
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_OUTPUT             = xml
+XML_SCHEMA             = 
+XML_DTD                = 
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = NO
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = *.h
+PREDEFINED             = 
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = 
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+MSCGEN_PATH            = 
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = YES
+DOT_NUM_THREADS        = 0
+DOT_FONTNAME           = FreeSans.ttf
+DOT_FONTSIZE           = 10
+DOT_FONTPATH           = 
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+GROUP_GRAPHS           = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = NO
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+CALLER_GRAPH           = NO
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = 
+DOTFILE_DIRS           = 
+DOT_GRAPH_MAX_NODES    = 50
+MAX_DOT_GRAPH_DEPTH    = 0
+DOT_TRANSPARENT        = NO
+DOT_MULTI_TARGETS      = NO
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/idl/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/idl/CMakeLists.txt	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/idl/CMakeLists.txt	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +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)
+FILTER_LIST("${ALL_IDL_SRCS}" "hh$" idl_headers)
+#install(FILES ${idl_headers}
+#    DESTINATION ${INC_INSTALL_DIR}/${PROJECT_NAME_LOWER}/idl
+#    COMPONENT headers)
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/CMakeLists.txt	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/CMakeLists.txt	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,4 @@
+add_subdirectory(MFCamera)
+
+MAP_ADD_STR(hdrs "${PROJECT_NAME}/" headers)
+set(headers ${headers} PARENT_SCOPE)

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/CMakeLists.txt	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/CMakeLists.txt	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,9 @@
+set(hdrs MFCamera.h
+#    PARENT_SCOPE
+    MFUtils.h
+    MFCapture.h
+    )
+
+#install(FILES ${hdrs} DESTINATION ${INC_INSTALL_DIR}/${PROJECT_NAME_LOWER}
+#    COMPONENT library)
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFCamera.h
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFCamera.h	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFCamera.h	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,291 @@
+// -*- C++ -*-
+/*!
+ * @file  MFCamera.h
+ * @brief Media Foundation Camera component
+ * @date  $Date$
+ *
+ * $Id$
+ */
+
+#ifndef MFCAMERA_H
+#define MFCAMERA_H
+
+#include "MFCapture.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>
+
+// 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 MFCamera
+ * @brief USB Camera Acquire component
+ *
+ */
+class MFCamera
+  : public RTC::DataFlowComponentBase
+{
+ public:
+  /*!
+   * @brief constructor
+   * @param manager Maneger Object
+   */
+  MFCamera(RTC::Manager* manager);
+
+  /*!
+   * @brief destructor
+   */
+  ~MFCamera();
+
+  // <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:  device_id
+   * - DefaultValue: 0
+   */
+  int m_device_id;
+  /*!
+   * 
+   * - Name:  vfmt_id
+   * - DefaultValue: 0
+   */
+  int m_vfmt_id;
+
+  // </rtc-template>
+
+  // DataInPort declaration
+  // <rtc-template block="inport_declare">
+  
+  // </rtc-template>
+
+
+  // DataOutPort declaration
+  // <rtc-template block="outport_declare">
+  RTC::CameraImage m_out;
+  /*!
+   */
+  OutPort<RTC::CameraImage> m_outOut;
+  
+  // </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>
+
+  MFCapture* m_capture;	
+};
+
+
+extern "C"
+{
+  DLL_EXPORT void MFCameraInit(RTC::Manager* manager);
+};
+
+#endif // MFCAMERA_H

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFCapture.h
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFCapture.h	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFCapture.h	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,419 @@
+/*
+
+*/
+
+#ifndef __MF_CAPTURE_H__
+#define __MF_CAPTURE_H__
+
+#include "MFUtils.h"
+
+#include<opencv/cv.h>
+#include<opencv/cxcore.h>
+#include<opencv/highgui.h>
+
+enum FMT_Values {
+  FMT_RGB24, FMT_YUY2, FMT_UNKNOWN=256
+};
+
+/*
+ * Helper Class for Video Capture using Media Foudation
+ *
+ */
+class MFCapture
+{
+  /*
+   *  Hepler Class for  Supported Video Format
+   */
+   class VideoFormat
+   {
+    /*
+     *  Properties
+     */
+     FMT_Values format;
+     UINT32 width, height;
+     UINT32 index;
+     std::string name;
+
+   public:
+     /*
+      * Construcors
+      */
+     VideoFormat(): format(FMT_UNKNOWN), width(0),height(0), index(-1), next(NULL), prev(NULL) { toString(); }
+     
+     VideoFormat(FMT_Values fmt, UINT32 w, UINT32 h, UINT32 idx): format(fmt), width(w),height(h),
+           index(idx),next(NULL), prev(NULL) { toString(); }
+
+     /*
+      * Deconstructor
+      */
+     ~VideoFormat()
+     {
+       VideoFormat *tmp=this->next;
+       if(tmp){ delete tmp; }
+       this->next=NULL;
+     }
+
+     /*
+      * Compare Video Format
+      */
+     BOOL equalto(FMT_Values fmt, UINT32 w, UINT32 h)
+     {
+       if(this->format == fmt && this->width == w && this->height == h) return TRUE;
+       return FALSE;
+     }
+
+     BOOL equalto(std::string var)
+     {
+       return (name == var);
+     }
+
+     /*
+      *  Check Format List
+      */
+     BOOL isMember(FMT_Values fmt, UINT32 w, UINT32 h)
+     {
+       VideoFormat *tmp = this;
+       do {
+         if(tmp->equalto(fmt,w,h)){ return TRUE; }
+         else tmp = tmp->next;
+       } while(tmp);
+
+       return FALSE;
+     }
+
+     /*
+      * Append format
+      */
+     void append(FMT_Values fmt, UINT32 w, UINT32 h, UINT32 idx)
+     {
+       if(isMember(fmt, w, h) == FALSE)
+       {
+         VideoFormat *lst = last();
+         lst->next = new VideoFormat(fmt, w, h, idx);
+         lst->next->prev = lst;
+       }
+     }
+
+     /*
+      *  Convert to string
+      */
+     std::string toString()
+     {
+       if(format == FMT_RGB24)
+       {
+         name = std::string("RGB24_");
+       }else if(format == FMT_YUY2){
+         name = std::string("YUY2_");
+       }else{
+         name = std::string("UNKNOWN_");
+       }
+       name = name + std::to_string(width);
+       name = name + std::string("x") + std::to_string(height);
+       return name;
+     }
+
+     /*
+      *  Print format list to stdout
+      */
+     void printAll()
+     {
+       VideoFormat *tmp=this;
+       std::cout << "====== printAll ==========" << std::endl;
+       do {
+         std::cout << tmp->index << ": " << tmp->name << std::endl;
+         tmp = tmp->next;
+       } while(tmp);
+     }
+
+     /*
+      * Return length of format list
+      */
+     UINT32 length()
+     {
+       UINT32 len=0;
+       VideoFormat *tmp=this->top();
+       do {
+         len += 1;
+         if(tmp->next == NULL) { break;}
+         tmp = tmp->next;
+       } while(tmp);
+
+       return len;
+     }
+
+     /*
+      * get VideoFormat by nth value from the format list
+      */
+     VideoFormat *get(UINT32 idx)
+     {
+       UINT32 pos=0;
+       VideoFormat *tmp=this->top();
+       do {
+         pos += 1;
+         if(pos > idx) { break;}
+         tmp = tmp->next;
+       } while(tmp);
+
+       return tmp;
+     }
+
+     /*
+      * get the index value of the format list from an index of IMFMedeiaType List
+      */
+     INT32 getIndex(DWORD idx)
+     {
+       INT32 res = -1;
+
+       VideoFormat *tmp=this->top();
+       do {
+         res += 1;
+         if(tmp->index == idx) { return res;}
+         if(tmp->next == NULL) { break;}
+         tmp = tmp->next;
+       } while(tmp);
+
+       return -1;
+     }
+
+     /*
+      * get the next diffrent index value of IMFMedeiaType List
+      *  Input: 'idx' is the index value of IMFMediaType List 
+      */
+     INT32 getNextId(DWORD idx)
+     {
+       INT32 n = getIndex(idx)+1;
+       INT32 len = length();
+       INT32 res = 0;
+       if(len == n)
+       {
+         res = get(1)->index;
+       }else{
+         res = get(n)->index;
+       }
+       return res;
+     }
+
+     /*
+      *  get the index value
+      */
+     INT32 getIndexByName(const char* str)
+     {
+       UINT32 pos=0;
+       VideoFormat *tmp=this->top();
+       do {
+         pos += 1;
+         if(tmp->equalto(std::string(str))) { return tmp->index; }
+         if(tmp->next == NULL) { break;}
+         tmp = tmp->next;
+       } while(tmp);
+
+       return -1;
+     }
+
+     /*
+      *  get the last VideoFormat from the format list
+      */
+     VideoFormat *last()
+     {
+       VideoFormat *tmp=this;
+       do {
+         if(tmp->next == NULL) { return tmp;}
+         tmp = tmp->next;
+       } while(tmp);
+
+       return NULL;
+     }
+
+     /*
+      *  get the first VideoFormat from the format list
+      */
+     VideoFormat *top()
+     {
+       VideoFormat *tmp=this;
+       do {
+         if(tmp->prev == NULL) { return tmp;}
+         tmp = tmp->prev;
+       } while(tmp);
+
+       return NULL;
+     }
+
+     /*
+      * pointers for the format list
+      */
+     VideoFormat *next;
+     VideoFormat *prev;
+   };  /// end of VideoFormat Class.
+
+public:    
+  /*
+   *  Methods of MFCapture
+   */
+  MFCapture();
+  ~MFCapture();
+  /*
+   *  Activate Capture Device
+   */
+  HRESULT ActivateDevice(INT32 id=0);
+  /*
+   *  Shutdown Capture Device
+   */
+  HRESULT ShutdownDevice();
+
+  /*
+   * get IMFMediaTypeHandler
+   */
+  HRESULT GetMediaTypeHandler();
+  /*
+   * get the current IMFMediaType from the capture device
+   */
+  HRESULT GetCurrentType();
+  /*
+   * get the attributes of IMFMediaType.
+   * If the arg equal to NULL, the current IMFMediaType used
+   */
+  HRESULT GetMediaTypeInfo(IMFMediaType *type=NULL);
+  /*
+   * Create Image Buffer for OpenCV operations.
+   * This function allocate image buffer.
+   */
+  void CreateImageBuffer(UINT depth=IPL_DEPTH_8U, UINT32 channels=3);
+  /*
+   *  Create SourceReader from media source.
+   */
+  HRESULT CreateSourceReader();
+  /*
+   *  get IMFSample  
+   */
+  HRESULT GetSample();
+  /*
+   *  get the image data
+   *   The image data will store in image_buf(IplImage).
+   *   If the video format is 'YUY2', the date will convert to RGB24 format.
+   */
+  IplImage *MFCapture::GetBufferData();
+
+  /*
+   * Enumarate available capture device.
+   * This function shoule called in 'AvtivateDevice'.
+   */
+  HRESULT EnumerateCaptureFormats();
+
+  /*
+   *  Set Video Format by Index of IMFMEdiaType list
+   */
+  HRESULT SetDeviceFormat(DWORD idx);
+
+  /*
+   *  Set Video Format by  the name of VideoFormat
+   */
+  INT32 SetDeviceFormatByName(const char *name);
+
+  /*
+   * Display summary of IMFMediaType's attribute
+   */
+  HRESULT ShowMediaTypeInfo(IMFMediaType *pType=NULL, int i=0);
+
+  /*
+   * Display list of VideoFormat 
+   */
+  void PrintFormatList(){ this->video_format->printAll(); }
+
+  /*
+   *  get avaiable the next index of IMFMediaType list
+   */
+  INT32 GetNextFormatID(INT32 id){ return this->video_format->getNextId(id); }
+
+  /*
+   *  get avaiable IMFMediaType Index by Name
+   */
+  INT32 GetFormatIndexByName(char *buf){ return this->video_format->getIndexByName(buf); }
+
+  /*
+   * Old method initialize capture device
+   */
+  HRESULT SelectDevice(UINT32 idx);
+  /*
+   * Test implementation for MFT
+   */
+  HRESULT EnumerateMFT(GUID inType, GUID outType);
+  IMFSample *ConvertToRGB();
+protected:
+  /*
+   *  Free all elements of outMediaTypes.
+   */
+  HRESULT FreeOutMediaTypes();
+
+private:
+  /*
+   *  Handler
+   */
+  HRESULT hr;
+
+public:
+  /*
+   * Attribute
+   */
+  IMFAttributes *pAttributes;
+  /*
+   *  Number of video source devices.
+   */ 
+  UINT32 nDevs;
+  /*
+   *   Device ID = The index value of video source device list.
+   */ 
+  INT32 devId;
+  /*
+   *  IMFActivate for the video source device list
+   */
+  IMFActivate **ppDevices;
+
+  /*
+   *  Media Source
+   */
+  IMFMediaSource *pSource;
+  /*
+   * Handler for MediaType
+   */
+  IMFMediaTypeHandler *pHandler;
+  /*
+   * List of availabel MediaTypes
+   */
+  IMFMediaType **outMediaTypes;
+  DWORD numOutMediaTypes;
+  /*
+   *  Media  Foundation Reader.
+   */
+  IMFSourceReader *pReader;
+  /*
+   *  Sampler
+   */
+  IMFSample *pSample;
+
+  /*
+   *  ID of YUV Convertion Matrix
+   */
+  UINT32 YUV_Matrix;
+
+  /*
+   * Current MediaType
+   */
+  IMFMediaType *pType;
+  GUID   image_format;
+
+  INT32  image_stride;
+  UINT32 image_length;
+  UINT32 image_width, image_height;
+  IplImage *image_buf;
+
+  /*
+   *  List of VideoFormat
+   */
+  class VideoFormat *video_format;
+
+  ////  TEST for MediaFoundation Transform
+  IMFTransform *pMFT;
+};
+
+
+#endif

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFUtils.h
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFUtils.h	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/include/MFCamera/MFUtils.h	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,144 @@
+/*
+
+
+*/
+#ifndef _MF_UTIL_H_
+#define _MF_UTIL_H_
+
+#include <stdio.h>
+#include <tchar.h>
+
+#include <iostream>
+#include <string>
+
+
+#ifdef _WIN32_WINNT
+#undef _WIN32_WINNT  //0x601
+#endif
+
+#include <new>
+#include <windows.h>
+#include <windowsx.h>
+#include <mfapi.h>
+#include <mfidl.h>
+#include <mferror.h>
+#include <mfcaptureengine.h>
+#include <mfreadwrite.h>
+#include <shlwapi.h>
+#include <strsafe.h>
+#include <commctrl.h>
+#include <d3d11.h>
+
+
+#pragma comment(lib, "powrprof.lib")
+#pragma comment(lib, "d3d11.lib")
+#pragma comment(lib, "mf.lib")
+#pragma comment(lib, "mfplat.lib")
+#pragma comment(lib, "mfuuid.lib")
+#pragma comment(lib, "mfreadwrite.lib")
+
+
+#ifndef IF_EQUAL_RETURN
+#define IF_EQUAL_RETURN(param, val) if(val == param) return #val
+#endif
+
+#ifndef FORMAT_MATCH
+#define FORMAT_MATCH(param, val, type) if(val == param) return type
+#endif
+
+
+/*
+  FUNCTION: SafeRelese (from MSDN)
+
+*/
+template <class T> void SafeRelease(T **ppT)
+{
+  if (*ppT)
+  {
+    (*ppT)->Release();
+    *ppT = NULL;
+  }
+}
+
+/*
+   Functions
+*/
+LPCSTR GetFormatName(const GUID &format);
+
+/*
+ * Start/End Media Foundation
+ */
+HRESULT startMediaFoundation();
+void endMediaFoundation();
+
+/*
+ * Get Values from IMFMediaType
+ * Attribute Keys of IMFMediaType:
+ *    MF_MT_MAJOR_TYPE:  Major type GUID (Audio or Video)
+ *    MF_MT_SUBTYPE:     Subtype GUID
+ *    MF_MT_FORMAT_TYPE: Format GUID
+ *    MF_MT_SAMPLE_SIZE: Size of each sample, in btyes
+ *    MF_MT_ALL_SAMPLES_INDEPENDT
+ *    MF_MT_FIXED_SIZE_SAMPLES
+ *    MF_MT_COMPRESSED
+ *    MF_WRAPPED_TYPE
+ *    MF_USER_DATA
+ *
+ *    Video Format Attributes:
+ *    MF_MT_AVG_BIT_ERROR_RATE
+ *    MF_MT_AVG_BITRATE
+ *    MF_MT_CUSTOM_VIDEO_PRIMARIES
+ *    MF_MT_DEFAULT_STRIDE
+ *    MF_MT_DRM_FLAGS
+ *    MF_MT_FRAME_RATE
+ *    MF_MT_FRAME_RATE_RANGE_MAX
+ *    MF_MT_FRAME_RATE_RANGE_MIN
+ *    MF_MT_FRAME_SIZE
+ *    MF_MT_GEOMETRIC_APERTURE
+ *    MF_MT_INTERRACE_MODE
+ *    MF_MT_MAX_KEYFRAME_SPACING
+ *    MF_MT_MINIMUM_DISPLAY_APERTURE
+ *    MF_MT_MPEG_SEQUENCE_HEADER
+ *    MF_MT_MPEG_START_TIME_CODE
+ *    MF_MT_MPEG2_FLAGS
+ *    MF_MT_MPEG2_LEVEL
+ *    MF_MT_MPEG2_PROFILE
+ *    MF_MT_ORIGINAL_4CC
+ *    MF_MT_PAD_SCAN_APERTURE
+ *    MF_MT_PALETTE
+ *    MF_MT_PAN_SCAN_APERTURE
+ *    MF_MT_PAN_SCAN_ENABLED
+ *    MF_MT_PIXEL_ASPECT_RATIO
+ *    MF_MT_SOURCE_CONTENT_HINT
+ *    MF_MT_TRANSFER_FUNCTION
+ *    MF_MT_VIDEO_3D
+ *    MF_MT_VIDEO_CHROMA_TITING
+ *    MF_MT_VIDEO_LIGHTING
+ *    MF_MT_VIDEO_NORMAL_RANGE
+ *    MF_MT_VIDEO_PRIMARIES
+ *    MF_MT_VIDEO_ROTATION
+ *    MF_MT_YUV_MATRIX
+ *    MF_XVP_DISABLE_FRC
+ */
+HRESULT GetGUID_FromMediaType(IMFMediaType *type, REFGUID key, GUID *guid);
+HRESULT GetUINT32_FromMediaType(IMFMediaType *type, REFGUID key, UINT32 *length);
+HRESULT GetINT32_FromMediaType(IMFMediaType *type, REFGUID key, INT32 *length);
+HRESULT GetTwoUINT32_FromMediaType(IMFMediaType *type, REFGUID key, UINT32 *v1, UINT32 *v2);
+
+/*
+ *  Check IMFMediaType
+ */
+HRESULT IsVideoType(IMFMediaType *type, BOOL *b);
+BOOL CheckMediaFormat(IMFMediaType *type, GUID format);
+BOOL IsSameMediaType(IMFMediaType *type,
+	       	GUID format, UINT32 width, UINT32 height);
+
+/*
+ * Color Conversion : YUV -> RGB24
+ *
+ *
+ */
+int YUY2_to_RGB(char *yuy2_image, char *rgb_image,
+	       	int rgb_image_width, int rgb_image_height,
+	       	int yuy2_image_size, int coversion_type);
+#endif

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/rtc.conf
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/rtc.conf	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/rtc.conf	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,2 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
\ No newline at end of file

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/CMakeLists.txt	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/CMakeLists.txt	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,82 @@
+set(comp_srcs MFCamera.cpp MFUtils.cpp MFCapture.cpp)
+set(standalone_srcs MFCameraComp.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)
+target_link_libraries(${PROJECT_NAME} ${OPENRTM_LIBRARIES} ${OpenCV_LIBS})
+
+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 ${INSTALL_PREFIX} COMPONENT component
+    LIBRARY DESTINATION ${INSTALL_PREFIX} COMPONENT component
+    ARCHIVE DESTINATION ${INSTALL_PREFIX} COMPONENT component)
+
+
+if (SolutionDir)
+  if (MSVC)
+    add_custom_command(
+      TARGET ${PROJECT_NAME}
+      POST_BUILD
+      COMMAND ${CMAKE_COMMAND} -E 
+        copy ${PROJECT_BINARY_DIR}/src/Release/${PROJECT_NAME}.dll ${SolutionDir}/bin
+    )
+    add_custom_command(
+      TARGET ${PROJECT_NAME}Comp
+      POST_BUILD
+      COMMAND ${CMAKE_COMMAND} -E 
+        copy ${PROJECT_BINARY_DIR}/src/Release/${PROJECT_NAME}Comp.exe ${SolutionDir}/bin
+    )
+
+  else (MSVC)
+    add_custom_command(
+      TARGET ${PROJECT_NAME}Comp
+      POST_BUILD
+      COMMAND ${CMAKE_COMMAND} -E 
+        copy ${PROJECT_BINARY_DIR}/src/${PROJECT_NAME}Comp ${SolutionDir}/bin
+    )
+  endif (MSVC)
+endif (SolutionDir)

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCamera.cpp
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCamera.cpp	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCamera.cpp	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,285 @@
+// -*- C++ -*-
+/*!
+ * @file  MFCamera.cpp
+ * @brief Media Foundation Camera component
+ * @date $Date$
+ *
+ * $Id$
+ */
+
+#include "MFCamera.h"
+#include <iostream>
+using namespace std;
+
+// Module specification
+// <rtc-template block="module_spec">
+static const char* mfcamera_spec[] =
+  {
+    "implementation_id", "MFCamera",
+    "type_name",         "MFCamera",
+    "description",       "USB Camera Acquire component",
+    "version",           "1.1.0",
+    "vendor",            "AIST",
+    "category",          "example",
+    "activity_type",     "PERIODIC",
+    "kind",              "DataFlowComponent",
+    "max_instance",      "1",
+    "language",          "C++",
+    "lang_type",         "compile",
+    // Configuration variables
+    "conf.default.device_id", "0",
+    "conf.default.vfmt_id", "0",
+    // Widget
+    "conf.__widget__.device_id", "text",
+    "conf.__widget__.vfmt_id", "text",
+    // Constraints
+    ""
+  };
+// </rtc-template>
+  int device_id_old = 1000;
+  int vfmt_id_old = 1000;
+
+/*!
+ * @brief constructor
+ * @param manager Maneger Object
+ */
+MFCamera::MFCamera(RTC::Manager* manager)
+    // <rtc-template block="initializer">
+  : RTC::DataFlowComponentBase(manager),
+    m_outOut("out", m_out),
+    m_capture(NULL)
+    // </rtc-template>
+{
+}
+
+/*!
+ * @brief destructor
+ */
+MFCamera::~MFCamera()
+{
+  endMediaFoundation();
+}
+
+
+
+RTC::ReturnCode_t MFCamera::onInitialize()
+{
+  // Registration: InPort/OutPort/Service
+  // <rtc-template block="registration">
+  // Set InPort buffers
+  
+  // Set OutPort buffer
+  addOutPort("out", m_outOut);
+  
+  // Set service provider to Ports
+  
+  // Set service consumers to Ports
+  
+  // Set CORBA Service Ports
+  
+  // </rtc-template>
+
+  startMediaFoundation();
+
+  m_capture = new MFCapture();
+//  m_num_devices = m_capture->nDevs;
+
+  std::cout<< "Num of device = "<< m_capture->nDevs << std::endl;
+  // <rtc-template block="bind_config">
+  // Bind variables and configuration variable
+  bindParameter("device_id", m_device_id, "0");
+  bindParameter("vfmt_id", m_vfmt_id, "0");
+  // </rtc-template>  
+
+  return RTC::RTC_OK;
+}
+
+
+RTC::ReturnCode_t MFCamera::onFinalize()
+{
+  endMediaFoundation();
+
+  return RTC::RTC_OK;
+}
+
+/*
+RTC::ReturnCode_t MFCamera::onStartup(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t MFCamera::onShutdown(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+
+RTC::ReturnCode_t MFCamera::onActivated(RTC::UniqueId ec_id)
+{
+  HRESULT hr;
+
+  if(m_capture == NULL){
+    m_capture = new MFCapture();
+  }
+  
+  if(m_capture->nDevs == 0)
+  {
+    std::cout<<"ビデオキャプチャデバイスは存在しません"<<std::endl;
+    return RTC::RTC_ERROR;
+  }
+
+  std::cout<< "ビデオキャプチャデバイスは "<< m_capture->nDevs << std::endl;
+  /// 
+  hr = m_capture->ActivateDevice(m_device_id);
+  if(FAILED(hr))
+  {
+    return RTC::RTC_ERROR; 
+  }
+  std::cout<< "Format:"<< m_vfmt_id <<  std::endl;
+  hr = m_capture->SetDeviceFormat(m_vfmt_id);
+  if(FAILED(hr))
+  {
+    return RTC::RTC_ERROR; 
+  }
+  m_capture->CreateImageBuffer();
+
+  device_id_old = m_device_id;
+  vfmt_id_old = m_vfmt_id;
+  
+  return RTC::RTC_OK;
+}
+
+
+RTC::ReturnCode_t MFCamera::onDeactivated(RTC::UniqueId ec_id)
+{
+  if(m_capture){
+    delete m_capture;
+    m_capture=NULL;
+  }
+
+  device_id_old = 1000;
+
+  return RTC::RTC_OK;
+}
+
+
+RTC::ReturnCode_t MFCamera::onExecute(RTC::UniqueId ec_id)
+{
+    static coil::TimeValue tm_pre;
+    static int count = 0;
+    
+    if(m_device_id != device_id_old){
+#if 1 
+	if (device_id_old != 1000)
+	{
+	  delete m_capture;
+	}
+
+	device_id_old = m_device_id;
+	m_capture = new MFCapture();
+	m_capture->ActivateDevice(m_device_id);
+	m_capture->SetDeviceFormat(m_vfmt_id);
+	m_capture->CreateImageBuffer();
+#endif
+    }
+
+    if(m_vfmt_id != vfmt_id_old){
+	vfmt_id_old = m_vfmt_id;
+	delete m_capture;
+	m_capture = new MFCapture();
+	m_capture->ActivateDevice(m_device_id);
+	m_capture->SetDeviceFormat(m_vfmt_id);
+	m_capture->CreateImageBuffer();
+	std::cout << "Format = "<< m_vfmt_id << std::endl;
+    }
+
+    if(!m_capture->image_buf)
+    {
+      std::cout << "No image buffer..." << std::endl;
+      return RTC::RTC_ERROR; 
+    }
+
+    if(m_capture->GetBufferData())
+    {
+      m_out.pixels.length(m_capture->image_length);
+      m_out.width  = m_capture->image_buf->width;
+      m_out.height = m_capture->image_buf->height;
+
+      memcpy((void *)&(m_out.pixels[0]), m_capture->image_buf->imageData, m_capture->image_length);
+      m_outOut.write();
+    }
+    
+    if (count > 100)
+    {
+      count = 0;
+      coil::TimeValue tm;
+      tm = coil::gettimeofday();
+
+      double sec(tm - tm_pre);
+
+      if (sec > 1.0 && sec < 1000.0)
+      {
+        std::cout << 100/sec << " [FPS]" << std::endl;
+      }
+
+      tm_pre = tm;
+    }
+    ++count;
+
+    return RTC::RTC_OK;
+}
+
+/*
+RTC::ReturnCode_t MFCamera::onAborting(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t MFCamera::onError(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t MFCamera::onReset(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t MFCamera::onStateUpdate(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t MFCamera::onRateChanged(RTC::UniqueId ec_id)
+{
+  return RTC::RTC_OK;
+}
+*/
+
+
+
+extern "C"
+{
+ 
+  void MFCameraInit(RTC::Manager* manager)
+  {
+    coil::Properties profile(mfcamera_spec);
+    manager->registerFactory(profile,
+                             RTC::Create<MFCamera>,
+                             RTC::Delete<MFCamera>);
+  }
+  
+};
+
+

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCameraComp.cpp
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCameraComp.cpp	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCameraComp.cpp	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,97 @@
+// -*- C++ -*-
+/*!
+ * @file MFCameraComp.cpp
+ * @brief Standalone component
+ * @date $Date$
+ *
+ * $Id$
+ */
+
+#include <rtm/Manager.h>
+#include <iostream>
+#include <string>
+#include <stdlib.h>
+#include "MFCamera.h"
+
+
+void MyModuleInit(RTC::Manager* manager)
+{
+  MFCameraInit(manager);
+  RTC::RtcBase* comp;
+
+  // Create a component
+  comp = manager->createComponent("MFCamera");
+
+  if (comp==NULL)
+  {
+    std::cerr << "Component create failed." << std::endl;
+    abort();
+  }
+
+  // Example
+  // The following procedure is examples how handle RT-Components.
+  // These should not be in this function.
+
+  // Get the component's object reference
+//  RTC::RTObject_var rtobj;
+//  rtobj = RTC::RTObject::_narrow(manager->getPOA()->servant_to_reference(comp));
+
+  // Get the port list of the component
+//  PortServiceList* portlist;
+//  portlist = rtobj->get_ports();
+
+  // getting port profiles
+//  std::cout << "Number of Ports: ";
+//  std::cout << portlist->length() << std::endl << std::endl; 
+//  for (CORBA::ULong i(0), n(portlist->length()); i < n; ++i)
+//  {
+//    PortService_ptr port;
+//    port = (*portlist)[i];
+//    std::cout << "Port" << i << " (name): ";
+//    std::cout << port->get_port_profile()->name << std::endl;
+//    
+//    RTC::PortInterfaceProfileList iflist;
+//    iflist = port->get_port_profile()->interfaces;
+//    std::cout << "---interfaces---" << std::endl;
+//    for (CORBA::ULong i(0), n(iflist.length()); i < n; ++i)
+//    {
+//      std::cout << "I/F name: ";
+//      std::cout << iflist[i].instance_name << std::endl;
+//      std::cout << "I/F type: ";
+//      std::cout << iflist[i].type_name << std::endl;
+//      const char* pol;
+//      pol = iflist[i].polarity == 0 ? "PROVIDED" : "REQUIRED";
+//      std::cout << "Polarity: " << pol << std::endl;
+//    }
+//    std::cout << "---properties---" << std::endl;
+//    NVUtil::dump(port->get_port_profile()->properties);
+//    std::cout << "----------------" << std::endl << std::endl;
+//  }
+
+  return;
+}
+
+int main (int argc, char** argv)
+{
+  RTC::Manager* manager;
+  manager = RTC::Manager::init(argc, argv);
+
+  // Initialize manager
+  manager->init(argc, argv);
+
+  // Set module initialization proceduer
+  // This procedure will be invoked in activateManager() function.
+  manager->setModuleInitProc(MyModuleInit);
+
+  // Activate manager and register to naming service
+  manager->activateManager();
+
+  // run the manager in blocking mode
+  // runManager(false) is the default.
+  manager->runManager();
+
+  // If you want to run the manager in non-blocking mode, do like this
+  // manager->runManager(true);
+
+  return 0;
+}

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCapture.cpp
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCapture.cpp	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFCapture.cpp	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,699 @@
+/*
+ *  Image Capture Device Class for Media Foundation
+ *  This Class support only sync mode.
+ *
+ *  
+ *   Copyright(C) Isao Hara, 2014, AIST Japan
+ */
+
+#include "MfCapture.h"
+
+/*
+ *  Constructor
+ */
+MFCapture::MFCapture() : nDevs(0), devId(-1), image_width(0), image_height(0),
+      image_buf(NULL), pSource(NULL), pReader(NULL), pAttributes(NULL),
+      ppDevices(NULL), pType(NULL),  image_format(MFVideoFormat_RGB24), YUV_Matrix(0),
+      outMediaTypes(NULL),numOutMediaTypes(0),image_stride(0),
+      image_length(0),pMFT(NULL),pHandler(NULL)
+{
+  // Create an attribute store to specify the enumeration parameters.
+  hr = MFCreateAttributes(&pAttributes, 1);
+  if (FAILED(hr))
+  {
+    return;
+  }
+
+  // Source type: video capture devices
+  hr = pAttributes->SetGUID(
+    MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE,
+    MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID
+    );
+  if (FAILED(hr))
+  {
+    SafeRelease(&pAttributes);
+    return;
+  }
+
+  // Enumerate devices.
+  hr = MFEnumDeviceSources(pAttributes, &ppDevices, &nDevs);
+  if (FAILED(hr))
+  {
+    SafeRelease(&pAttributes);
+    return;
+  }
+  /*
+   * The video format list.
+   * The first element is a dummy element....
+   */
+  video_format = new VideoFormat();
+}
+
+/*
+ * Deconstructor
+ */
+MFCapture::~MFCapture()
+{
+  SafeRelease(&pReader);
+  SafeRelease(&pAttributes);  
+  SafeRelease(&pType);
+  
+  SafeRelease(&pHandler);
+  FreeOutMediaTypes();
+
+  delete  video_format;
+  
+  for (DWORD i=0; i<nDevs; i++)
+  {
+    ppDevices[i]->ShutdownObject();
+    SafeRelease(&ppDevices[i]);
+  }
+  CoTaskMemFree(ppDevices);
+  SafeRelease(&pSource);
+  if (image_buf != NULL) { cvReleaseImage(&image_buf); }
+}
+
+/*
+ * Protect Function: FreeOutMediaTypes
+ */
+HRESULT
+MFCapture::FreeOutMediaTypes()
+{
+  if(outMediaTypes){
+    for (UINT32 i=0; i < numOutMediaTypes; i++)
+    {
+      SafeRelease(&(outMediaTypes[i]));
+    }
+    free(outMediaTypes);
+
+    numOutMediaTypes=0;
+    outMediaTypes = NULL; 
+  }
+
+  return S_OK;
+}
+
+/*
+ * ActivateDevice
+ *
+ */
+HRESULT
+MFCapture::ActivateDevice(INT32 id)
+{
+  devId=id;
+
+  if(devId >= 0){
+    // Activate the capture device
+    hr = ppDevices[devId]->ActivateObject(IID_PPV_ARGS(&pSource));
+    if (FAILED(hr))
+    {
+      std::cout << "ERROR: Fail to ActivateObject. " << std::endl;
+      return hr;
+    }
+    // enumerate available video format to capture image
+    hr = EnumerateCaptureFormats();
+    if (FAILED(hr))
+    {
+      std::cout << "ERROR: Fail to EnumerateCaptureForamt. " << std::endl;
+      return hr;
+    }
+    // coount up the reference
+     pSource->AddRef();
+     return hr;
+  }
+  return E_INVALIDARG;
+}
+
+/*
+ * Shutdown Deveice
+ */
+HRESULT
+MFCapture::ShutdownDevice()
+{
+  if(devId >= 0){
+    ppDevices[devId]->ShutdownObject();
+    SafeRelease(&pSource);
+  }
+  return S_OK;
+}
+
+
+/*
+ * GetMediaTypeHandler()
+ *
+ */
+HRESULT
+MFCapture::GetMediaTypeHandler()
+{
+  BOOL selected;
+  IMFPresentationDescriptor *presDesc = NULL;
+  IMFStreamDescriptor *strmDesc = NULL;
+
+  hr = pSource->CreatePresentationDescriptor(&presDesc);
+  if (FAILED(hr)){
+    std::cerr <<  "Fail to CreatePresentationDescriptor" << std::endl;
+    return hr;
+  }
+
+  hr = presDesc->GetStreamDescriptorByIndex(0, &selected, &strmDesc);
+  if (FAILED(hr)){
+    std::cerr <<  "Fail to GetStreamDescriptorByIndex" << std::endl;
+    SafeRelease(&presDesc);
+    return hr;
+  }
+
+  hr = strmDesc->GetMediaTypeHandler(&pHandler);
+  if (FAILED(hr)){
+    std::cerr <<  "Fail to GetMediaTypeHandler" << std::endl;
+  }
+  SafeRelease(&presDesc);
+  SafeRelease(&strmDesc);
+  return hr;
+}
+
+/*
+ *  getCurrentMediaType()
+ *
+ */
+HRESULT
+MFCapture::GetCurrentType()
+{
+  if(pHandler == NULL)
+  {
+    hr = GetMediaTypeHandler();
+    if (FAILED(hr))
+    {
+      return hr;
+    }
+  }
+
+  hr = pHandler->GetCurrentMediaType(&pType);
+  if (FAILED(hr))
+  {
+    std::cerr << "ERROR: Fail to GetCurrentMediaType " << std::endl;
+    return hr;
+  }
+
+  hr = GetMediaTypeInfo(pType);
+  if (FAILED(hr))
+  {
+    std::cerr << "ERROR: Fail to GetMediaTypeInfo " << std::endl;
+  }
+
+  return hr;
+}
+
+/*
+ * get MediaType's Attrivutes.
+ * 
+ */
+HRESULT 
+MFCapture::GetMediaTypeInfo(IMFMediaType *type)
+{
+  if (type == NULL){
+    type = pType;
+  }
+  /*
+   * Video format 
+   */
+  hr = GetGUID_FromMediaType(type, MF_MT_SUBTYPE, &image_format);
+  if (FAILED(hr)){
+    return hr;
+  }
+  /*
+   *  Frame size (image width and height)
+   */
+  hr = GetTwoUINT32_FromMediaType(type, MF_MT_FRAME_SIZE, &image_width, &image_height);
+  if (FAILED(hr)){
+    return hr;
+  }
+  /*
+   *  Sampling size (= image size of a frame)
+   */
+  hr = GetUINT32_FromMediaType(type, MF_MT_SAMPLE_SIZE, &image_length);
+  if (FAILED(hr)){
+    return hr;
+  }
+  /*
+   *  YUV conversion matrix, this value used by 'YUY2_to_RGB' function
+   */
+  hr = GetUINT32_FromMediaType(type, MF_MT_YUV_MATRIX, &YUV_Matrix);
+  if (FAILED(hr)){
+    return hr;
+  }
+
+  /*
+   * Stride 
+   */
+  hr = GetINT32_FromMediaType(type, MF_MT_DEFAULT_STRIDE, &image_stride);
+  if (FAILED(hr)){
+    return hr;
+  }
+  return hr;
+}
+
+/*
+ * Create Image Buffer
+ *    depth: IPL_DEPTH_8U, IPL_DEPTH_8S,IPL_DEPTH_16U,
+ *           IPL_DEPTH_16S, IPL_DEPTH_32S, IPL_DEPTH_32F, IPL_DEPTH74F
+ *     channels: 1: GreyScale, 3: RGB , 4: Other
+ */
+void
+MFCapture::CreateImageBuffer(UINT32 depth, UINT32 channels)
+{
+  if (image_buf != NULL) { cvReleaseImage(&image_buf); }
+  image_buf = cvCreateImage(cvSize(image_width, image_height), depth, channels);
+  image_length = image_width * image_height * channels;
+
+  return;
+}
+
+/*
+ *  Create Sourec Reader
+ *
+ */
+HRESULT
+MFCapture::CreateSourceReader()
+{
+  IMFAttributes *pAttr=NULL;
+  
+  hr = MFCreateAttributes(&pAttr, 1);
+  if (FAILED(hr))
+  { 
+    std::cerr << "Fail to create attribute." << std::endl;
+    return hr;
+  }
+  pAttr->SetUINT32(MF_SOURCE_READER_ENABLE_VIDEO_PROCESSING, 1);
+
+  SafeRelease(&pReader);
+  hr = MFCreateSourceReaderFromMediaSource(pSource, pAttr, &pReader);
+
+  if (FAILED(hr)) {
+    std::cerr << "Fail to create IMFSourceReader object." << std::endl;
+  }
+
+  SafeRelease(&pAttr);
+  return hr;
+}
+
+/*
+ *  Get IMFSample
+ */
+HRESULT
+MFCapture::GetSample()
+{
+  DWORD streamIndex, flags;
+  LONGLONG timeStamp;
+
+  if(pReader)
+  {
+     SafeRelease(&pSample);
+     hr = pReader->ReadSample( (DWORD)MF_SOURCE_READER_ANY_STREAM,
+                              0, &streamIndex, &flags, &timeStamp, &pSample);
+  }else{
+    hr = E_INVALIDARG;
+  }
+  return hr;
+}
+
+/*
+ *  Get Captured Image
+ */
+IplImage *
+MFCapture::GetBufferData()
+{
+  IMFMediaBuffer *buff=NULL;
+  DWORD maxLen, curLen;
+  BYTE *memory;
+
+  IMFSample *sample=NULL;
+
+  DWORD streamIndex, flags;
+  LONGLONG timeStamp;
+
+  if(pReader){
+    hr = pReader->ReadSample( (DWORD)MF_SOURCE_READER_ANY_STREAM,
+                              0, &streamIndex, &flags, &timeStamp, &sample);
+  }
+
+  if (SUCCEEDED(hr) && sample)
+  {
+    hr = sample->GetBufferByIndex(0, &buff);
+    if (FAILED(hr))
+    {
+      return NULL;
+    }
+
+    hr = buff->Lock(&memory, &maxLen, &curLen);
+    if (FAILED(hr))
+    {
+      return NULL;
+    }
+
+    UINT32 size = image_length;
+    if (size > curLen){ size = curLen; }
+#if 1
+    if(image_format == MFVideoFormat_YUY2){
+      /// If the captured image format is YUY2, convert to RGB24
+      YUY2_to_RGB((char *)memory, (char *)image_buf->imageData,
+                     image_buf->width, image_buf->height, size, YUV_Matrix);
+
+    }else{ // Should be MFVideoFormat_RGB24
+      memcpy(image_buf->imageData, (void *)memory, size);
+    }
+#else
+      memcpy(image_buf->imageData, (void *)memory, size);
+#endif
+
+    hr = buff->Unlock();
+    SafeRelease(&buff);
+    SafeRelease(&sample);
+
+    return image_buf;
+  }
+  return NULL;
+}
+
+/*
+ * Enumerate supported Mediatypes 
+ */
+HRESULT 
+MFCapture::EnumerateCaptureFormats()
+{
+  UINT32 i;
+
+  if(pHandler == NULL)
+  {
+    hr = GetMediaTypeHandler();
+    if (FAILED(hr))
+    {
+      return hr;
+    }
+  }
+
+  FreeOutMediaTypes();
+
+  hr = pHandler->GetMediaTypeCount(&numOutMediaTypes);
+  if (FAILED(hr))
+  {
+      std::cerr << "Fail to GetMediaTypeCount" << std::endl;
+    return hr;
+  }
+
+  /*
+   * Store available IMFMediaTypes and VideoFormat
+   */
+  outMediaTypes = (IMFMediaType **)malloc(sizeof(IMFMediaType *)*numOutMediaTypes);
+  for (i=0; i < numOutMediaTypes; i++)
+  {
+    hr = pHandler->GetMediaTypeByIndex(i, &(outMediaTypes[i]));
+    if (FAILED(hr)) { break; }
+
+    IMFMediaType *type = outMediaTypes[i];
+    UINT32 w, h;
+
+    if( CheckMediaFormat(type, MFVideoFormat_RGB24))
+    {
+      hr = GetTwoUINT32_FromMediaType(type, MF_MT_FRAME_SIZE, &w, &h);
+      if(video_format->isMember(FMT_RGB24, w, h) == FALSE){
+        video_format->append(FMT_RGB24, w, h, i);
+      }
+    }
+    
+    if( CheckMediaFormat(type, MFVideoFormat_YUY2))
+    {
+      hr = GetTwoUINT32_FromMediaType(type, MF_MT_FRAME_SIZE, &w, &h);
+      if(video_format->isMember(FMT_YUY2, w, h) == FALSE){
+        video_format->append(FMT_YUY2, w, h, i);
+      }
+    }
+  }
+
+  return hr;
+}
+
+/*
+ * Set Device Format
+ */
+HRESULT 
+MFCapture::SetDeviceFormat(DWORD idx)
+{
+  IMFMediaType *type = NULL;
+
+  if(pHandler == NULL)
+  {
+    hr = GetMediaTypeHandler();
+    if (FAILED(hr))
+    {
+      return hr;
+    }
+  }
+
+#if 0
+  printf("Call SetDeviceFormat id = %d\n",idx);
+#endif
+
+  hr = pHandler->GetMediaTypeByIndex(idx, &type);
+  if (FAILED(hr))
+  {
+    std::cerr << "Fail to GetMediaTypeByIndex "<< std::endl;
+    return hr;
+  }
+
+  hr = pHandler->SetCurrentMediaType(type);
+  if (FAILED(hr))
+  {
+    std::cerr << "Fail to SetCurrentMediaType "<< std::endl;
+    SafeRelease(&type);
+    return hr;
+  }
+  SafeRelease(&pType);
+  pType = type;
+#if 0
+  printf("INDEX = %d\n", video_format->getIndex(idx));
+#endif
+  hr = GetMediaTypeInfo();
+
+  hr = CreateSourceReader();
+  if (FAILED(hr))
+  {
+    std::cerr << "Fail to SetDeviceFormat "<< std::endl;
+    return hr;
+  }
+
+  return hr;
+}
+/*
+ * Set Device Format
+ */
+INT32 
+MFCapture::SetDeviceFormatByName(const char *name)
+{
+  INT32 idx = this->video_format->getIndexByName(name);
+
+  if(idx >= 0){ 
+    hr = SetDeviceFormat(idx);
+    if(FAILED(hr)){ return -1; }
+  }
+
+  return idx;
+}
+
+/*
+ * Display Summary of IMFMediaType's Attribute 
+ */
+HRESULT
+MFCapture::ShowMediaTypeInfo(IMFMediaType *type, int idx)
+{
+  GUID format;
+  INT32 stride;
+  UINT32 length;
+  UINT32 width, height;
+
+  if(type == NULL)
+  {
+    type = pType;
+    printf("== Current MediaType ==\n");
+  }else{
+    printf("== MediaType[ %d ] ==\n",idx);
+  }
+
+  hr = GetGUID_FromMediaType(type, MF_MT_SUBTYPE, &format);
+  if (FAILED(hr)){ return hr; }
+  printf("Format = %s\n", GetFormatName(format));
+
+  hr = GetTwoUINT32_FromMediaType(type, MF_MT_FRAME_SIZE, &width, &height);
+  if (FAILED(hr)){ return hr; }
+  printf("frame size = %d x %d \n", width, height);
+
+  hr = GetINT32_FromMediaType(type, MF_MT_DEFAULT_STRIDE, &stride);
+  if (SUCCEEDED(hr)){  printf("stride  = %d \n", stride); }
+  
+  hr = GetUINT32_FromMediaType(type, MF_MT_SAMPLE_SIZE, &length);
+  if (SUCCEEDED(hr)) { printf("length  = %d \n",length); }
+
+  UINT32 val;
+  hr = GetUINT32_FromMediaType(type, MF_MT_VIDEO_PRIMARIES, &val);
+  if (SUCCEEDED(hr)) { printf("video_primitives  = %d \n",val); }
+
+  hr = GetUINT32_FromMediaType(type, MF_MT_YUV_MATRIX, &val);
+  if (SUCCEEDED(hr)) { printf("yuv_matrix  = %d \n",val); }
+
+  hr = GetUINT32_FromMediaType(type, MF_MT_VIDEO_NOMINAL_RANGE, &val);
+  if (SUCCEEDED(hr)) { printf("video nominal range  = %d \n",val); }
+
+  printf("------------------------\n");
+  return hr;
+}
+
+
+#if 0
+int 
+MFCapture::FindMediaTypeIndex()
+{
+
+}
+#endif
+
+/*
+ *  Select available capture device by id.
+ *  This function doesn't need. Please use 'ActiveDevide' alternatively.
+ */
+HRESULT 
+MFCapture::SelectDevice(UINT32 idx)
+{
+  if (nDevs == 0)
+  {
+    std::cerr << "No Devices Found.";
+    return  E_INVALIDARG;
+  }
+  if (idx < 0 || nDevs <= idx){
+    std::cerr << "Invalid Index.";
+    return   E_INVALIDARG;
+  }
+
+  // Create the media source object.
+  hr = ppDevices[idx]->ActivateObject(IID_PPV_ARGS(&pSource));
+    
+  if (SUCCEEDED(hr))
+  {
+    pSource->AddRef();
+  }
+  devId = idx;
+  
+  hr = EnumerateCaptureFormats();
+  if (FAILED(hr))
+  {
+    std::cout << "ERROR: Fail to EnumerateCaptureForamt. " << std::endl;
+    return hr;
+  }
+
+  hr = GetCurrentType();
+  if (FAILED(hr))
+  {
+    std::cout << "ERROR: Fail to GetCurrentType " << std::endl;
+    return hr;
+  }
+  ShowMediaTypeInfo(NULL, 0);
+  return hr;
+}
+
+//////// Test implementation for the MediaFoudation Transform
+/*
+ * Test code for MFT
+ */
+HRESULT 
+MFCapture::EnumerateMFT(GUID inType, GUID outType)
+{
+  /// Step1: Create MFT
+  ///
+  const MFT_REGISTER_TYPE_INFO InType={ MFMediaType_Video, inType};
+  const MFT_REGISTER_TYPE_INFO OutType={ MFMediaType_Video, outType};
+  UINT32 unFlag = MFT_ENUM_FLAG_SYNCMFT |
+                  MFT_ENUM_FLAG_LOCALMFT |
+                  MFT_ENUM_FLAG_SORTANDFILTER | MFT_ENUM_FLAG_HARDWARE;
+
+  IMFActivate **ppMFTActive;
+  UINT32 cMFTActive;
+
+  hr = MFTEnumEx(MFT_CATEGORY_VIDEO_DECODER,
+               unFlag, &InType, &OutType, &ppMFTActive, &cMFTActive);
+
+  if(FAILED(hr)){
+    std::cerr << "Fail to MFTEnumEx" << std::endl;
+    return hr;
+  }
+    if(cMFTActive < 1) {
+    std::cerr << "Fail to MFTEnumEx: No MFActiveate." << std::endl;
+   //  exit(1);
+    return hr;
+  }
+  std::cerr << cMFTActive << " MFT Found." << std::endl;
+
+  hr = ppMFTActive[0]->ActivateObject(__uuidof(IMFTransform), (void **)&pMFT);
+  if(FAILED(hr)){
+    std::cerr << "Fail to MFTEnumEx: in ActivateObject." << std::endl;
+    return hr;
+  }
+
+  /// Step2: Get Stream Identification
+  DWORD iMin, iMax, oMin, oMax;
+
+  hr = pMFT->GetStreamLimits(&iMin, &iMax, &oMin, &oMax);
+  printf("GetStreamLimits = in(%d %d), out(%d %d) =\n",
+                   iMin, iMax, oMin, oMax);
+
+  DWORD cIn, cOut;
+  DWORD InIDs, OutIDs;
+  hr = pMFT->GetStreamCount(&cIn, &cOut);
+  printf("GetStreamCount: Input=%d, Output=%d \n", cIn, cOut);
+
+  hr = pMFT->GetStreamIDs(cIn, &InIDs, cOut, &OutIDs);
+  if(cIn > 0){
+    printf("IN IDs: %x\n", (&InIDs)[0]);
+  }
+  if(cOut > 0){
+    printf("Out ID= %x\n", (&OutIDs)[0]);
+  }
+  return hr;
+}
+
+/*
+ * This is a test implemetation for MFT
+ */
+IMFSample *
+MFCapture::ConvertToRGB()
+{
+  if(pMFT)
+  {
+    MFT_OUTPUT_STREAM_INFO osi;
+
+    hr = pMFT->ProcessMessage(MFT_MESSAGE_NOTIFY_BEGIN_STREAMING, 0);
+    pMFT->ProcessInput(0, pSample, 0);
+    hr = pMFT->GetOutputStreamInfo(0, &osi);
+    hr = pMFT->GetOutputStreamInfo(0, &osi);
+
+    DWORD status = 0;
+    hr = pMFT->GetOutputStatus(&status);
+
+    if (status = MFT_OUTPUT_STATUS_SAMPLE_READY) {
+    }
+
+    IMFSample *outputSample;
+    hr = MFCreateSample(&outputSample);
+
+    DWORD outStatus = 0;
+    MFT_OUTPUT_DATA_BUFFER odf;
+    odf.dwStreamID = 0;
+    odf.pSample = outputSample;
+    odf.dwStatus = 0;
+    odf.pEvents = NULL;;
+
+    hr = pMFT->ProcessOutput(0, 1, &odf, &outStatus);
+    hr = pMFT->ProcessMessage(MFT_MESSAGE_NOTIFY_END_OF_STREAM, 0);
+    hr = pMFT->ProcessMessage(MFT_MESSAGE_COMMAND_DRAIN, 0);
+  }
+  return NULL;
+}
+
+/*** end of MfCapture.cpp ***/

Added: branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFUtils.cpp
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFUtils.cpp	                        (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/MFCamera/src/MFUtils.cpp	2014-04-25 04:10:40 UTC (rev 152)
@@ -0,0 +1,340 @@
+/*
+
+
+*/
+#include "MFUtils.h"
+
+/*
+ *   Support Function
+ */
+LPCSTR GetFormatName(const GUID &guid)
+{
+  IF_EQUAL_RETURN(guid, MFVideoFormat_AI44);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_ARGB32);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_AYUV);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_DV25);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_DV50);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_DVH1);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_DVSD);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_DVSL);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_H264);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_I420);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_IYUV);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_M4S2);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_MJPG);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_MP43);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_MP4S);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_MP4V);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_MPG1);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_MSS1);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_MSS2);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_NV11);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_NV12);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_P010);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_P016);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_P210);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_P216);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_RGB24);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_RGB32);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_RGB555);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_RGB565);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_RGB8);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_UYVY);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_v210);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_v410);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_WMV1);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_WMV2);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_WMV3);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_WVC1);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_Y210);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_Y216);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_Y410);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_Y416);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_Y41P);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_Y41T);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_YUY2);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_YV12);
+  IF_EQUAL_RETURN(guid, MFVideoFormat_YVYU);
+  return NULL;
+}
+
+/*
+ * Startup function to use Media Foundation
+ *
+ */
+HRESULT
+startMediaFoundation()
+{
+  HRESULT hr;
+  hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+  if (FAILED(hr)) {
+    std::cerr << "Failed initializing COM components" << std::endl;
+    return hr;
+  }
+
+  hr = MFStartup(MF_VERSION);
+  if (FAILED(hr)){
+      std::cout << "ERROR: Fail to start Media Foundation." << std::endl;
+  }
+
+  return hr;
+}
+
+/*
+ *  Finishing function for Media Foundation
+ */
+void
+endMediaFoundation()
+{
+  MFShutdown();
+  CoUninitialize();
+}
+
+
+/*
+ * Support Function: IMFMediaType
+ * Get GUID Value
+ */
+HRESULT
+GetGUID_FromMediaType(IMFMediaType *type, REFGUID key, GUID *guid)
+{
+  HRESULT hr;
+  PROPVARIANT var;
+
+  PropVariantInit(&var);
+
+  hr = type->GetItem(key, &var);
+  if (SUCCEEDED(hr)){
+     if (var.vt == VT_CLSID) {
+      *guid = *var.puuid;
+    }else{
+      return E_FAIL;
+    }
+  }
+  return hr;
+}
+
+/*
+ * Support Function: IMFMediaType
+ * Get UINT32 Value
+ *
+ */
+HRESULT 
+GetUINT32_FromMediaType(IMFMediaType *type, REFGUID key, UINT32 *length)
+{
+  HRESULT hr;
+  PROPVARIANT var;
+  *length = 0;
+  PropVariantInit(&var);
+  hr = type->GetItem(key, &var);
+  if (FAILED(hr)){
+    return hr;
+  }
+  *length = var.ulVal;
+  return hr;
+}
+
+/*
+ * Support Function: IMFMediaType
+ * Get INT32 Value
+ *
+ */
+HRESULT 
+GetINT32_FromMediaType(IMFMediaType *type, REFGUID key, INT32 *length)
+{
+  HRESULT hr;
+  PROPVARIANT var;
+  *length = 0;
+  PropVariantInit(&var);
+  hr = type->GetItem(key, &var);
+  if (FAILED(hr)){
+    return hr;
+  }
+  *length = (INT32)var.ulVal;
+  return hr;
+}
+
+/*
+ * Support Function: IMFMediaType
+ * Get two UINT32 Values
+ *
+ */
+HRESULT
+GetTwoUINT32_FromMediaType(IMFMediaType *type, REFGUID key, UINT32 *v1, UINT32 *v2)
+{
+  HRESULT hr;
+  PROPVARIANT var;
+  *v1 = 0;
+  *v2 = 0;
+  PropVariantInit(&var);
+
+  hr = type->GetItem(key, &var);
+  if (FAILED(hr)){
+    return hr;
+  }
+  Unpack2UINT32AsUINT64(var.uhVal.QuadPart, v1, v2);
+  return hr;
+}
+
+/*
+ * Compare IMFMediaType by Subtype and FrameSize 
+ * 
+ */
+BOOL
+IsSameMediaType(IMFMediaType *type, GUID format, UINT32 width, UINT32 height)
+{
+  HRESULT hr;
+  PROPVARIANT var;
+  PropVariantInit(&var);
+
+  hr = type->GetItem(MF_MT_MAJOR_TYPE, &var);
+  if (FAILED(hr)){ return FALSE; }
+  if (var.vt != VT_CLSID || *var.puuid != MFMediaType_Video) { return FALSE; }
+
+  hr = type->GetItem(MF_MT_SUBTYPE, &var);
+  if (FAILED(hr)){ return FALSE; }
+  if (var.vt != VT_CLSID || *var.puuid != format) { return FALSE; }
+
+  hr = type->GetItem(MF_MT_FRAME_SIZE, &var);
+  if (FAILED(hr)){ return FALSE; }
+  if (var.uhVal.QuadPart == Pack2UINT32AsUINT64(width, height) ){ return FALSE; }
+
+  return TRUE;
+}
+
+/*
+ * Compare IMFMediaType by Subtype
+ *
+ */
+BOOL
+CheckMediaFormat(IMFMediaType *type, GUID format)
+{
+  HRESULT hr;
+  PROPVARIANT var;
+  PropVariantInit(&var);
+
+  hr = type->GetItem(MF_MT_MAJOR_TYPE, &var);
+  if (FAILED(hr)){ return FALSE; }
+  if (var.vt != VT_CLSID || *var.puuid != MFMediaType_Video) { return FALSE; }
+
+  hr = type->GetItem(MF_MT_SUBTYPE, &var);
+  if (FAILED(hr)){ return FALSE; }
+  if (var.vt != VT_CLSID || *var.puuid != format) { return FALSE; }
+
+  return TRUE;
+}
+
+/*
+ * Compare IMFMediaType by Major type
+ */
+BOOL
+IsVideoType(IMFMediaType *type)
+{
+  GUID guid;
+  HRESULT hr = GetGUID_FromMediaType(type, MF_MT_MAJOR_TYPE, &guid);
+
+  if (SUCCEEDED(hr)){ if (guid == MFMediaType_Video) {  return TRUE; } }
+  return FALSE;
+}
+
+
+/*
+ * Color Image Conversion. YUV -> RGB
+ *  http://msdn.microsoft.com/en-us/library/aa904813%28VS.80%29.aspx#yuvformats_2
+ */
+int clip255(int x)
+{
+  if(x > 255) return 255;
+  if(x < 0)   return 0;
+  return x;
+}
+
+int clipd255(double x)
+{
+  if(x > 255) return 255;
+  if(x < 0)   return 0;
+  return (int)x;
+}
+
+int 
+YUY2_to_RGB(char *yuy2_image, char *rgb_image, int rgb_img_width, int rgb_img_height, int yuy2_img_size, int conv_type)
+{
+  int i, j;
+  int Y0, V0, U0, Y1;
+  int p, stride;
+  unsigned int nCount = 0;
+  int count = yuy2_img_size;
+
+  rgb_img_height /= 2;
+
+  for (i= 0; i< rgb_img_height; i++)
+  {
+    stride = i*rgb_img_width;
+    for (j= 0; j< rgb_img_width; j++)
+    {
+      count -= 4;
+      if (count < 0)
+      {
+         return nCount;
+      }
+
+      p = (stride+j) * 4;
+
+      Y0=(yuy2_image[ p   ] & 0xff) ;
+      V0=(yuy2_image[ p+1 ] & 0xff) - 128;
+      Y1=(yuy2_image[ p+2 ] & 0xff) ;
+      U0=(yuy2_image[ p+3 ] & 0xff) - 128;
+
+      if(conv_type == 1){ /// BT709
+        rgb_image[nCount++]=clipd255((Y0            +1.574800*V0));
+        rgb_image[nCount++]=clipd255((Y0-0.187324*U0-0.468124*V0));
+        rgb_image[nCount++]=clipd255((Y0+1.855600*U0));
+
+        rgb_image[nCount++]=clipd255((Y1            +1.574800*V0));
+        rgb_image[nCount++]=clipd255((Y1-0.187324*U0-0.468124*V0));
+        rgb_image[nCount++]=clipd255((Y1+1.855600*U0));
+
+      }else if (conv_type == 2){ /// BT601
+        rgb_image[nCount++]=clipd255((Y0            +1.402000*V0));
+        rgb_image[nCount++]=clipd255((Y0-0.344136*U0-0.714136*V0));
+        rgb_image[nCount++]=clipd255((Y0+1.77200*U0));
+
+        rgb_image[nCount++]=clipd255((Y1            +1.402000*V0));
+        rgb_image[nCount++]=clipd255((Y1-0.344136*U0-0.714136*V0));
+        rgb_image[nCount++]=clipd255((Y1+1.77200*U0));
+
+      }else if (conv_type == 3){ /// SMPTE240M
+        rgb_image[nCount++]=clipd255((Y0            +1.576000*V0));
+        rgb_image[nCount++]=clipd255((Y0-0.227000*U0-0.477000*V0));
+        rgb_image[nCount++]=clipd255((Y0+1.826000*U0));
+
+        rgb_image[nCount++]=clipd255((Y1            +1.576000*V0));
+        rgb_image[nCount++]=clipd255((Y1-0.227000*U0-0.477000*V0));
+        rgb_image[nCount++]=clipd255((Y1+1.826000*U0));
+
+      }else{
+        Y0 -= 16;
+        Y1 -= 16;
+
+#if 0
+        rgb_image[nCount++]=clipd255((1.164383*Y0            +1.596027*V0));
+        rgb_image[nCount++]=clipd255((1.164383*Y0-0.391762*U0-0.812968*V0));
+        rgb_image[nCount++]=clipd255((1.164383*Y0+2.017232*U0));
+
+        rgb_image[nCount++]=clipd255((1.164383*Y1            +1.596027*V0));
+        rgb_image[nCount++]=clipd255((1.164383*Y1-0.391762*U0-0.812968*V0));
+        rgb_image[nCount++]=clipd255((1.164383*Y1+2.017232*U0));
+#else
+      rgb_image[nCount++]=clip255((298*Y0      + 409*V0+128) >> 8);
+      rgb_image[nCount++]=clip255((298*Y0-100*U0-208*V0+128) >> 8);
+      rgb_image[nCount++]=clip255((298*Y0+516*U0       +128) >> 8);
+
+      rgb_image[nCount++]=clip255((298*Y1      + 409*V0+128) >> 8);
+      rgb_image[nCount++]=clip255((298*Y1-100*U0-208*V0+128) >> 8);
+      rgb_image[nCount++]=clip255((298*Y1+516*U0       +128) >> 8);
+#endif
+      }
+    }
+  }
+  return nCount;
+}



More information about the openrtm-commit mailing list