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
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
4 #include <openpose/core/common.hpp>
5 #include <openpose/pose/enumClasses.hpp>
6
7 namespace op
8 {
9 template <typename T>
10 void connectBodyPartsCpu(
11 Array<T>& poseKeypoints, Array<T>& poseScores, const T* const heatMapPtr, const T* const peaksPtr,
12 const PoseModel poseModel, const Point<int>& heatMapSize, const int maxPeaks, const T interMinAboveThreshold,
13 const T interThreshold, const int minSubsetCnt, const T minSubsetScore, const T scaleFactor = 1.f,
14 const bool maximizePositives = false);
15
16 // Windows: Cuda functions do not include OP_API
17 template <typename T>
18 void connectBodyPartsGpu(
19 Array<T>& poseKeypoints, Array<T>& poseScores, const T* const heatMapGpuPtr, const T* const peaksPtr,
20 const PoseModel poseModel, const Point<int>& heatMapSize, const int maxPeaks, const T interMinAboveThreshold,
21 const T interThreshold, const int minSubsetCnt, const T minSubsetScore, const T scaleFactor = 1.f,
22 const bool maximizePositives = false, Array<T> pairScoresCpu = Array<T>{}, T* pairScoresGpuPtr = nullptr,
23 const unsigned int* const bodyPartPairsGpuPtr = nullptr, const unsigned int* const mapIdxGpuPtr = nullptr,
24 const T* const peaksGpuPtr = nullptr);
25
26 template <typename T>
27 void connectBodyPartsOcl(
28 Array<T>& poseKeypoints, Array<T>& poseScores, const T* const heatMapGpuPtr, const T* const peaksPtr,
29 const PoseModel poseModel, const Point<int>& heatMapSize, const int maxPeaks, const T interMinAboveThreshold,
30 const T interThreshold, const int minSubsetCnt, const T minSubsetScore, const T scaleFactor = 1.f,
31 const bool maximizePositives = false, Array<T> pairScoresCpu = Array<T>{}, T* pairScoresGpuPtr = nullptr,
32 const unsigned int* const bodyPartPairsGpuPtr = nullptr, const unsigned int* const mapIdxGpuPtr = nullptr,
33 const T* const peaksGpuPtr = nullptr, const int gpuID = 0);
34
35 // Private functions used by the 2 above functions
36 template <typename T>
37 std::vector<std::pair<std::vector<int>, T>> createPeopleVector(
38 const T* const heatMapPtr, const T* const peaksPtr, const PoseModel poseModel, const Point<int>& heatMapSize,
39 const int maxPeaks, const T interThreshold, const T interMinAboveThreshold,
40 const std::vector<unsigned int>& bodyPartPairs, const unsigned int numberBodyParts,
41 const unsigned int numberBodyPartPairs, const Array<T>& precomputedPAFs = Array<T>());
42
43 template <typename T>
44 void removePeopleBelowThresholds(std::vector<int>& validSubsetIndexes, int& numberPeople,
45 const std::vector<std::pair<std::vector<int>, T>>& subsets,
46 const unsigned int numberBodyParts, const int minSubsetCnt,
47 const T minSubsetScore, const int maxPeaks, const bool maximizePositives);
48
49 template <typename T>
50 void peopleVectorToPeopleArray(Array<T>& poseKeypoints, Array<T>& poseScores, const T scaleFactor,
51 const std::vector<std::pair<std::vector<int>, T>>& subsets,
52 const std::vector<int>& validSubsetIndexes, const T* const peaksPtr,
53 const int numberPeople, const unsigned int numberBodyParts,
54 const unsigned int numberBodyPartPairs);
55
56 template <typename T>
57 std::vector<std::tuple<T, T, int, int, int>> pafPtrIntoVector(
58 const Array<T>& pairScores, const T* const peaksPtr, const int maxPeaks,
59 const std::vector<unsigned int>& bodyPartPairs, const unsigned int numberBodyPartPairs);
60
61 template <typename T>
62 std::vector<std::pair<std::vector<int>, T>> pafVectorIntoPeopleVector(
63 const std::vector<std::tuple<T, T, int, int, int>>& pairScores, const T* const peaksPtr, const int maxPeaks,
64 const std::vector<unsigned int>& bodyPartPairs, const unsigned int numberBodyParts);
65 }
66
67 #endif // OPENPOSE_POSE_BODY_PARTS_CONNECTOR_HPP
enumClasses.hpp
op::pafVectorIntoPeopleVector
std::vector< std::pair< std::vector< int >, T > > pafVectorIntoPeopleVector(const std::vector< std::tuple< T, T, int, int, int >> &pairScores, const T *const peaksPtr, const int maxPeaks, const std::vector< unsigned int > &bodyPartPairs, const unsigned int numberBodyParts)
op::PoseModel
PoseModel
Definition: enumClasses.hpp:9
op::peopleVectorToPeopleArray
void peopleVectorToPeopleArray(Array< T > &poseKeypoints, Array< T > &poseScores, const T scaleFactor, const std::vector< std::pair< std::vector< int >, T >> &subsets, const std::vector< int > &validSubsetIndexes, const T *const peaksPtr, const int numberPeople, const unsigned int numberBodyParts, const unsigned int numberBodyPartPairs)
common.hpp
op::connectBodyPartsOcl
void connectBodyPartsOcl(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, const bool maximizePositives=false, Array< T > pairScoresCpu=Array< T >{}, T *pairScoresGpuPtr=nullptr, const unsigned int *const bodyPartPairsGpuPtr=nullptr, const unsigned int *const mapIdxGpuPtr=nullptr, const T *const peaksGpuPtr=nullptr, const int gpuID=0)
op::removePeopleBelowThresholds
void removePeopleBelowThresholds(std::vector< int > &validSubsetIndexes, int &numberPeople, const std::vector< std::pair< std::vector< int >, T >> &subsets, const unsigned int numberBodyParts, const int minSubsetCnt, const T minSubsetScore, const int maxPeaks, const bool maximizePositives)
op::createPeopleVector
std::vector< std::pair< std::vector< int >, T > > createPeopleVector(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 Array< T > &precomputedPAFs=Array< T >())
op::connectBodyPartsCpu
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, const bool maximizePositives=false)
op::connectBodyPartsGpu
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, const bool maximizePositives=false, Array< T > pairScoresCpu=Array< T >{}, T *pairScoresGpuPtr=nullptr, const unsigned int *const bodyPartPairsGpuPtr=nullptr, const unsigned int *const mapIdxGpuPtr=nullptr, const T *const peaksGpuPtr=nullptr)
cl::vector
std::vector< T, Alloc > vector
Definition: cl2.hpp:567
op::pafPtrIntoVector
std::vector< std::tuple< T, T, int, int, int > > pafPtrIntoVector(const Array< T > &pairScores, const T *const peaksPtr, const int maxPeaks, const std::vector< unsigned int > &bodyPartPairs, const unsigned int numberBodyPartPairs)