Go to the documentation of this file.
34 def->optional(providerName,
"ImageProviderName");
35 OpenPoseEstimationComponent::setupPropertyDefinitions(def);
44 readErrorCounter2d = 0;
52 rgbImageFormat = imageProviderInfo.imageFormat;
54 OpenPoseEstimationComponent::onConnect();
56 numImages =
static_cast<unsigned int>(imageProviderInfo.numberImages);
63 imageBuffer =
new CByteImage*[1];
67 enableResultImages(1, imageProviderInfo.imageFormat.dimension, imageProviderInfo.imageFormat.type);
76 OpenPoseEstimationComponent::onDisconnect();
92 <<
" (#timeout " << timeoutCounter2d
93 <<
", #read error " << readErrorCounter2d
94 <<
", #success " << sucessCounter2d <<
")";
98 std::lock_guard lock_images(imageBufferMutex);
99 if (
static_cast<unsigned int>(
getImages(providerName, imageBuffer, imageMetaInfo)) != numImages)
101 ++readErrorCounter2d;
103 <<
" (#timeout " << timeoutCounter2d
104 <<
", #read error " << readErrorCounter2d
105 <<
", #success " << sucessCounter2d <<
")";
112 std::lock_guard lock_rgb(rgbImageBufferMutex);
113 ::ImageProcessor::CopyImage(imageBuffer[0], rgbImageBuffer);
115 timestamp_of_update = imageMetaInfo->timeProvided;
virtual void onExitImageProcessor() override
Exit the ImapeProcessor component.
virtual void onDisconnectImageProcessor() override
Implement this method in the ImageProcessor in order execute parts when the component looses network ...
ImageProviderInfo getImageProvider(std::string name, ImageType destinationImageType=eRgb, bool waitForProxy=false)
Select an ImageProvider.
virtual void onConnectImageProcessor() override
Implement this method in the ImageProcessor in order execute parts when the component is fully initia...
virtual void onInitImageProcessor() override
Setup the vision component.
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
virtual void process() override
Process the vision component.
void usingImageProvider(std::string name)
Registers a delayed topic subscription and a delayed provider proxy retrieval which all will be avail...
int getImages(CByteImage **ppImages)
Poll images from provider.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Default component property definition container.
void enableResultImages(int numberImages, ImageDimension imageDimension, ImageType imageType, const std::string &name="")
Enables visualization.
SpamFilterDataPtr deactivateSpam(float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
disables the logging for the current line for the given amount of seconds.
std::string getName() const
Retrieve name of object.
bool waitForImages(int milliseconds=1000)
Wait for new images.