PlaybackImageProvider.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::components
17 * @author Christian R. G. Dreher <c.dreher@kit.edu>
18 * @date 2018
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23
24#pragma once
25
26
27// STD/STL
28#include <string>
29
30// IVT
31#include <Calibration/StereoCalibration.h>
32
33// VisionX
35#include <VisionX/interface/components/Calibration.h>
36#include <VisionX/libraries/armem/vision/images/server/ImageMemoryServer.h>
39
40namespace visionx::components
41{
42
45 // virtual public StereoCalibrationCaptureProviderInterface,
48 {
49 protected:
50 std::vector<visionx::imrec::Playback> m_playbacks;
51 double m_current_frame = 0;
52 double m_frame_advance = 0;
53
57 CStereoCalibration m_stereo_calibration_ivt;
58 visionx::StereoCalibration m_stereo_calibration;
59
60 public:
62 virtual ~PlaybackImageProvider() override;
63
64 virtual void onInitCapturingImageProvider() override;
65 virtual void onExitCapturingImageProvider() override;
66 virtual void onStartCapture(float) override;
67 virtual void onStopCapture() override;
68 virtual bool capture(void** imageBuffer) override;
69
70 virtual visionx::StereoCalibration
71 getStereoCalibration(const Ice::Current& c = Ice::emptyCurrent) override;
72 virtual bool getImagesAreUndistorted(const Ice::Current& c = Ice::emptyCurrent) override;
73 virtual std::string getReferenceFrame(const Ice::Current& c = Ice::emptyCurrent) override;
74
75 virtual std::string getDefaultName() const override;
77
78 private:
79 void init_stereo_calibration_file();
80 void init_stereo_calibration();
81 void assert_stereo_initialized();
82 };
83
84} // namespace visionx::components
constexpr T c
The CapturingImageProvider provides a callback function to trigger the capturing of images with diffe...
virtual std::string getReferenceFrame(const Ice::Current &c=Ice::emptyCurrent) override
virtual bool getImagesAreUndistorted(const Ice::Current &c=Ice::emptyCurrent) override
virtual visionx::StereoCalibration getStereoCalibration(const Ice::Current &c=Ice::emptyCurrent) override
virtual void onStopCapture() override
This is called when the image provider capturing has been stopped.
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
virtual void onExitCapturingImageProvider() override
This is called when the Component::onExitComponent() setup is called.
std::vector< visionx::imrec::Playback > m_playbacks
virtual void onStartCapture(float) override
This is called when the image provider capturing has been started.
virtual void onInitCapturingImageProvider() override
This is called when the Component::onInitComponent() is called.
virtual std::string getDefaultName() const override
Retrieve default name of component.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.