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

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
op::HandExtractorCaffe Class Reference

`#include <handExtractorCaffe.hpp>`

Inherits op::HandExtractorNet.

## Public Member Functions
| 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)
Public Member Functions inherited from op::HandExtractorNet
| HandExtractorNet (const Point< int > &netInputSize, const Point< int > &netOutputSize, const unsigned short numberScales=1, const float rangeScales=0.4f, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScale=ScaleMode::ZeroToOne)
virtual | ~HandExtractorNet ()
void | initializationOnThread ()
std::array< Array< float >, 2 > | getHeatMaps () const
std::array< Array< float >, 2 > | getHandKeypoints () const
bool | getEnabled () const
void | setEnabled (const bool enabled)

## Additional Inherited Members
Protected Attributes inherited from op::HandExtractorNet
const std::pair< unsigned short, float > | mMultiScaleNumberAndRange
const Point< int > | mNetOutputSize
Array< float > | mHandImageCrop
std::array< Array< float >, 2 > | mHandKeypoints
const ScaleMode | mHeatMapScaleMode
const std::vector< HeatMapType > | mHeatMapTypes
std::array< Array< float >, 2 > | mHeatMaps
std::atomic< bool > | mEnabled

## Detailed Description

Hand keypoint extractor class for Caffe framework.

## Constructor & Destructor Documentation

op::HandExtractorCaffe::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`
| ) |  |

Constructor of the HandExtractorCaffe class.

Parameters

  netInputSize | Size at which the cropped image (where the hand is located) is resized.
  netOutputSize | Size of the final results. At the moment, it must be equal than netOutputSize.
  modelFolder | Folder where the models are located.
  gpuId | The GPU index (0-based) which the deep net will use.
  numberScales | Number of scales to run. The more scales, the slower it will be but possibly also more accurate.
  rangeScales | The range between the smaller and bigger scale.

virtual op::HandExtractorCaffe::~HandExtractorCaffe | ( |  | ) |
| virtual

Virtual destructor of the HandExtractor class. Required to allow inheritance.

## Member Function Documentation

void op::HandExtractorCaffe::forwardPass | ( | const std::vector< std::array< Rectangle< float >, 2 >> | handRectangles,
|  | const cv::Mat & | cvInputData
| ) |  |
| virtual

This function extracts the hand keypoints for each detected hand in the image.

Parameters

  handRectangles | location of the hands in the image. It is a length-variable std::vector, where each index corresponds to a different person in the image. Internally the std::vector, a std::array of 2 elements: index 0 and 1 for left and right hand respectively. Inside each array element, a op::Rectangle<float> (similar to cv::Rect for floating values) with the position of that hand (or 0,0,0,0 if some hand is missing, e.g., if a specific person has only half of the body inside the image).
  cvInputData | Original image in cv::Mat format and BGR format.

Implements op::HandExtractorNet.

void op::HandExtractorCaffe::netInitializationOnThread | ( |  | ) |
| virtual

This function must be call before using any other function. It must also be called inside the thread in which the functions are going to be used.

Implements op::HandExtractorNet.

The documentation for this class was generated from the following file:

- /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/hand/handExtractorCaffe.hpp