ImageReader.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package VisionX::ArmarXObjects::armem_images
17 * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18 * @date 2021
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
26
27#include <VisionX/interface/components/Calibration.h>
28#include <VisionX/libraries/armem/vision/camera/core/aron/CameraCalibration.aron.generated.h>
29#include <VisionX/libraries/armem/vision/images/core/aron/ImageDepth.aron.generated.h>
30#include <VisionX/libraries/armem/vision/images/core/aron/ImageRGB.aron.generated.h>
32
33#include <Calibration/Calibration.h>
34#include <Calibration/StereoCalibration.h>
35#include <Image/ByteImage.h>
36
38{
39 namespace detail
40 {
42 {
43 public:
45
46 RGBImageReader() = default;
47
48 void getLatestRGBImages(const std::string& providerSegmentName,
49 std::vector<cv::Mat>& ret);
50 std::vector<CByteImage*>
51 getLatestRGBCByteImages(const std::string& providerSegmentName);
52
53 protected:
54 std::string propertyPrefix() const final;
55 Properties defaultProperties() const final;
56
57 private:
58 };
59
61 {
62 public:
64
65 DepthImageReader() = default;
66
67
68 std::vector<cv::Mat> getLatestDepthImages(const std::string& providerSegmentName);
69
70 protected:
71 std::string propertyPrefix() const final;
72 Properties defaultProperties() const final;
73
74 private:
75 };
76
78 {
79 public:
81
83
84
85 std::optional<visionx::StereoCalibration>
86 getStereoCameraCalibration(const std::string& providerSegmentName);
87 //visionx::Calibration getMonoCameraCalibration(const std::string& providerSegmentName);
88
89 protected:
90 std::string propertyPrefix() const final;
91 Properties defaultProperties() const final;
92
93 private:
94 };
95 } // namespace detail
96
98 {
99 public:
100 ImageReader() = default;
101
104
105 void getLatestRGBImages(const std::string& providerSegmentName, std::vector<cv::Mat>& ret);
106 std::vector<CByteImage*> getLatestRGBCByteImages(const std::string& providerSegmentName);
107 std::vector<cv::Mat> getLatestDepthImages(const std::string& providerSegmentName);
108 std::optional<visionx::StereoCalibration>
109 getStereoCameraCalibration(const std::string& providerSegmentName);
110 //visionx::Calibration getMonoCameraCalibration(const std::string& providerSegmentName); //not yet supported
111
112 private:
113 detail::RGBImageReader rgbReader;
114 detail::DepthImageReader depthReader;
115 detail::CameraCalibrationReader cameraCalibrationReader;
116 };
117} // namespace visionx::armem_images::client
The memory name system (MNS) client.
virtual void connect(armarx::armem::client::MemoryNameSystem &mns)
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
std::vector< cv::Mat > getLatestDepthImages(const std::string &providerSegmentName)
std::optional< visionx::StereoCalibration > getStereoCameraCalibration(const std::string &providerSegmentName)
armarx::armem::client::util::SimpleReaderBase Base
Definition ImageReader.h:80
std::optional< visionx::StereoCalibration > getStereoCameraCalibration(const std::string &providerSegmentName)
armarx::armem::client::util::SimpleReaderBase Base
Definition ImageReader.h:63
std::vector< cv::Mat > getLatestDepthImages(const std::string &providerSegmentName)
void getLatestRGBImages(const std::string &providerSegmentName, std::vector< cv::Mat > &ret)
std::vector< CByteImage * > getLatestRGBCByteImages(const std::string &providerSegmentName)
armarx::armem::client::util::SimpleReaderBase Base
Definition ImageReader.h:44
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.