Go to the documentation of this file.
36 def->optional(providerName,
"ImageProviderName");
37 OpenPoseEstimationComponent::setupPropertyDefinitions(def);
47 readErrorCounter2d = 0;
56 rgbImageFormat = imageProviderInfo.imageFormat;
58 OpenPoseEstimationComponent::onConnect();
60 numImages =
static_cast<unsigned int>(imageProviderInfo.numberImages);
67 imageBuffer =
new CByteImage*[1];
72 1, imageProviderInfo.imageFormat.dimension, imageProviderInfo.imageFormat.type);
82 OpenPoseEstimationComponent::onDisconnect();
99 <<
" (#timeout " << timeoutCounter2d <<
", #read error "
100 << readErrorCounter2d <<
", #success " << sucessCounter2d <<
")";
104 std::lock_guard lock_images(imageBufferMutex);
105 if (
static_cast<unsigned int>(
106 getImages(providerName, imageBuffer, imageMetaInfo)) != numImages)
108 ++readErrorCounter2d;
110 <<
" (#timeout " << timeoutCounter2d <<
", #read error "
111 << readErrorCounter2d <<
", #success " << sucessCounter2d <<
")";
118 std::lock_guard lock_rgb(rgbImageBufferMutex);
119 ::ImageProcessor::CopyImage(imageBuffer[0], rgbImageBuffer);
121 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.