23 #ifndef _ARMARX_COMPONENT_VisionX_CropRobotFromImage_H
24 #define _ARMARX_COMPONENT_VisionX_CropRobotFromImage_H
37 #include <RobotAPI/interface/core/RobotState.h>
40 #include <VirtualRobot/Robot.h>
42 #include <VirtualRobot/VirtualRobotCommon.h>
48 #include <VisionX/interface/components/Calibration.h>
49 #include <VisionX/interface/components/PointCloudAndImageAndCalibrationProviderInterface.h>
68 defineOptionalProperty<std::string>(
"providerName",
"ImageProvider",
"Name of the image provider that should be used");
69 defineOptionalProperty<std::string>(
"RobotStateComponentName",
"RobotStateComponent",
"Name of the robot state component that should be used");
70 defineOptionalProperty<std::string>(
"cameraFrameName",
"DepthCameraSim",
"The source frame name");
72 defineOptionalProperty<float>(
"filterColorR", 0.f,
"The red value of the background color that has to be different from the robots color. Range 0.f to 255.f");
73 defineOptionalProperty<float>(
"filterColorG", 177.f,
"The green value of the background color that has to be different from the robots color. Range 0.f to 255.f");
74 defineOptionalProperty<float>(
"filterColorB", 64.f,
"The blue value of the background color that has to be different from the robots color. Range 0.f to 255.f");
76 defineOptionalProperty<float>(
"collisionModelInflationMargin", 0.f,
"When the collision model is used for the offscreen rendering, it will be inflated by this margin.");
78 defineOptionalProperty<int>(
"dilationStrength", 0,
"The strength of the dilation after the masking, which can thicken the part that is cut from the image.");
80 defineOptionalProperty<bool>(
"flipImages", 1,
"Boolean that indicates, if the rendered image should be flipped. This is needed e.g. when camera nodes ending on 'Sim' are used.");
81 defineOptionalProperty<bool>(
"useFullModel", 1,
"Boolean that indicates, if the full model should be used during the offscreen rendering. Otherwise the collision model will be used.");
84 defineOptionalProperty<int>(
"numResultImages", 1,
"The number of images processed and provided.");
101 virtual public visionx::StereoCalibrationProcessorInterface
110 return "CropRobotFromImage";
116 return stereoCalibration;
121 return imagesAreUndistorted;
126 return referenceFrame;
159 int dilationStrength;
165 float collisionModelInflationMargin;
171 std::string providerName;
172 std::string cameraFrameName;
174 int numImages, numResultImages;
178 visionx::MonocularCalibration depthCameraCalibration;
191 visionx::StereoCalibration stereoCalibration;
192 bool imagesAreUndistorted;
194 std::string referenceFrame;