StereoCameraProvider.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package VisionX::Component
19 * @author Jan Issac (jan dot issac at gmx dot net)
20 * @date 2011
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25#pragma once
26
27#include <VisionX/interface/components/Calibration.h>
28
29// IEEE1394ImageProvider
31
32// IVT
33#include <Calibration/StereoCalibration.h>
34
35namespace visionx
36{
38 {
39 public:
42 {
43 defineRequiredProperty<std::string>("CalibrationFile", "Camera calibration file");
44
46 "LeftCameraAsIdentity", true, "Set left camera as identity");
47
49 "ReferenceFrameName", "EyeLeftCameras", "Optional reference frame name.");
50 }
51 };
52
53 /**
54 * Stereo camera provider is based on IEEE1394 image provider with the
55 * restriction that the number of specified cameras must be two. This
56 * provider supplies the processor with a stereo calibration to perform
57 * stereo vision.
58 *
59 * \componentproperties
60 * \prop VisionX.StereoCameraProvider.CalibrationFile: The stereo
61 * calibration file of the stereo system.
62 */
64 virtual public IEEE1394ImageProvider,
65 virtual public StereoCalibrationCaptureProviderInterface
66 {
67 public:
68 /**
69 * Part of visionx::StereoCalibrationProvider interface
70 *
71 * Returns the VisionX StereoCalibration, especially vis ICE
72 *
73 * @return visionx::StereoCalibration
74 */
75 visionx::StereoCalibration
76 getStereoCalibration(const Ice::Current& c = Ice::emptyCurrent) override;
77
78 /**
79 * Part of visionx::StereoCalibrationProvider interface
80 *
81 * Returns whether images are undistorted
82 *
83 * @return bool
84 */
85 bool
86 getImagesAreUndistorted(const Ice::Current& c = Ice::emptyCurrent) override
87 {
88 return false;
89 }
90
91 std::string
92 getReferenceFrame(const Ice::Current& c = Ice::emptyCurrent) override
93 {
94 return getProperty<std::string>("ReferenceFrameName").getValue();
95 }
96
97 /**
98 * @see armarx::Component::getDefaultName()
99 */
100 std::string
101 getDefaultName() const override
102 {
103 return "StereoCameraProvider";
104 }
105
106 /**
107 * @see ImageProviderBase::onInitImageProvider()
108 */
109 void onInitCapturingImageProvider() override;
110
111 /**
112 * @see PropertyUser::createPropertyDefinitions()
113 */
120
121 private:
122 /**
123 * IVT Stereo Calibration object
124 */
125 CStereoCalibration ivtStereoCalibration;
126
127 /**
128 * VisionX StereoCalibration object
129 */
130 visionx::StereoCalibration stereoCalibration;
131 };
132} // namespace visionx
constexpr T c
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition Component.cpp:90
Property< PropertyType > getProperty(const std::string &name)
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
PropertyDefinition< PropertyType > & defineRequiredProperty(const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
IEEE1394 image provider captures images from one or more cameras and supports the following image tra...
Stereo camera provider is based on IEEE1394 image provider with the restriction that the number of sp...
std::string getReferenceFrame(const Ice::Current &c=Ice::emptyCurrent) override
visionx::StereoCalibration getStereoCalibration(const Ice::Current &c=Ice::emptyCurrent) override
Part of visionx::StereoCalibrationProvider interface.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
bool getImagesAreUndistorted(const Ice::Current &c=Ice::emptyCurrent) override
Part of visionx::StereoCalibrationProvider interface.
std::string getDefaultName() const override
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
ArmarX headers.