OpenPose 1.0.0rc2 OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
handExtractorCaffe.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_HAND_HAND_EXTRACTOR_CAFFE_HPP
2 #define OPENPOSE_HAND_HAND_EXTRACTOR_CAFFE_HPP
3
4 #include <opencv2/core/core.hpp> // cv::Mat
5 #include <openpose/core/common.hpp>
6 #include <openpose/core/enumClasses.hpp>
7 #include <openpose/hand/handExtractorNet.hpp>
8
9 namespace op
10 {
14 class OP_API HandExtractorCaffe : public HandExtractorNet
15 {
16 public:
27 HandExtractorCaffe(const Point<int>& netInputSize, const Point<int>& netOutputSize,
28 const std::string& modelFolder, const int gpuId,
29 const unsigned short numberScales = 1, const float rangeScales = 0.4f,
30 const std::vector<HeatMapType>& heatMapTypes = {},
31 const ScaleMode heatMapScale = ScaleMode::ZeroToOne,
32 const bool enableGoogleLogging = true);
33
38 virtual ~HandExtractorCaffe();
39
44 void netInitializationOnThread();
45
55 void forwardPass(const std::vector<std::array<Rectangle<float>, 2>> handRectangles, const cv::Mat& cvInputData);
56
57 private:
58 // PIMPL idiom
59 // http://www.cppsamples.com/common-tasks/pimpl.html
60 struct ImplHandExtractorCaffe;
61 std::unique_ptr<ImplHandExtractorCaffe> upImpl;
62
63 void detectHandKeypoints(Array<float>& handCurrent, const int person,
64 const cv::Mat& affineMatrix);
65
66 Array<float> getHeatMapsFromLastPass() const;
67
68 // PIMP requires DELETE_COPY & destructor, or extra code
69 // http://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero.html
70 DELETE_COPY(HandExtractorCaffe);
71 };
72 }
73
74 #endif // OPENPOSE_HAND_HAND_EXTRACTOR_CAFFE_HPP
DELETE_COPY
#define DELETE_COPY(className)
Definition: macros.hpp:34
cl::array
std::array< T, N > array
Definition: cl2.hpp:594
op::Point< int >
common.hpp
op::ScaleMode::ZeroToOne
op::ScaleMode
ScaleMode
Definition: enumClasses.hpp:6
op::Array< float >
op::Rectangle
Definition: rectangle.hpp:11
op::HandExtractorNet
Definition: handExtractorNet.hpp:14
cl::vector
std::vector< T, Alloc > vector
Definition: cl2.hpp:567
op::HandExtractorCaffe
Definition: handExtractorCaffe.hpp:14
OP_API
#define OP_API
Definition: macros.hpp:19
enumClasses.hpp
handExtractorNet.hpp
cl::string
std::string string
Definition: cl2.hpp:574