28 #include <ArmarXCore/interface/observers/ObserverInterface.h>
29 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
33 #include <opencv2/opencv.hpp>
36 #include <VisionX/interface/components/RGBDImageProvider.h>
55 defineOptionalProperty<std::string>(
"DebugObserverName",
"DebugObserver",
"Name of the topic the DebugObserver listens on");
56 defineOptionalProperty<std::string>(
"DebugDrawerTopicName",
"DebugDrawerUpdates",
"Name of the DebugDrawerTopic");
58 defineOptionalProperty<std::string>(
"FileName",
"VisionX/examples/point_clouds/",
"path to the klg log file");
59 defineOptionalProperty<bool>(
"Rewind",
true,
"loop through the point clouds");
61 defineOptionalProperty<Eigen::Vector2i>(
"Dimensions", Eigen::Vector2i(640, 480),
"")
62 .map(
"320x240", Eigen::Vector2i(320, 240))
63 .map(
"640x480", Eigen::Vector2i(640, 480))
64 .map(
"320x240", Eigen::Vector2i(320, 240))
65 .map(
"640x480", Eigen::Vector2i(640, 480))
66 .map(
"800x600", Eigen::Vector2i(800, 600))
67 .map(
"768x576", Eigen::Vector2i(768, 576))
68 .map(
"1024x768", Eigen::Vector2i(1024, 768))
69 .map(
"1024x1024", Eigen::Vector2i(1024, 1024))
70 .map(
"1280x960", Eigen::Vector2i(1280, 960))
71 .map(
"1600x1200", Eigen::Vector2i(1600, 1200));
74 defineOptionalProperty<std::string>(
"ReferenceFrameName",
"DepthCamera",
"Optional reference frame name.");
91 virtual public visionx::RGBDCapturingImageProviderInterface
99 return "KLGImageProvider";
105 visionx::StereoCalibration stereoCalibration;
107 Eigen::Vector2i dimensions = getProperty<Eigen::Vector2i>(
"Dimensions");
109 visionx::CameraParameters RGBCameraIntrinsics;
110 RGBCameraIntrinsics.distortion = {0, 0, 0};
111 RGBCameraIntrinsics.focalLength = {525.0, 525.0};
112 RGBCameraIntrinsics.height = dimensions(1);
113 RGBCameraIntrinsics.principalPoint = {dimensions(0) / 2.0f, dimensions(1) / 2.0f};
116 RGBCameraIntrinsics.width = dimensions(0);
118 visionx::CameraParameters DepthCameraIntrinsics;
119 DepthCameraIntrinsics.distortion = {0, 0, 0};
120 DepthCameraIntrinsics.focalLength = {525.0, 525.0};
121 DepthCameraIntrinsics.height = dimensions(1);
122 DepthCameraIntrinsics.principalPoint = {dimensions(0) / 2.0f, dimensions(1) / 2.0f};
124 DepthCameraIntrinsics.translation = {0.075, 0, 0};
125 DepthCameraIntrinsics.width = dimensions(0);
130 stereoCalibration.calibrationLeft.cameraParam = RGBCameraIntrinsics;
131 stereoCalibration.calibrationRight.cameraParam = DepthCameraIntrinsics;
136 return stereoCalibration;
146 return getProperty<std::string>(
"ReferenceFrameName");
159 bool capture(
void** ppImageBuffers)
override;
171 CByteImage** rgbImages;
173 int32_t currentFrame;