36 setupPropertyDefinitions(def);
37 def->optional(providerName,
"ImageProviderName");
43 usingImageProvider(providerName);
46 readErrorCounter2d = 0;
53 imageProviderInfo = getImageProvider(providerName, imageDisplayType);
54 openposeInputImageFormat = imageProviderInfo.imageFormat;
56 setupLocalVariables();
58 numImages =
static_cast<unsigned int>(imageProviderInfo.numberImages);
59 if (numImages < 1 || numImages > 2)
65 imageBuffer =
new CByteImage*[numImages];
66 for (
unsigned int i = 0 ; i < numImages ; i++)
71 enableResultImages(1, imageProviderInfo.imageFormat.dimension, imageProviderInfo.imageFormat.type);
73 ARMARX_INFO <<
"OpenPoseEstimationImageProcessor connect done";
80 destroyLocalVariables();
92 if (!waitForImages(providerName))
96 <<
" (#timeout " << timeoutCounter2d
97 <<
", #read error " << readErrorCounter2d
98 <<
", #success " << sucessCounter2d <<
")";
102 if (
static_cast<unsigned int>(getImages(providerName, imageBuffer, imageMetaInfo)) != numImages)
104 ++readErrorCounter2d;
106 <<
" (#timeout " << timeoutCounter2d
107 <<
", #read error " << readErrorCounter2d
108 <<
", #success " << sucessCounter2d <<
")";
116 std::unique_lock lock_rgb(rgbImageBufferMutex);
117 ::ImageProcessor::CopyImage(imageBuffer[0], rgbImageBuffer);
121 std::unique_lock lock_depth(depthImageBufferMutex);
122 ::ImageProcessor::CopyImage(imageBuffer[1], depthImageBuffer);
125 timestamp_of_update = imageMetaInfo->timeProvided;