OpenPose  1.0.0rc2
OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
bodyPartConnectorBase.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_POSE_BODY_PARTS_CONNECTOR_HPP
2 #define OPENPOSE_POSE_BODY_PARTS_CONNECTOR_HPP
3 
6 
7 namespace op
8 {
9  template <typename T>
10  OP_API void connectBodyPartsCpu(Array<T>& poseKeypoints, Array<T>& poseScores, const T* const heatMapPtr,
11  const T* const peaksPtr, const PoseModel poseModel, const Point<int>& heatMapSize,
12  const int maxPeaks, const T interMinAboveThreshold, const T interThreshold,
13  const int minSubsetCnt, const T minSubsetScore, const T scaleFactor = 1.f);
14 
15  template <typename T>
16  OP_API void connectBodyPartsGpu(Array<T>& poseKeypoints, Array<T>& poseScores, const T* const heatMapGpuPtr,
17  const T* const peaksPtr, const PoseModel poseModel, const Point<int>& heatMapSize,
18  const int maxPeaks, const T interMinAboveThreshold, const T interThreshold,
19  const int minSubsetCnt, const T minSubsetScore, const T scaleFactor = 1.f,
20  Array<T> finalOutputCpu = Array<T>{}, T* finalOutputGpuPtr = nullptr,
21  const unsigned int* const bodyPartPairsGpuPtr = nullptr,
22  const unsigned int* const mapIdxGpuPtr = nullptr,
23  const T* const peaksGpuPtr = nullptr);
24 
25  // Private functions used by the 2 above functions
26  template <typename T>
27  OP_API std::vector<std::pair<std::vector<int>, double>> generateInitialSubsets(
28  const T* const heatMapPtr, const T* const peaksPtr, const PoseModel poseModel, const Point<int>& heatMapSize,
29  const int maxPeaks, const T interThreshold, const T interMinAboveThreshold,
30  const std::vector<unsigned int>& bodyPartPairs, const unsigned int numberBodyParts,
31  const unsigned int numberBodyPartPairs, const unsigned int subsetCounterIndex,
32  const Array<T>& precomputedPAFs = Array<T>());
33 
34  template <typename T>
35  OP_API void removeSubsetsBelowThresholds(std::vector<int>& validSubsetIndexes, int& numberPeople,
36  const std::vector<std::pair<std::vector<int>, double>>& subsets,
37  const unsigned int subsetCounterIndex, const unsigned int numberBodyParts,
38  const int minSubsetCnt, const T minSubsetScore, const int maxPeaks);
39 
40  template <typename T>
41  OP_API void subsetsToPoseKeypointsAndScores(Array<T>& poseKeypoints, Array<T>& poseScores, const T scaleFactor,
42  const std::vector<std::pair<std::vector<int>, double>>& subsets,
43  const std::vector<int>& validSubsetIndexes, const T* const peaksPtr,
44  const int numberPeople, const unsigned int numberBodyParts,
45  const unsigned int numberBodyPartPairs);
46 }
47 
48 #endif // OPENPOSE_POSE_BODY_PARTS_CONNECTOR_HPP
OP_API void connectBodyPartsGpu(Array< T > &poseKeypoints, Array< T > &poseScores, const T *const heatMapGpuPtr, const T *const peaksPtr, const PoseModel poseModel, const Point< int > &heatMapSize, const int maxPeaks, const T interMinAboveThreshold, const T interThreshold, const int minSubsetCnt, const T minSubsetScore, const T scaleFactor=1.f, Array< T > finalOutputCpu=Array< T >{}, T *finalOutputGpuPtr=nullptr, const unsigned int *const bodyPartPairsGpuPtr=nullptr, const unsigned int *const mapIdxGpuPtr=nullptr, const T *const peaksGpuPtr=nullptr)
PoseModel
Definition: enumClasses.hpp:9
OP_API std::vector< std::pair< std::vector< int >, double > > generateInitialSubsets(const T *const heatMapPtr, const T *const peaksPtr, const PoseModel poseModel, const Point< int > &heatMapSize, const int maxPeaks, const T interThreshold, const T interMinAboveThreshold, const std::vector< unsigned int > &bodyPartPairs, const unsigned int numberBodyParts, const unsigned int numberBodyPartPairs, const unsigned int subsetCounterIndex, const Array< T > &precomputedPAFs=Array< T >())
OP_API void connectBodyPartsCpu(Array< T > &poseKeypoints, Array< T > &poseScores, const T *const heatMapPtr, const T *const peaksPtr, const PoseModel poseModel, const Point< int > &heatMapSize, const int maxPeaks, const T interMinAboveThreshold, const T interThreshold, const int minSubsetCnt, const T minSubsetScore, const T scaleFactor=1.f)
OP_API void removeSubsetsBelowThresholds(std::vector< int > &validSubsetIndexes, int &numberPeople, const std::vector< std::pair< std::vector< int >, double >> &subsets, const unsigned int subsetCounterIndex, const unsigned int numberBodyParts, const int minSubsetCnt, const T minSubsetScore, const int maxPeaks)
OP_API void subsetsToPoseKeypointsAndScores(Array< T > &poseKeypoints, Array< T > &poseScores, const T scaleFactor, const std::vector< std::pair< std::vector< int >, double >> &subsets, const std::vector< int > &validSubsetIndexes, const T *const peaksPtr, const int numberPeople, const unsigned int numberBodyParts, const unsigned int numberBodyPartPairs)
std::vector< T, Alloc > vector
Definition: cl2.hpp:567
#define OP_API
Definition: macros.hpp:16