OpenPose3DDepthImageConverter.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package VisionX::ArmarXObjects::OpenPoseEstimation
17  * @author Stefan Reither ( stef dot reither at web dot de )
18  * @date 2018
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 #pragma once
23 
24 // STD/STL
25 
26 // IVT
27 #include <ivt/Calibration/Calibration.h>
28 
29 // ArmarX
31 
32 // OpenPose stuff
33 #include "OpenPoseEstimation.h"
34 
35 namespace visionx
36 {
37 
39  OpenPoseEstimation
40  {
41  public:
42 
43  protected:
44  virtual void setupPropertyDefinitions(armarx::PropertyDefinitionsPtr& def) override;
45  virtual void setupLocalVariables() override;
46  virtual void destroyLocalVariables() override;
48 
49  CByteImage* VisualizeTransparentImageMask(const CByteImage& maskedInputImage, int brightnessIncrease, const CByteImage& inputImage);
50 
51  private:
52  int getMedianDepthFromImage(int x, int y, int radius) const;
53 
54  protected:
55  // Depth image info
56  unsigned int radius = 10;
57  unsigned int maxDepth = 3000;
58  unsigned int maxDepthDifference = 700;
59 
60  // Image calibration
61  const CCalibration* calibration = nullptr;
62  std::string cameraNodeName = "";
63 
64  // ImageBuffer und ImageInformations
65  CByteImage* maskedrgbImageBuffer;
66 
67  CByteImage* depthImageBuffer;
69  };
70 }
visionx::OpenPose3DDepthImageConverter::destroyLocalVariables
virtual void destroyLocalVariables() override
Definition: OpenPose3DDepthImageConverter.cpp:44
visionx
ArmarX headers.
Definition: OpenPoseStressTest.h:38
visionx::OpenPose3DDepthImageConverter::calculate3DEntitiesFrom2DEntitiesInBuffer
void calculate3DEntitiesFrom2DEntitiesInBuffer() const
Definition: OpenPose3DDepthImageConverter.cpp:49
visionx::OpenPose3DDepthImageConverter::calibration
const CCalibration * calibration
Definition: OpenPose3DDepthImageConverter.h:61
ImageProcessor.h
visionx::OpenPose3DDepthImageConverter::setupPropertyDefinitions
virtual void setupPropertyDefinitions(armarx::PropertyDefinitionsPtr &def) override
Definition: OpenPose3DDepthImageConverter.cpp:29
visionx::OpenPose3DDepthImageConverter::maxDepth
unsigned int maxDepth
Definition: OpenPose3DDepthImageConverter.h:57
visionx::OpenPose3DDepthImageConverter::cameraNodeName
std::string cameraNodeName
Definition: OpenPose3DDepthImageConverter.h:62
visionx::OpenPose3DDepthImageConverter::maskedrgbImageBuffer
CByteImage * maskedrgbImageBuffer
Definition: OpenPose3DDepthImageConverter.h:65
visionx::OpenPose3DDepthImageConverter::depthImageBuffer
CByteImage * depthImageBuffer
Definition: OpenPose3DDepthImageConverter.h:67
visionx::OpenPose3DDepthImageConverter::setupLocalVariables
virtual void setupLocalVariables() override
Definition: OpenPose3DDepthImageConverter.cpp:39
visionx::OpenPose3DDepthImageConverter::radius
unsigned int radius
Definition: OpenPose3DDepthImageConverter.h:56
OpenPoseEstimation.h
IceUtil::Handle< class PropertyDefinitionContainer >
visionx::OpenPose3DDepthImageConverter::depthImageBufferMutex
std::mutex depthImageBufferMutex
Definition: OpenPose3DDepthImageConverter.h:68
visionx::OpenPose3DDepthImageConverter::maxDepthDifference
unsigned int maxDepthDifference
Definition: OpenPose3DDepthImageConverter.h:58
visionx::OpenPose3DDepthImageConverter
Definition: OpenPose3DDepthImageConverter.h:38
visionx::OpenPose3DDepthImageConverter::VisualizeTransparentImageMask
CByteImage * VisualizeTransparentImageMask(const CByteImage &maskedInputImage, int brightnessIncrease, const CByteImage &inputImage)