All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
handExtractorCaffe.hpp
Go to the documentation of this file.
#ifndef OPENPOSE_HAND_HAND_EXTRACTOR_CAFFE_HPP
#define OPENPOSE_HAND_HAND_EXTRACTOR_CAFFE_HPP
#include <opencv2/core/core.hpp> // cv::Mat
#include <openpose/core/common.hpp>
#include <openpose/core/enumClasses.hpp>
#include <openpose/hand/handExtractorNet.hpp>
namespace op
{
class OP_API HandExtractorCaffe : public HandExtractorNet
{
public:
HandExtractorCaffe(const Point<int>& netInputSize, const Point<int>& netOutputSize,
const std::string& modelFolder, const int gpuId,
const unsigned short numberScales = 1, const float rangeScales = 0.4f,
const std::vector<HeatMapType>& heatMapTypes = {},
const ScaleMode heatMapScale = ScaleMode::ZeroToOne,
const bool enableGoogleLogging = true);
virtual ~HandExtractorCaffe();
void netInitializationOnThread();
void forwardPass(const std::vector<std::array<Rectangle<float>, 2>> handRectangles, const cv::Mat& cvInputData);
private:
// PIMPL idiom
// http://www.cppsamples.com/common-tasks/pimpl.html
struct ImplHandExtractorCaffe;
std::unique_ptr<ImplHandExtractorCaffe> upImpl;
void detectHandKeypoints(Array<float>& handCurrent, const int person,
const cv::Mat& affineMatrix);
Array<float> getHeatMapsFromLastPass() const;
// PIMP requires DELETE_COPY & destructor, or extra code
// http://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero.html
DELETE_COPY(HandExtractorCaffe);
};
}
#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