#ifndef OPENPOSE_UTILITIES_KEYPOINT_HPP #define OPENPOSE_UTILITIES_KEYPOINT_HPP #include namespace op { template T getDistance(const Array& keypoints, const int person, const int elementA, const int elementB); template void averageKeypoints(Array& keypointsA, const Array& keypointsB, const int personA); template void scaleKeypoints(Array& keypoints, const T scale); template void scaleKeypoints2d(Array& keypoints, const T scaleX, const T scaleY); template void scaleKeypoints2d(Array& keypoints, const T scaleX, const T scaleY, const T offsetX, const T offsetY); template void renderKeypointsCpu( Array& frameArray, const Array& keypoints, const std::vector& pairs, const std::vector colors, const T thicknessCircleRatio, const T thicknessLineRatioWRTCircle, const std::vector& poseScales, const T threshold); template Rectangle getKeypointsRectangle( const Array& keypoints, const int person, const T threshold, const int firstIndex = 0, const int lastIndex = -1); template T getAverageScore(const Array& keypoints, const int person); template T getKeypointsArea(const Array& keypoints, const int person, const T threshold); template int getBiggestPerson(const Array& keypoints, const T threshold); template int getNonZeroKeypoints(const Array& keypoints, const int person, const T threshold); template T getDistanceAverage(const Array& keypoints, const int personA, const int personB, const T threshold); template T getDistanceAverage( const Array& keypointsA, const int personA, const Array& keypointsB, const int personB, const T threshold); /** * Creates and Array with a specific person. * @param keypoints Array with the original data array to slice. * @param person indicates the index of the array to extract. * @param noCopy indicates whether to perform a copy. Copy will never go to undefined behavior, however, if * noCopy == true, then: * 1. It is faster, as no data copy is involved, but... * 2. If the Array keypoints goes out of scope, then the resulting Array will provoke an undefined behavior. * 3. If the returned Array is modified, the information in the Array keypoints will also be. * @return Array with the same dimension than keypoints expect the first dimension being 1. E.g., if keypoints * is {p,k,m}, the resulting Array is {1,k,m}. */ template Array getKeypointsPerson(const Array& keypoints, const int person, const bool noCopy = false); template float getKeypointsRoi(const Array& keypoints, const int personA, const int personB, const T threshold); template float getKeypointsRoi( const Array& keypointsA, const int personA, const Array& keypointsB, const int personB, const T threshold); template float getKeypointsRoi( const Rectangle& rectangleA, const Rectangle& rectangleB); } #endif // OPENPOSE_UTILITIES_KEYPOINT_HPP