OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
op Namespace Reference

Namespaces

 ConfigureError
 
 ConfigureLog
 

Classes

class  CameraParameterReader
 
class  PoseTriangulation
 
class  WPoseTriangulation
 
class  Array
 
class  ArrayCpuGpu
 
class  CvMatToOpInput
 
class  CvMatToOpOutput
 
struct  Datum
 
class  GpuRenderer
 
class  KeepTopNPeople
 
class  KeypointScaler
 
class  Matrix
 
class  OpOutputToCvMat
 
struct  Point
 
struct  Rectangle
 
class  Renderer
 
class  ScaleAndSizeExtractor
 
class  String
 
class  VerbosePrinter
 
class  WCvMatToOpInput
 
class  WCvMatToOpOutput
 
class  WKeepTopNPeople
 
class  WKeypointScaler
 
class  WOpOutputToCvMat
 
class  WScaleAndSizeExtractor
 
class  WVerbosePrinter
 
class  FaceCpuRenderer
 
class  FaceDetector
 
class  FaceDetectorOpenCV
 
class  FaceExtractorCaffe
 
class  FaceExtractorNet
 
class  FaceGpuRenderer
 
class  FaceRenderer
 
class  WFaceDetector
 
class  WFaceDetectorOpenCV
 
class  WFaceExtractorNet
 
class  WFaceRenderer
 
class  CocoJsonSaver
 
class  FileSaver
 
class  HeatMapSaver
 
class  ImageSaver
 
class  JsonOfstream
 
class  KeypointSaver
 
class  PeopleJsonSaver
 
class  UdpSender
 
class  VideoSaver
 
class  WCocoJsonSaver
 
class  WFaceSaver
 
class  WHandSaver
 
class  WHeatMapSaver
 
class  WImageSaver
 
class  WPeopleJsonSaver
 
class  WPoseSaver
 
class  WUdpSender
 
class  WVideoSaver
 
class  WVideoSaver3D
 
class  FrameDisplayer
 
class  Gui
 
class  Gui3D
 
class  GuiInfoAdder
 
class  WGui
 
class  WGui3D
 
class  WGuiInfoAdder
 
class  HandCpuRenderer
 
class  HandDetector
 
class  HandDetectorFromTxt
 
class  HandExtractorCaffe
 
class  HandExtractorNet
 
class  HandGpuRenderer
 
class  HandRenderer
 
class  WHandDetector
 
class  WHandDetectorFromTxt
 
class  WHandDetectorTracking
 
class  WHandDetectorUpdate
 
class  WHandExtractorNet
 
class  WHandRenderer
 
class  BodyPartConnectorCaffe
 
class  MaximumCaffe
 
class  Net
 
class  NetCaffe
 
class  NetOpenCv
 
class  NmsCaffe
 
class  ResizeAndMergeCaffe
 
class  PoseCpuRenderer
 
class  PoseExtractor
 
class  PoseExtractorCaffe
 
class  PoseExtractorNet
 
class  PoseGpuRenderer
 
class  PoseRenderer
 
class  WPoseExtractor
 
class  WPoseExtractorNet
 
class  WPoseRenderer
 
class  DatumProducer
 
class  FlirReader
 
class  ImageDirectoryReader
 
class  IpCameraReader
 
class  Producer
 
class  SpinnakerWrapper
 
class  VideoCaptureReader
 
class  VideoReader
 
class  WDatumProducer
 
class  WebcamReader
 
class  PriorityQueue
 
class  Queue
 
class  QueueBase
 
class  SubThread
 
class  SubThreadNoQueue
 
class  SubThreadQueueIn
 
class  SubThreadQueueInOut
 
class  SubThreadQueueOut
 
class  Thread
 
class  ThreadManager
 
class  WFpsMax
 
class  WIdGenerator
 
class  Worker
 
class  WorkerConsumer
 
class  WorkerProducer
 
class  WQueueAssembler
 
class  WQueueOrderer
 
class  PersonIdExtractor
 
class  PersonTracker
 
class  WPersonIdExtractor
 
class  PointerContainerGreater
 
class  PointerContainerLess
 
class  Profiler
 
class  WrapperT
 
struct  WrapperStructExtra
 
struct  WrapperStructFace
 
struct  WrapperStructGui
 
struct  WrapperStructHand
 
struct  WrapperStructInput
 
struct  WrapperStructOutput
 
struct  WrapperStructPose
 

Typedefs

typedef WrapperT< BASE_DATUMWrapper
 

Enumerations

enum class  ScaleMode : unsigned char {
  InputResolution , NetOutputResolution , OutputResolution , ZeroToOne ,
  ZeroToOneFixedAspect , PlusMinusOne , PlusMinusOneFixedAspect , UnsignedChar ,
  NoScale
}
 
enum class  HeatMapType : unsigned char { Parts , Background , PAFs }
 
enum class  RenderMode : unsigned char { None , Auto , Cpu , Gpu }
 
enum class  ElementToRender : unsigned char { Skeleton , Background , AddKeypoints , AddPAFs }
 
enum class  DataFormat : unsigned char { Json , Xml , Yaml , Yml }
 
enum class  CocoJsonFormat : unsigned char {
  Body , Hand21 , Hand42 , Face ,
  Foot , Car , Size
}
 
enum class  GpuMode : unsigned char { Cuda = 0 , OpenCL = 1 , NoGpu = 2 , Size }
 
enum class  DisplayMode : unsigned short {
  NoDisplay , DisplayAll , Display2D , Display3D ,
  DisplayAdam
}
 
enum class  FullScreenMode : bool { FullScreen , Windowed }
 
enum class  PoseModel : unsigned char {
  BODY_25 = 0 , COCO_18 , MPI_15 , MPI_15_4 ,
  BODY_19 , BODY_19_X2 , BODY_19N , BODY_25E ,
  CAR_12 , BODY_25D , BODY_23 , CAR_22 ,
  BODY_19E , BODY_25B , BODY_135 , Size
}
 
enum class  PoseProperty : unsigned char {
  NMSThreshold = 0 , ConnectInterMinAboveThreshold , ConnectInterThreshold , ConnectMinSubsetCnt ,
  ConnectMinSubsetScore , Size
}
 
enum class  ProducerFpsMode : bool { OriginalFps , RetrievalFps }
 
enum class  ProducerProperty : unsigned char {
  AutoRepeat = 0 , Flip , Rotation , FrameStep ,
  NumberViews , Size
}
 
enum class  ProducerType : unsigned char {
  FlirCamera , ImageDirectory , IPCamera , Video ,
  Webcam , None
}
 
enum class  ThreadManagerMode : unsigned char { Asynchronous , AsynchronousIn , AsynchronousOut , Synchronous }
 
enum class  ErrorMode : unsigned char { StdRuntimeError , FileLogging , StdCerr , All }
 
enum class  LogMode : unsigned char { FileLogging , StdCout , All }
 
enum class  Priority : unsigned char {
  None = 0 , Low = 1 , Normal = 2 , High = 3 ,
  Max = 4 , NoOutput = 255
}
 
enum class  Extensions : unsigned char { Images , Size }
 
enum class  PoseMode : unsigned char { Disabled = 0 , Enabled , NoNetwork , Size }
 
enum class  Detector : unsigned char {
  Body = 0 , OpenCV , Provided , BodyWithTracking ,
  Size
}
 
enum class  WorkerType : unsigned char {
  Input = 0 , PreProcessing , PostProcessing , Output ,
  Size
}
 

Functions

 COMPILE_TEMPLATE_DATUM (WPoseTriangulation)
 
OP_API void estimateAndSaveIntrinsics (const Point< int > &gridInnerCorners, const float gridSquareSizeMm, const int flags, const std::string &outputParameterFolder, const std::string &imageFolder, const std::string &serialNumber, const bool saveImagesWithCorners=false)
 
OP_API void estimateAndSaveExtrinsics (const std::string &parameterFolder, const std::string &imageFolder, const Point< int > &gridInnerCorners, const float gridSquareSizeMm, const int index0, const int index1, const bool imagesAreUndistorted, const bool combineCam0Extrinsics)
 
OP_API void refineAndSaveExtrinsics (const std::string &parameterFolder, const std::string &imageFolder, const Point< int > &gridInnerCorners, const float gridSquareSizeMm, const int numberCameras, const bool imagesAreUndistorted, const bool saveImagesWithCorners=false)
 
OP_API void estimateAndSaveSiftFile (const Point< int > &gridInnerCorners, const std::string &imageFolder, const int numberCameras, const bool saveImagesWithCorners=false)
 
template<typename T >
Rectangle< T > recenter (const Rectangle< T > &rectangle, const T newWidth, const T newHeight)
 
 COMPILE_TEMPLATE_DATUM (WCvMatToOpInput)
 
 COMPILE_TEMPLATE_DATUM (WCvMatToOpOutput)
 
 COMPILE_TEMPLATE_DATUM (WKeepTopNPeople)
 
 COMPILE_TEMPLATE_DATUM (WKeypointScaler)
 
 COMPILE_TEMPLATE_DATUM (WOpOutputToCvMat)
 
 COMPILE_TEMPLATE_DATUM (WScaleAndSizeExtractor)
 
 COMPILE_TEMPLATE_DATUM (WVerbosePrinter)
 
OP_API void renderFaceKeypointsCpu (Array< float > &frameArray, const Array< float > &faceKeypoints, const float renderThreshold)
 
void renderFaceKeypointsGpu (float *framePtr, float *maxPtr, float *minPtr, float *scalePtr, const Point< unsigned int > &frameSize, const float *const facePtr, const int numberPeople, const float renderThreshold, const float alphaColorToAdd=FACE_DEFAULT_ALPHA_KEYPOINT)
 
 COMPILE_TEMPLATE_DATUM (WFaceDetector)
 
 COMPILE_TEMPLATE_DATUM (WFaceDetectorOpenCV)
 
 COMPILE_TEMPLATE_DATUM (WFaceExtractorNet)
 
 COMPILE_TEMPLATE_DATUM (WFaceRenderer)
 
OP_API std::string dataFormatToString (const DataFormat dataFormat)
 
OP_API DataFormat stringToDataFormat (const std::string &dataFormat)
 
OP_API void saveFloatArray (const Array< float > &array, const std::string &fullFilePath)
 
OP_API void saveData (const std::vector< Matrix > &opMats, const std::vector< std::string > &cvMatNames, const std::string &fileNameNoExtension, const DataFormat dataFormat)
 
OP_API void saveData (const Matrix &opMat, const std::string cvMatName, const std::string &fileNameNoExtension, const DataFormat dataFormat)
 
OP_API std::vector< MatrixloadData (const std::vector< std::string > &cvMatNames, const std::string &fileNameNoExtension, const DataFormat dataFormat)
 
OP_API Matrix loadData (const std::string &cvMatName, const std::string &fileNameNoExtension, const DataFormat dataFormat)
 
OP_API void savePeopleJson (const Array< float > &keypoints, const std::vector< std::vector< std::array< float, 3 >>> &candidates, const std::string &keypointName, const std::string &fileName, const bool humanReadable)
 
OP_API void savePeopleJson (const std::vector< std::pair< Array< float >, std::string >> &keypointVector, const std::vector< std::vector< std::array< float, 3 >>> &candidates, const std::string &fileName, const bool humanReadable)
 
OP_API void saveImage (const Matrix &matrix, const std::string &fullFilePath, const std::vector< int > &openCvCompressionParams={getCvImwriteJpegQuality(), 100, getCvImwritePngCompression(), 9})
 
OP_API Matrix loadImage (const std::string &fullFilePath, const int openCvFlags=getCvLoadImageAnydepth())
 
OP_API std::vector< std::array< Rectangle< float >, 2 > > loadHandDetectorTxt (const std::string &txtFilePath)
 
 COMPILE_TEMPLATE_DATUM (WCocoJsonSaver)
 
 COMPILE_TEMPLATE_DATUM (WFaceSaver)
 
 COMPILE_TEMPLATE_DATUM (WHandSaver)
 
 COMPILE_TEMPLATE_DATUM (WHeatMapSaver)
 
 COMPILE_TEMPLATE_DATUM (WImageSaver)
 
 COMPILE_TEMPLATE_DATUM (WPeopleJsonSaver)
 
 COMPILE_TEMPLATE_DATUM (WPoseSaver)
 
 COMPILE_TEMPLATE_DATUM (WUdpSender)
 
 COMPILE_TEMPLATE_DATUM (WVideoSaver)
 
 COMPILE_TEMPLATE_DATUM (WVideoSaver3D)
 
OP_API void cudaCheck (const int line=-1, const std::string &function="", const std::string &file="")
 
OP_API int getCudaGpuNumber ()
 
unsigned int getNumberCudaBlocks (const unsigned int totalRequired, const unsigned int numberCudaThreads=CUDA_NUM_THREADS)
 
OP_API void getNumberCudaThreadsAndBlocks (dim3 &numberCudaThreads, dim3 &numberCudaBlocks, const Point< unsigned int > &frameSize)
 
template<typename T >
void reorderAndNormalize (T *targetPtr, const unsigned char *const srcPtr, const int width, const int height, const int channels)
 
template<typename T >
void uCharImageCast (unsigned char *targetPtr, const T *const srcPtr, const int volume)
 
OP_API int getGpuNumber ()
 
OP_API GpuMode getGpuMode ()
 
 COMPILE_TEMPLATE_DATUM (WGui)
 
 COMPILE_TEMPLATE_DATUM (WGui3D)
 
 COMPILE_TEMPLATE_DATUM (WGuiInfoAdder)
 
OP_API void renderHandKeypointsCpu (Array< float > &frameArray, const std::array< Array< float >, 2 > &handKeypoints, const float renderThreshold)
 
void renderHandKeypointsGpu (float *framePtr, float *maxPtr, float *minPtr, float *scalePtr, const Point< unsigned int > &frameSize, const float *const handsPtr, const int numberHands, const float renderThreshold, const float alphaColorToAdd=HAND_DEFAULT_ALPHA_KEYPOINT)
 
 COMPILE_TEMPLATE_DATUM (WHandDetector)
 
 COMPILE_TEMPLATE_DATUM (WHandDetectorFromTxt)
 
 COMPILE_TEMPLATE_DATUM (WHandDetectorTracking)
 
 COMPILE_TEMPLATE_DATUM (WHandDetectorUpdate)
 
 COMPILE_TEMPLATE_DATUM (WHandExtractorNet)
 
 COMPILE_TEMPLATE_DATUM (WHandRenderer)
 
template<typename T >
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 defaultNmsThreshold, const T scaleFactor=1.f, const bool maximizePositives=false)
 
template<typename T >
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 defaultNmsThreshold, const T scaleFactor, const bool maximizePositives, Array< T > pairScoresCpu, T *pairScoresGpuPtr, const unsigned int *const bodyPartPairsGpuPtr, const unsigned int *const mapIdxGpuPtr, const T *const peaksGpuPtr)
 
template<typename T >
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 defaultNmsThreshold, 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)
 
template<typename T >
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 T defaultNmsThreshold, const Array< T > &precomputedPAFs=Array< T >())
 
template<typename T >
void removePeopleBelowThresholdsAndFillFaces (std::vector< int > &validSubsetIndexes, int &numberPeople, std::vector< std::pair< std::vector< int >, T >> &subsets, const unsigned int numberBodyParts, const int minSubsetCnt, const T minSubsetScore, const bool maximizePositives, const T *const peaksPtr)
 
template<typename T >
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)
 
template<typename T >
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)
 
template<typename T >
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)
 
template<typename T >
void maximumCpu (T *targetPtr, const T *const sourcePtr, const std::array< int, 4 > &targetSize, const std::array< int, 4 > &sourceSize)
 
template<typename T >
void maximumGpu (T *targetPtr, const T *const sourcePtr, const std::array< int, 4 > &targetSize, const std::array< int, 4 > &sourceSize)
 
template<typename T >
void nmsCpu (T *targetPtr, int *kernelPtr, const T *const sourcePtr, const T threshold, const std::array< int, 4 > &targetSize, const std::array< int, 4 > &sourceSize, const Point< T > &offset)
 
template<typename T >
void nmsGpu (T *targetPtr, int *kernelPtr, const T *const sourcePtr, const T threshold, const std::array< int, 4 > &targetSize, const std::array< int, 4 > &sourceSize, const Point< T > &offset)
 
template<typename T >
void nmsOcl (T *targetPtr, uint8_t *kernelGpuPtr, uint8_t *kernelCpuPtr, const T *const sourcePtr, const T threshold, const std::array< int, 4 > &targetSize, const std::array< int, 4 > &sourceSize, const Point< T > &offset, const int gpuID=0)
 
template<typename T >
void resizeAndMergeCpu (T *targetPtr, const std::vector< const T * > &sourcePtrs, const std::array< int, 4 > &targetSize, const std::vector< std::array< int, 4 >> &sourceSizes, const std::vector< T > &scaleInputToNetInputs={1.f})
 
template<typename T >
void resizeAndMergeGpu (T *targetPtr, const std::vector< const T * > &sourcePtrs, const std::array< int, 4 > &targetSize, const std::vector< std::array< int, 4 >> &sourceSizes, const std::vector< T > &scaleInputToNetInputs={1.f})
 
template<typename T >
void resizeAndMergeOcl (T *targetPtr, const std::vector< const T * > &sourcePtrs, std::vector< T * > &sourceTempPtrs, const std::array< int, 4 > &targetSize, const std::vector< std::array< int, 4 >> &sourceSizes, const std::vector< T > &scaleInputToNetInputs={1.f}, const int gpuID=0)
 
template<typename T >
void resizeAndPadRbgGpu (T *targetPtr, const T *const srcPtr, const int sourceWidth, const int sourceHeight, const int targetWidth, const int targetHeight, const T scaleFactor)
 
template<typename T >
void resizeAndPadRbgGpu (T *targetPtr, const unsigned char *const srcPtr, const int sourceWidth, const int sourceHeight, const int targetWidth, const int targetHeight, const T scaleFactor)
 
OP_API const std::map< unsigned int, std::string > & getPoseBodyPartMapping (const PoseModel poseModel)
 
OP_API const std::string & getPoseProtoTxt (const PoseModel poseModel)
 
OP_API const std::string & getPoseTrainedModel (const PoseModel poseModel)
 
OP_API unsigned int getPoseNumberBodyParts (const PoseModel poseModel)
 
OP_API const std::vector< unsigned int > & getPosePartPairs (const PoseModel poseModel)
 
OP_API const std::vector< unsigned int > & getPoseMapIndex (const PoseModel poseModel)
 
OP_API unsigned int getPoseMaxPeaks ()
 
OP_API float getPoseNetDecreaseFactor (const PoseModel poseModel)
 
OP_API unsigned int poseBodyPartMapStringToKey (const PoseModel poseModel, const std::string &string)
 
OP_API unsigned int poseBodyPartMapStringToKey (const PoseModel poseModel, const std::vector< std::string > &strings)
 
OP_API float getPoseDefaultNmsThreshold (const PoseModel poseModel, const bool maximizePositives=false)
 
OP_API float getPoseDefaultConnectInterMinAboveThreshold (const bool maximizePositives=false)
 
OP_API float getPoseDefaultConnectInterThreshold (const PoseModel poseModel, const bool maximizePositives=false)
 
OP_API unsigned int getPoseDefaultMinSubsetCnt (const bool maximizePositives=false)
 
OP_API float getPoseDefaultConnectMinSubsetScore (const bool maximizePositives=false)
 
OP_API bool addBkgChannel (const PoseModel poseModel)
 
OP_API const std::vector< float > & getPoseScales (const PoseModel poseModel)
 
OP_API const std::vector< float > & getPoseColors (const PoseModel poseModel)
 
OP_API const std::vector< unsigned int > & getPoseBodyPartPairsRender (const PoseModel poseModel)
 
OP_API unsigned int getNumberElementsToRender (const PoseModel poseModel)
 
OP_API void renderPoseKeypointsCpu (Array< float > &frameArray, const Array< float > &poseKeypoints, const PoseModel poseModel, const float renderThreshold, const bool blendOriginalFrame=true)
 
void renderPoseKeypointsGpu (float *framePtr, float *maxPtr, float *minPtr, float *scalePtr, const PoseModel poseModel, const int numberPeople, const Point< unsigned int > &frameSize, const float *const posePtr, const float renderThreshold, const bool googlyEyes=false, const bool blendOriginalFrame=true, const float alphaBlending=POSE_DEFAULT_ALPHA_KEYPOINT)
 
void renderPoseHeatMapGpu (float *frame, const Point< unsigned int > &frameSize, const float *const heatMapPtr, const Point< int > &heatMapSize, const float scaleToKeepRatio, const unsigned int part, const float alphaBlending=POSE_DEFAULT_ALPHA_HEAT_MAP)
 
void renderPoseHeatMapsGpu (float *frame, const PoseModel poseModel, const Point< unsigned int > &frameSize, const float *const heatMapPtr, const Point< int > &heatMapSize, const float scaleToKeepRatio, const float alphaBlending=POSE_DEFAULT_ALPHA_HEAT_MAP)
 
void renderPosePAFGpu (float *framePtr, const PoseModel poseModel, const Point< unsigned int > &frameSize, const float *const heatMapPtr, const Point< int > &heatMapSize, const float scaleToKeepRatio, const int part, const float alphaBlending=POSE_DEFAULT_ALPHA_HEAT_MAP)
 
void renderPosePAFsGpu (float *framePtr, const PoseModel poseModel, const Point< unsigned int > &frameSize, const float *const heatMapPtr, const Point< int > &heatMapSize, const float scaleToKeepRatio, const float alphaBlending=POSE_DEFAULT_ALPHA_HEAT_MAP)
 
void renderPoseDistanceGpu (float *framePtr, const Point< unsigned int > &frameSize, const float *const heatMapPtr, const Point< int > &heatMapSize, const float scaleToKeepRatio, const unsigned int part, const float alphaBlending=POSE_DEFAULT_ALPHA_HEAT_MAP)
 
 COMPILE_TEMPLATE_DATUM (WPoseExtractor)
 
 COMPILE_TEMPLATE_DATUM (WPoseExtractorNet)
 
 COMPILE_TEMPLATE_DATUM (WPoseRenderer)
 
OP_API void datumProducerConstructor (const std::shared_ptr< Producer > &producerSharedPtr, const unsigned long long frameFirst, const unsigned long long frameStep, const unsigned long long frameLast)
 
OP_API void datumProducerConstructorTooManyConsecutiveEmptyFrames (unsigned int &numberConsecutiveEmptyFrames, const bool emptyFrame)
 
OP_API bool datumProducerConstructorRunningAndGetDatumIsDatumProducerRunning (const std::shared_ptr< Producer > &producerSharedPtr, const unsigned long long numberFramesToProcess, const unsigned long long globalCounter)
 
OP_API void datumProducerConstructorRunningAndGetDatumApplyPlayerControls (const std::shared_ptr< Producer > &producerSharedPtr, const std::shared_ptr< std::pair< std::atomic< bool >, std::atomic< int >>> &videoSeekSharedPtr)
 
OP_API unsigned long long datumProducerConstructorRunningAndGetNextFrameNumber (const std::shared_ptr< Producer > &producerSharedPtr)
 
OP_API void datumProducerConstructorRunningAndGetDatumFrameIntegrity (Matrix &matrix)
 
OP_API std::shared_ptr< ProducercreateProducer (const ProducerType producerType=ProducerType::None, const std::string &producerString="", const Point< int > &cameraResolution=Point< int >{-1,-1}, const std::string &cameraParameterPath="models/cameraParameters/", const bool undistortImage=true, const int numberViews=-1)
 
 COMPILE_TEMPLATE_DATUM (PriorityQueue)
 
 COMPILE_TEMPLATE_DATUM (Queue)
 
 COMPILE_TEMPLATE_DATUM (SubThread)
 
 COMPILE_TEMPLATE_DATUM (SubThreadNoQueue)
 
 COMPILE_TEMPLATE_DATUM (SubThreadQueueIn)
 
 COMPILE_TEMPLATE_DATUM (SubThreadQueueInOut)
 
 COMPILE_TEMPLATE_DATUM (SubThreadQueueOut)
 
 COMPILE_TEMPLATE_DATUM (Thread)
 
 COMPILE_TEMPLATE_DATUM (ThreadManager)
 
 COMPILE_TEMPLATE_DATUM (WFpsMax)
 
 COMPILE_TEMPLATE_DATUM (WIdGenerator)
 
 COMPILE_TEMPLATE_DATUM (Worker)
 
 COMPILE_TEMPLATE_DATUM (WorkerConsumer)
 
 COMPILE_TEMPLATE_DATUM (WorkerProducer)
 
 COMPILE_TEMPLATE_DATUM (WQueueOrderer)
 
 COMPILE_TEMPLATE_DATUM (WPersonIdExtractor)
 
template<typename T >
void checkBool (const bool condition, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T , typename T1 , typename T2 >
void checkEqual (const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T , typename T1 , typename T2 >
void checkNotEqual (const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T , typename T1 , typename T2 >
void checkLessOrEqual (const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T , typename T1 , typename T2 >
void checkLessThan (const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T , typename T1 , typename T2 >
void checkGreaterOrEqual (const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T , typename T1 , typename T2 >
void checkGreaterThan (const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
 
OP_API void setMainThread ()
 
OP_API std::string getThreadId ()
 
OP_API bool getIfInMainThreadOrEmpty ()
 
OP_API bool getIfNotInMainThreadOrEmpty ()
 
template<typename T >
std::string tToString (const T &message)
 
OP_API void error (const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T >
void error (const T &message, const int line=-1, const std::string &function="", const std::string &file="")
 
OP_API void checkWorkerErrors ()
 
OP_API void errorWorker (const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T >
void errorWorker (const T &message, const int line=-1, const std::string &function="", const std::string &file="")
 
OP_API void errorDestructor (const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T >
void errorDestructor (const T &message, const int line=-1, const std::string &function="", const std::string &file="")
 
OP_API void opLog (const std::string &message, const Priority priority=Priority::Max, const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T >
void opLog (const T &message, const Priority priority=Priority::Max, const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T >
void opLogIfDebug (const T &message, const Priority priority=Priority::Max, const int line=-1, const std::string &function="", const std::string &file="")
 
template<typename T >
char positiveCharRound (const T a)
 
template<typename T >
signed char positiveSCharRound (const T a)
 
template<typename T >
int positiveIntRound (const T a)
 
template<typename T >
long positiveLongRound (const T a)
 
template<typename T >
long long positiveLongLongRound (const T a)
 
template<typename T >
unsigned char uCharRound (const T a)
 
template<typename T >
unsigned int uIntRound (const T a)
 
template<typename T >
unsigned long ulongRound (const T a)
 
template<typename T >
unsigned long long uLongLongRound (const T a)
 
template<typename T >
fastMax (const T a, const T b)
 
template<typename T >
fastMin (const T a, const T b)
 
template<class T >
fastTruncate (T value, T min=0, T max=1)
 
OP_API void makeDirectory (const std::string &directoryPath)
 
OP_API bool existDirectory (const std::string &directoryPath)
 
OP_API bool existFile (const std::string &filePath)
 
OP_API std::string formatAsDirectory (const std::string &directoryPathString)
 
OP_API std::string getFileNameAndExtension (const std::string &fullPath)
 
OP_API std::string getFileNameNoExtension (const std::string &fullPath)
 
OP_API std::string getFileExtension (const std::string &fullPath)
 
OP_API std::string getFullFilePathNoExtension (const std::string &fullPath)
 
OP_API std::string getFileParentFolderPath (const std::string &fullPath)
 
OP_API std::vector< std::string > getFilesOnDirectory (const std::string &directoryPath, const std::vector< std::string > &extensions={})
 
OP_API std::vector< std::string > getFilesOnDirectory (const std::string &directoryPath, const std::string &extension)
 
OP_API std::vector< std::string > getFilesOnDirectory (const std::string &directoryPath, const Extensions extensions)
 
OP_API std::string removeSpecialsCharacters (const std::string &stringToVariate)
 
OP_API void removeAllOcurrencesOfSubString (std::string &stringToModify, const std::string &substring)
 
OP_API void replaceAll (std::string &stringText, const char charToChange, const char charToAdd)
 
OP_API PoseMode flagsToPoseMode (const int poseModeInt)
 
OP_API PoseModel flagsToPoseModel (const String &poseModeString)
 
OP_API ScaleMode flagsToScaleMode (const int keypointScaleMode)
 
OP_API ScaleMode flagsToHeatMapScaleMode (const int heatMapScaleMode)
 
OP_API Detector flagsToDetector (const int detector)
 
OP_API ProducerType flagsToProducerType (const String &imageDirectory, const String &videoPath, const String &ipCameraPath, const int webcamIndex, const bool flirCamera)
 
OP_API std::pair< ProducerType, StringflagsToProducer (const String &imageDirectory, const String &videoPath, const String &ipCameraPath=String(""), const int webcamIndex=-1, const bool flirCamera=false, const int flirCameraIndex=-1)
 
OP_API std::vector< HeatMapTypeflagsToHeatMaps (const bool heatMapsAddParts=false, const bool heatMapsAddBkg=false, const bool heatMapsAddPAFs=false)
 
OP_API RenderMode flagsToRenderMode (const int renderFlag, const bool gpuBuggy=false, const int renderPoseFlag=-2)
 
OP_API DisplayMode flagsToDisplayMode (const int display, const bool enabled3d)
 
OP_API Point< int > flagsToPoint (const String &pointString, const String &pointExample)
 
template<typename T >
getDistance (const Array< T > &keypoints, const int person, const int elementA, const int elementB)
 
template<typename T >
void averageKeypoints (Array< T > &keypointsA, const Array< T > &keypointsB, const int personA)
 
template<typename T >
void scaleKeypoints (Array< T > &keypoints, const T scale)
 
template<typename T >
void scaleKeypoints2d (Array< T > &keypoints, const T scaleX, const T scaleY)
 
template<typename T >
void scaleKeypoints2d (Array< T > &keypoints, const T scaleX, const T scaleY, const T offsetX, const T offsetY)
 
template<typename T >
void renderKeypointsCpu (Array< T > &frameArray, const Array< T > &keypoints, const std::vector< unsigned int > &pairs, const std::vector< T > colors, const T thicknessCircleRatio, const T thicknessLineRatioWRTCircle, const std::vector< T > &poseScales, const T threshold)
 
template<typename T >
Rectangle< T > getKeypointsRectangle (const Array< T > &keypoints, const int person, const T threshold, const int firstIndex=0, const int lastIndex=-1)
 
template<typename T >
getAverageScore (const Array< T > &keypoints, const int person)
 
template<typename T >
getKeypointsArea (const Array< T > &keypoints, const int person, const T threshold)
 
template<typename T >
int getBiggestPerson (const Array< T > &keypoints, const T threshold)
 
template<typename T >
int getNonZeroKeypoints (const Array< T > &keypoints, const int person, const T threshold)
 
template<typename T >
getDistanceAverage (const Array< T > &keypoints, const int personA, const int personB, const T threshold)
 
template<typename T >
getDistanceAverage (const Array< T > &keypointsA, const int personA, const Array< T > &keypointsB, const int personB, const T threshold)
 
template<typename T >
Array< T > getKeypointsPerson (const Array< T > &keypoints, const int person, const bool noCopy=false)
 
template<typename T >
float getKeypointsRoi (const Array< T > &keypoints, const int personA, const int personB, const T threshold)
 
template<typename T >
float getKeypointsRoi (const Array< T > &keypointsA, const int personA, const Array< T > &keypointsB, const int personB, const T threshold)
 
template<typename T >
float getKeypointsRoi (const Rectangle< T > &rectangleA, const Rectangle< T > &rectangleB)
 
OP_API void unrollArrayToUCharCvMat (Matrix &matResult, const Array< float > &array)
 
OP_API void uCharCvMatToFloatPtr (float *floatPtrImage, const Matrix &matImage, const int normalize)
 
OP_API double resizeGetScaleFactor (const Point< int > &initialSize, const Point< int > &targetSize)
 
OP_API void keepRoiInside (Rectangle< int > &roi, const int imageWidth, const int imageHeight)
 
OP_API void transpose (Matrix &matrix)
 
OP_API void rotateAndFlipFrame (Matrix &frame, const double rotationAngle, const bool flipFrame=false)
 
OP_API int getCvCapPropFrameCount ()
 
OP_API int getCvCapPropFrameFps ()
 
OP_API int getCvCapPropFrameWidth ()
 
OP_API int getCvCapPropFrameHeight ()
 
OP_API int getCvFourcc (const char c1, const char c2, const char c3, const char c4)
 
OP_API int getCvImwriteJpegQuality ()
 
OP_API int getCvImwritePngCompression ()
 
OP_API int getCvLoadImageAnydepth ()
 
OP_API int getCvLoadImageGrayScale ()
 
template<typename TPointerContainer >
bool checkNoNullNorEmpty (const TPointerContainer &tPointerContainer)
 
OP_API std::chrono::time_point< std::chrono::high_resolution_clock > getTimerInit ()
 
OP_API double getTimeSeconds (const std::chrono::time_point< std::chrono::high_resolution_clock > &timerInit)
 
OP_API void printTime (const std::chrono::time_point< std::chrono::high_resolution_clock > &timerInit, const std::string &firstMessage, const std::string &secondMessage, const Priority priority)
 
template<typename T >
bool vectorsAreEqual (const std::vector< T > &vectorA, const std::vector< T > &vectorB)
 
template<typename T >
std::vector< T > mergeVectors (const std::vector< T > &vectorA, const std::vector< T > &vectorB)
 
OP_API unsigned long long getLastNumber (const std::string &string)
 
template<typename T >
std::string toFixedLengthString (const T number, const unsigned long long stringLength=0)
 
OP_API std::vector< std::string > splitString (const std::string &stringToSplit, const std::string &delimiter)
 
OP_API std::string toLower (const std::string &string)
 
OP_API std::string toUpper (const std::string &string)
 
OP_API std::string remove0sFromString (const std::string &string)
 
OP_API std::string getFirstNumberOnString (const std::string &string)
 
OP_API void wrapperConfigureSanityChecks (WrapperStructPose &wrapperStructPose, const WrapperStructFace &wrapperStructFace, const WrapperStructHand &wrapperStructHand, const WrapperStructExtra &wrapperStructExtra, const WrapperStructInput &wrapperStructInput, const WrapperStructOutput &wrapperStructOutput, const WrapperStructGui &wrapperStructGui, const bool renderOutput, const bool userInputAndPreprocessingWsEmpty, const bool userOutputWsEmpty, const std::shared_ptr< Producer > &producerSharedPtr, const ThreadManagerMode threadManagerMode)
 
OP_API void threadIdPP (unsigned long long &threadId, const bool multiThreadEnabled)
 
template<typename TDatum , typename TDatums = std::vector<std::shared_ptr<TDatum>>, typename TDatumsSP = std::shared_ptr<TDatums>, typename TWorker = std::shared_ptr<Worker<TDatumsSP>>>
void configureThreadManager (ThreadManager< TDatumsSP > &threadManager, const bool multiThreadEnabled, const ThreadManagerMode threadManagerMode, const WrapperStructPose &wrapperStructPose, const WrapperStructFace &wrapperStructFace, const WrapperStructHand &wrapperStructHand, const WrapperStructExtra &wrapperStructExtra, const WrapperStructInput &wrapperStructInput, const WrapperStructOutput &wrapperStructOutput, const WrapperStructGui &wrapperStructGui, const std::array< std::vector< TWorker >, int(WorkerType::Size)> &userWs, const std::array< bool, int(WorkerType::Size)> &userWsOnNewThread)
 
template<typename TDatum , typename TDatums = std::vector<std::shared_ptr<TDatum>>, typename TDatumsSP = std::shared_ptr<TDatums>>
void createMultiviewTDatum (TDatumsSP &tDatumsSP, unsigned long long &frameCounter, const CameraParameterReader &cameraParameterReader, const void *const cvMatPtr)
 

Variables

const auto FACE_MAX_FACES = POSE_MAX_PEOPLE
 
const auto FACE_NUMBER_PARTS = 70u
 
const std::vector< unsigned int > FACE_PAIRS_RENDER {FACE_PAIRS_RENDER_GPU}
 
const std::vector< float > FACE_COLORS_RENDER {FACE_COLORS_RENDER_GPU}
 
const std::vector< float > FACE_SCALES_RENDER {FACE_SCALES_RENDER_GPU}
 
const auto FACE_CCN_DECREASE_FACTOR = 8.f
 
const std::string FACE_PROTOTXT {"face/pose_deploy.prototxt"}
 
const std::string FACE_TRAINED_MODEL {"face/pose_iter_116000.caffemodel"}
 
const auto FACE_DEFAULT_ALPHA_KEYPOINT = POSE_DEFAULT_ALPHA_KEYPOINT
 
const auto FACE_DEFAULT_ALPHA_HEAT_MAP = POSE_DEFAULT_ALPHA_HEAT_MAP
 
const auto CUDA_NUM_THREADS = 512u
 
const auto HAND_MAX_HANDS = 2*POSE_MAX_PEOPLE
 
const auto HAND_NUMBER_PARTS = 21u
 
const std::vector< unsigned int > HAND_PAIRS_RENDER {HAND_PAIRS_RENDER_GPU}
 
const std::vector< float > HAND_COLORS_RENDER {HAND_COLORS_RENDER_GPU}
 
const std::vector< float > HAND_SCALES_RENDER {HAND_SCALES_RENDER_GPU}
 
const auto HAND_CCN_DECREASE_FACTOR = 8.f
 
const std::string HAND_PROTOTXT {"hand/pose_deploy.prototxt"}
 
const std::string HAND_TRAINED_MODEL {"hand/pose_iter_102000.caffemodel"}
 
const auto HAND_DEFAULT_ALPHA_KEYPOINT = POSE_DEFAULT_ALPHA_KEYPOINT
 
const auto HAND_DEFAULT_ALPHA_HEAT_MAP = POSE_DEFAULT_ALPHA_HEAT_MAP
 
const auto POSE_MAX_PEOPLE = 127u
 
const auto POSE_DEFAULT_ALPHA_KEYPOINT = 0.6f
 
const auto POSE_DEFAULT_ALPHA_HEAT_MAP = 0.7f
 
const auto H135 = 25
 
const auto F135 = H135 + 40
 

Typedef Documentation

◆ Wrapper

Definition at line 249 of file wrapper.hpp.

Enumeration Type Documentation

◆ CocoJsonFormat

enum op::CocoJsonFormat : unsigned char
strong
Enumerator
Body 
Hand21 
Hand42 
Face 
Foot 
Car 
Size 

Definition at line 14 of file enumClasses.hpp.

◆ DataFormat

enum op::DataFormat : unsigned char
strong
Enumerator
Json 
Xml 
Yaml 
Yml 

Definition at line 6 of file enumClasses.hpp.

◆ Detector

enum op::Detector : unsigned char
strong
Enumerator
Body 
OpenCV 
Provided 
BodyWithTracking 
Size 

Definition at line 14 of file enumClasses.hpp.

◆ DisplayMode

enum op::DisplayMode : unsigned short
strong

GUI display modes. An enum class with the different output screen options. E.g., 2-D, 3-D, all, none.

Enumerator
NoDisplay 

No display.

DisplayAll 

All (2-D and 3-D/Adam) displays

Display2D 

Only 2-D display.

Display3D 

Only 3-D display.

DisplayAdam 

Only Adam display.

Definition at line 10 of file enumClasses.hpp.

◆ ElementToRender

enum op::ElementToRender : unsigned char
strong
Enumerator
Skeleton 
Background 
AddKeypoints 
AddPAFs 

Definition at line 34 of file enumClasses.hpp.

◆ ErrorMode

enum op::ErrorMode : unsigned char
strong
Enumerator
StdRuntimeError 
FileLogging 
StdCerr 
All 

Definition at line 6 of file enumClasses.hpp.

◆ Extensions

enum op::Extensions : unsigned char
strong
Enumerator
Images 
Size 

Definition at line 31 of file enumClasses.hpp.

◆ FullScreenMode

enum op::FullScreenMode : bool
strong

Full screen modes. An enum class with the different full screen mode options, i.e., full screen or windored.

Enumerator
FullScreen 

Full screen mode.

Windowed 

Windowed mode, depending on the frame output size.

Definition at line 23 of file enumClasses.hpp.

◆ GpuMode

enum op::GpuMode : unsigned char
strong
Enumerator
Cuda 
OpenCL 
NoGpu 
Size 

Definition at line 6 of file enumClasses.hpp.

◆ HeatMapType

enum op::HeatMapType : unsigned char
strong
Enumerator
Parts 
Background 
PAFs 

Definition at line 19 of file enumClasses.hpp.

◆ LogMode

enum op::LogMode : unsigned char
strong
Enumerator
FileLogging 
StdCout 
All 

Definition at line 14 of file enumClasses.hpp.

◆ PoseMode

enum op::PoseMode : unsigned char
strong
Enumerator
Disabled 
Enabled 
NoNetwork 
Size 

Definition at line 6 of file enumClasses.hpp.

◆ PoseModel

enum op::PoseModel : unsigned char
strong

An enum class in which all the possible type of pose estimation models are included.

Enumerator
BODY_25 

COCO + 6 foot keypoints + neck + lower abs model, with 25+1 components (see poseParameters.hpp for details).

COCO_18 

COCO model + neck, with 18+1 components (see poseParameters.hpp for details).

MPI_15 

MPI model, with 15+1 components (see poseParameters.hpp for details).

MPI_15_4 

Variation of the MPI model, reduced number of CNN stages to 4: faster but less accurate.

BODY_19 

Experimental. Do not use.

BODY_19_X2 

Experimental. Do not use.

BODY_19N 

Experimental. Do not use.

BODY_25E 

Experimental. Do not use.

CAR_12 

Experimental. Do not use.

BODY_25D 

Experimental. Do not use.

BODY_23 

Experimental. Do not use.

CAR_22 

Experimental. Do not use.

BODY_19E 

Experimental. Do not use.

BODY_25B 

Experimental. Do not use.

BODY_135 

Experimental. Do not use.

Size 

Definition at line 9 of file enumClasses.hpp.

◆ PoseProperty

enum op::PoseProperty : unsigned char
strong
Enumerator
NMSThreshold 
ConnectInterMinAboveThreshold 
ConnectInterThreshold 
ConnectMinSubsetCnt 
ConnectMinSubsetScore 
Size 

Definition at line 32 of file enumClasses.hpp.

◆ Priority

enum op::Priority : unsigned char
strong
Enumerator
None 
Low 
Normal 
High 
Max 
NoOutput 

Definition at line 21 of file enumClasses.hpp.

◆ ProducerFpsMode

enum op::ProducerFpsMode : bool
strong
Enumerator
OriginalFps 

The frames will be extracted at the original source fps (frames might be skipped or repeated).

RetrievalFps 

The frames will be extracted when the software retrieves them (frames will not be skipped or repeated).

Definition at line 6 of file enumClasses.hpp.

◆ ProducerProperty

enum op::ProducerProperty : unsigned char
strong
Enumerator
AutoRepeat 
Flip 
Rotation 
FrameStep 
NumberViews 
Size 

Definition at line 14 of file enumClasses.hpp.

◆ ProducerType

enum op::ProducerType : unsigned char
strong

Type of producers An enum class in which all the possible type of Producer are included. In order to add a new Producer, include its name in this enum and add a new 'else if' statement inside ProducerFactory::createProducer().

Enumerator
FlirCamera 

Stereo FLIR (Point-Grey) camera reader. Based on Spinnaker SDK.

ImageDirectory 

An image directory reader. It is able to read images on a folder with a interface similar to the OpenCV cv::VideoCapture.

IPCamera 

An IP camera frames extractor, extending the functionality of cv::VideoCapture.

Video 

A video frames extractor, extending the functionality of cv::VideoCapture.

Webcam 

A webcam frames extractor, extending the functionality of cv::VideoCapture.

None 

No type defined. Default state when no specific Producer has been picked yet.

Definition at line 29 of file enumClasses.hpp.

◆ RenderMode

enum op::RenderMode : unsigned char
strong
Enumerator
None 
Auto 
Cpu 
Gpu 

Definition at line 26 of file enumClasses.hpp.

◆ ScaleMode

enum op::ScaleMode : unsigned char
strong
Enumerator
InputResolution 
NetOutputResolution 
OutputResolution 
ZeroToOne 
ZeroToOneFixedAspect 
PlusMinusOne 
PlusMinusOneFixedAspect 
UnsignedChar 
NoScale 

Definition at line 6 of file enumClasses.hpp.

◆ ThreadManagerMode

enum op::ThreadManagerMode : unsigned char
strong

ThreadManager synchronization mode.

Enumerator
Asynchronous 

First and last queues of ThreadManager will be given to the user, so he must push elements to the first queue and retrieve them from the last one after being processed. Recommended for prototyping environments (easier to test but more error-prone and potentially slower in performance).

AsynchronousIn 

Similar to Asynchronous, but only the input (first) queue is given to the user.

AsynchronousOut 

Similar to Asynchronous, but only the output (last) queue is given to the user.

Synchronous 

Everything will run inside the ThreadManager. Recommended for production environments (more difficult to set up but faster in performance and less error-prone).

Definition at line 9 of file enumClasses.hpp.

◆ WorkerType

enum op::WorkerType : unsigned char
strong
Enumerator
Input 
PreProcessing 
PostProcessing 
Output 
Size 

Definition at line 23 of file enumClasses.hpp.

Function Documentation

◆ addBkgChannel()

OP_API bool op::addBkgChannel ( const PoseModel  poseModel)

◆ averageKeypoints()

template<typename T >
void op::averageKeypoints ( Array< T > &  keypointsA,
const Array< T > &  keypointsB,
const int  personA 
)

◆ checkBool()

template<typename T >
void op::checkBool ( const bool  condition,
const T &  message = "",
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

Definition at line 10 of file check.hpp.

◆ checkEqual()

template<typename T , typename T1 , typename T2 >
void op::checkEqual ( const T1 &  conditionA,
const T2 &  conditionB,
const T &  message = "",
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

Definition at line 19 of file check.hpp.

◆ checkGreaterOrEqual()

template<typename T , typename T1 , typename T2 >
void op::checkGreaterOrEqual ( const T1 &  conditionA,
const T2 &  conditionB,
const T &  message = "",
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

Definition at line 59 of file check.hpp.

◆ checkGreaterThan()

template<typename T , typename T1 , typename T2 >
void op::checkGreaterThan ( const T1 &  conditionA,
const T2 &  conditionB,
const T &  message = "",
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

Definition at line 69 of file check.hpp.

◆ checkLessOrEqual()

template<typename T , typename T1 , typename T2 >
void op::checkLessOrEqual ( const T1 &  conditionA,
const T2 &  conditionB,
const T &  message = "",
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

Definition at line 39 of file check.hpp.

◆ checkLessThan()

template<typename T , typename T1 , typename T2 >
void op::checkLessThan ( const T1 &  conditionA,
const T2 &  conditionB,
const T &  message = "",
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

Definition at line 49 of file check.hpp.

◆ checkNoNullNorEmpty()

template<typename TPointerContainer >
bool op::checkNoNullNorEmpty ( const TPointerContainer &  tPointerContainer)
inline

Definition at line 7 of file pointerContainer.hpp.

◆ checkNotEqual()

template<typename T , typename T1 , typename T2 >
void op::checkNotEqual ( const T1 &  conditionA,
const T2 &  conditionB,
const T &  message = "",
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

Definition at line 29 of file check.hpp.

◆ checkWorkerErrors()

OP_API void op::checkWorkerErrors ( )

◆ COMPILE_TEMPLATE_DATUM() [1/50]

op::COMPILE_TEMPLATE_DATUM ( PriorityQueue  )

◆ COMPILE_TEMPLATE_DATUM() [2/50]

op::COMPILE_TEMPLATE_DATUM ( Queue  )

◆ COMPILE_TEMPLATE_DATUM() [3/50]

op::COMPILE_TEMPLATE_DATUM ( SubThread  )

◆ COMPILE_TEMPLATE_DATUM() [4/50]

op::COMPILE_TEMPLATE_DATUM ( SubThreadNoQueue  )

◆ COMPILE_TEMPLATE_DATUM() [5/50]

op::COMPILE_TEMPLATE_DATUM ( SubThreadQueueIn  )

◆ COMPILE_TEMPLATE_DATUM() [6/50]

op::COMPILE_TEMPLATE_DATUM ( SubThreadQueueInOut  )

◆ COMPILE_TEMPLATE_DATUM() [7/50]

op::COMPILE_TEMPLATE_DATUM ( SubThreadQueueOut  )

◆ COMPILE_TEMPLATE_DATUM() [8/50]

op::COMPILE_TEMPLATE_DATUM ( Thread  )

◆ COMPILE_TEMPLATE_DATUM() [9/50]

op::COMPILE_TEMPLATE_DATUM ( ThreadManager  )

◆ COMPILE_TEMPLATE_DATUM() [10/50]

op::COMPILE_TEMPLATE_DATUM ( WCocoJsonSaver  )

◆ COMPILE_TEMPLATE_DATUM() [11/50]

op::COMPILE_TEMPLATE_DATUM ( WCvMatToOpInput  )

◆ COMPILE_TEMPLATE_DATUM() [12/50]

op::COMPILE_TEMPLATE_DATUM ( WCvMatToOpOutput  )

◆ COMPILE_TEMPLATE_DATUM() [13/50]

op::COMPILE_TEMPLATE_DATUM ( WFaceDetector  )

◆ COMPILE_TEMPLATE_DATUM() [14/50]

op::COMPILE_TEMPLATE_DATUM ( WFaceDetectorOpenCV  )

◆ COMPILE_TEMPLATE_DATUM() [15/50]

op::COMPILE_TEMPLATE_DATUM ( WFaceExtractorNet  )

◆ COMPILE_TEMPLATE_DATUM() [16/50]

op::COMPILE_TEMPLATE_DATUM ( WFaceRenderer  )

◆ COMPILE_TEMPLATE_DATUM() [17/50]

op::COMPILE_TEMPLATE_DATUM ( WFaceSaver  )

◆ COMPILE_TEMPLATE_DATUM() [18/50]

op::COMPILE_TEMPLATE_DATUM ( WFpsMax  )

◆ COMPILE_TEMPLATE_DATUM() [19/50]

op::COMPILE_TEMPLATE_DATUM ( WGui  )

◆ COMPILE_TEMPLATE_DATUM() [20/50]

op::COMPILE_TEMPLATE_DATUM ( WGui3D  )

◆ COMPILE_TEMPLATE_DATUM() [21/50]

op::COMPILE_TEMPLATE_DATUM ( WGuiInfoAdder  )

◆ COMPILE_TEMPLATE_DATUM() [22/50]

op::COMPILE_TEMPLATE_DATUM ( WHandDetector  )

◆ COMPILE_TEMPLATE_DATUM() [23/50]

op::COMPILE_TEMPLATE_DATUM ( WHandDetectorFromTxt  )

◆ COMPILE_TEMPLATE_DATUM() [24/50]

op::COMPILE_TEMPLATE_DATUM ( WHandDetectorTracking  )

◆ COMPILE_TEMPLATE_DATUM() [25/50]

op::COMPILE_TEMPLATE_DATUM ( WHandDetectorUpdate  )

◆ COMPILE_TEMPLATE_DATUM() [26/50]

op::COMPILE_TEMPLATE_DATUM ( WHandExtractorNet  )

◆ COMPILE_TEMPLATE_DATUM() [27/50]

op::COMPILE_TEMPLATE_DATUM ( WHandRenderer  )

◆ COMPILE_TEMPLATE_DATUM() [28/50]

op::COMPILE_TEMPLATE_DATUM ( WHandSaver  )

◆ COMPILE_TEMPLATE_DATUM() [29/50]

op::COMPILE_TEMPLATE_DATUM ( WHeatMapSaver  )

◆ COMPILE_TEMPLATE_DATUM() [30/50]

op::COMPILE_TEMPLATE_DATUM ( WIdGenerator  )

◆ COMPILE_TEMPLATE_DATUM() [31/50]

op::COMPILE_TEMPLATE_DATUM ( WImageSaver  )

◆ COMPILE_TEMPLATE_DATUM() [32/50]

op::COMPILE_TEMPLATE_DATUM ( WKeepTopNPeople  )

◆ COMPILE_TEMPLATE_DATUM() [33/50]

op::COMPILE_TEMPLATE_DATUM ( WKeypointScaler  )

◆ COMPILE_TEMPLATE_DATUM() [34/50]

op::COMPILE_TEMPLATE_DATUM ( WOpOutputToCvMat  )

◆ COMPILE_TEMPLATE_DATUM() [35/50]

op::COMPILE_TEMPLATE_DATUM ( Worker  )

◆ COMPILE_TEMPLATE_DATUM() [36/50]

op::COMPILE_TEMPLATE_DATUM ( WorkerConsumer  )

◆ COMPILE_TEMPLATE_DATUM() [37/50]

op::COMPILE_TEMPLATE_DATUM ( WorkerProducer  )

◆ COMPILE_TEMPLATE_DATUM() [38/50]

op::COMPILE_TEMPLATE_DATUM ( WPeopleJsonSaver  )

◆ COMPILE_TEMPLATE_DATUM() [39/50]

op::COMPILE_TEMPLATE_DATUM ( WPersonIdExtractor  )

◆ COMPILE_TEMPLATE_DATUM() [40/50]

op::COMPILE_TEMPLATE_DATUM ( WPoseExtractor  )

◆ COMPILE_TEMPLATE_DATUM() [41/50]

op::COMPILE_TEMPLATE_DATUM ( WPoseExtractorNet  )

◆ COMPILE_TEMPLATE_DATUM() [42/50]

op::COMPILE_TEMPLATE_DATUM ( WPoseRenderer  )

◆ COMPILE_TEMPLATE_DATUM() [43/50]

op::COMPILE_TEMPLATE_DATUM ( WPoseSaver  )

◆ COMPILE_TEMPLATE_DATUM() [44/50]

op::COMPILE_TEMPLATE_DATUM ( WPoseTriangulation  )

◆ COMPILE_TEMPLATE_DATUM() [45/50]

op::COMPILE_TEMPLATE_DATUM ( WQueueOrderer  )

◆ COMPILE_TEMPLATE_DATUM() [46/50]

op::COMPILE_TEMPLATE_DATUM ( WScaleAndSizeExtractor  )

◆ COMPILE_TEMPLATE_DATUM() [47/50]

op::COMPILE_TEMPLATE_DATUM ( WUdpSender  )

◆ COMPILE_TEMPLATE_DATUM() [48/50]

op::COMPILE_TEMPLATE_DATUM ( WVerbosePrinter  )

◆ COMPILE_TEMPLATE_DATUM() [49/50]

op::COMPILE_TEMPLATE_DATUM ( WVideoSaver  )

◆ COMPILE_TEMPLATE_DATUM() [50/50]

op::COMPILE_TEMPLATE_DATUM ( WVideoSaver3D  )

◆ configureThreadManager()

template<typename TDatum , typename TDatums = std::vector<std::shared_ptr<TDatum>>, typename TDatumsSP = std::shared_ptr<TDatums>, typename TWorker = std::shared_ptr<Worker<TDatumsSP>>>
void op::configureThreadManager ( ThreadManager< TDatumsSP > &  threadManager,
const bool  multiThreadEnabled,
const ThreadManagerMode  threadManagerMode,
const WrapperStructPose wrapperStructPose,
const WrapperStructFace wrapperStructFace,
const WrapperStructHand wrapperStructHand,
const WrapperStructExtra wrapperStructExtra,
const WrapperStructInput wrapperStructInput,
const WrapperStructOutput wrapperStructOutput,
const WrapperStructGui wrapperStructGui,
const std::array< std::vector< TWorker >, int(WorkerType::Size)> &  userWs,
const std::array< bool, int(WorkerType::Size)> &  userWsOnNewThread 
)

Set ThreadManager from TWorkers (private internal function). After any configure() has been called, the TWorkers are initialized. This function resets the ThreadManager and adds them. Common code for start() and exec().

Definition at line 98 of file wrapperAuxiliary.hpp.

◆ connectBodyPartsCpu()

template<typename T >
void op::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  defaultNmsThreshold,
const T  scaleFactor = 1.f,
const bool  maximizePositives = false 
)

◆ connectBodyPartsGpu()

template<typename T >
void op::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  defaultNmsThreshold,
const T  scaleFactor,
const bool  maximizePositives,
Array< T >  pairScoresCpu,
T *  pairScoresGpuPtr,
const unsigned int *const  bodyPartPairsGpuPtr,
const unsigned int *const  mapIdxGpuPtr,
const T *const  peaksGpuPtr 
)

◆ connectBodyPartsOcl()

template<typename T >
void op::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  defaultNmsThreshold,
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 
)

◆ createMultiviewTDatum()

template<typename TDatum , typename TDatums = std::vector<std::shared_ptr<TDatum>>, typename TDatumsSP = std::shared_ptr<TDatums>>
void op::createMultiviewTDatum ( TDatumsSP &  tDatumsSP,
unsigned long long &  frameCounter,
const CameraParameterReader cameraParameterReader,
const void *const  cvMatPtr 
)

It fills camera parameters and splits the cvMat depending on how many camera parameter matrices are found. For example usage, check examples/tutorial_api_cpp/11_asynchronous_custom_input_multi_camera.cpp

Definition at line 1226 of file wrapperAuxiliary.hpp.

◆ createPeopleVector()

template<typename T >
std::vector<std::pair<std::vector<int>, T> > op::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 T  defaultNmsThreshold,
const Array< T > &  precomputedPAFs = Array< T >() 
)

◆ createProducer()

OP_API std::shared_ptr<Producer> op::createProducer ( const ProducerType  producerType = ProducerType::None,
const std::string &  producerString = "",
const Point< int > &  cameraResolution = Point< int >{-1,-1},
const std::string &  cameraParameterPath = "models/cameraParameters/",
const bool  undistortImage = true,
const int  numberViews = -1 
)

This function returns the desired producer given the input parameters.

◆ cudaCheck()

OP_API void op::cudaCheck ( const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

◆ dataFormatToString()

OP_API std::string op::dataFormatToString ( const DataFormat  dataFormat)

◆ datumProducerConstructor()

OP_API void op::datumProducerConstructor ( const std::shared_ptr< Producer > &  producerSharedPtr,
const unsigned long long  frameFirst,
const unsigned long long  frameStep,
const unsigned long long  frameLast 
)

◆ datumProducerConstructorRunningAndGetDatumApplyPlayerControls()

OP_API void op::datumProducerConstructorRunningAndGetDatumApplyPlayerControls ( const std::shared_ptr< Producer > &  producerSharedPtr,
const std::shared_ptr< std::pair< std::atomic< bool >, std::atomic< int >>> &  videoSeekSharedPtr 
)

◆ datumProducerConstructorRunningAndGetDatumFrameIntegrity()

OP_API void op::datumProducerConstructorRunningAndGetDatumFrameIntegrity ( Matrix matrix)

◆ datumProducerConstructorRunningAndGetDatumIsDatumProducerRunning()

OP_API bool op::datumProducerConstructorRunningAndGetDatumIsDatumProducerRunning ( const std::shared_ptr< Producer > &  producerSharedPtr,
const unsigned long long  numberFramesToProcess,
const unsigned long long  globalCounter 
)

◆ datumProducerConstructorRunningAndGetNextFrameNumber()

OP_API unsigned long long op::datumProducerConstructorRunningAndGetNextFrameNumber ( const std::shared_ptr< Producer > &  producerSharedPtr)

◆ datumProducerConstructorTooManyConsecutiveEmptyFrames()

OP_API void op::datumProducerConstructorTooManyConsecutiveEmptyFrames ( unsigned int &  numberConsecutiveEmptyFrames,
const bool  emptyFrame 
)

◆ error() [1/2]

OP_API void op::error ( const std::string &  message,
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

Differences between different kind of errors:

  • error() is a normal error in the code.
  • errorWorker() is an error that occurred on a thread. Therefore, the machine will stop the threads, go back to the main thread, and then throw the error.
  • errorDestructor() is an error that occurred on a destructor. Exception on destructors provokes core dumped, so we simply output an error message via std::cerr.

◆ error() [2/2]

template<typename T >
void op::error ( const T &  message,
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)
inline

Definition at line 46 of file errorAndLog.hpp.

◆ errorDestructor() [1/2]

OP_API void op::errorDestructor ( const std::string &  message,
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

◆ errorDestructor() [2/2]

template<typename T >
void op::errorDestructor ( const T &  message,
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)
inline

Definition at line 72 of file errorAndLog.hpp.

◆ errorWorker() [1/2]

OP_API void op::errorWorker ( const std::string &  message,
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

◆ errorWorker() [2/2]

template<typename T >
void op::errorWorker ( const T &  message,
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)
inline

Definition at line 60 of file errorAndLog.hpp.

◆ estimateAndSaveExtrinsics()

OP_API void op::estimateAndSaveExtrinsics ( const std::string &  parameterFolder,
const std::string &  imageFolder,
const Point< int > &  gridInnerCorners,
const float  gridSquareSizeMm,
const int  index0,
const int  index1,
const bool  imagesAreUndistorted,
const bool  combineCam0Extrinsics 
)

◆ estimateAndSaveIntrinsics()

OP_API void op::estimateAndSaveIntrinsics ( const Point< int > &  gridInnerCorners,
const float  gridSquareSizeMm,
const int  flags,
const std::string &  outputParameterFolder,
const std::string &  imageFolder,
const std::string &  serialNumber,
const bool  saveImagesWithCorners = false 
)

This function estimate and saves the intrinsic parameters (K and distortion coefficients).

Parameters
gridInnerCornersThe Point<int> of the board, i.e., the number of squares by width and height
gridSquareSizeMmFloating number with the size of a square in your defined unit (point, millimeter,etc).
flagsInteger with the OpenCV flags for calibration (e.g., CALIB_RATIONAL_MODEL, CALIB_THIN_PRISM_MODEL, or CALIB_TILTED_MODEL)
outputFilePathString with the name of the file where to write

◆ estimateAndSaveSiftFile()

OP_API void op::estimateAndSaveSiftFile ( const Point< int > &  gridInnerCorners,
const std::string &  imageFolder,
const int  numberCameras,
const bool  saveImagesWithCorners = false 
)

◆ existDirectory()

OP_API bool op::existDirectory ( const std::string &  directoryPath)

◆ existFile()

OP_API bool op::existFile ( const std::string &  filePath)

◆ fastMax()

template<typename T >
T op::fastMax ( const T  a,
const T  b 
)
inline

Definition at line 73 of file fastMath.hpp.

◆ fastMin()

template<typename T >
T op::fastMin ( const T  a,
const T  b 
)
inline

Definition at line 79 of file fastMath.hpp.

◆ fastTruncate()

template<class T >
T op::fastTruncate ( value,
min = 0,
max = 1 
)
inline

Definition at line 85 of file fastMath.hpp.

◆ flagsToDetector()

OP_API Detector op::flagsToDetector ( const int  detector)

◆ flagsToDisplayMode()

OP_API DisplayMode op::flagsToDisplayMode ( const int  display,
const bool  enabled3d 
)

◆ flagsToHeatMaps()

OP_API std::vector<HeatMapType> op::flagsToHeatMaps ( const bool  heatMapsAddParts = false,
const bool  heatMapsAddBkg = false,
const bool  heatMapsAddPAFs = false 
)

◆ flagsToHeatMapScaleMode()

OP_API ScaleMode op::flagsToHeatMapScaleMode ( const int  heatMapScaleMode)

◆ flagsToPoint()

OP_API Point<int> op::flagsToPoint ( const String pointString,
const String pointExample 
)

E.g., const Point<int> netInputSize = flagsToPoint(op::String(FLAGS_net_resolution), "-1x368"); E.g., const Point<int> resolution = flagsToPoint(resolutionString, "1280x720");

◆ flagsToPoseMode()

OP_API PoseMode op::flagsToPoseMode ( const int  poseModeInt)

◆ flagsToPoseModel()

OP_API PoseModel op::flagsToPoseModel ( const String poseModeString)

◆ flagsToProducer()

OP_API std::pair<ProducerType, String> op::flagsToProducer ( const String imageDirectory,
const String videoPath,
const String ipCameraPath = String(""),
const int  webcamIndex = -1,
const bool  flirCamera = false,
const int  flirCameraIndex = -1 
)

◆ flagsToProducerType()

OP_API ProducerType op::flagsToProducerType ( const String imageDirectory,
const String videoPath,
const String ipCameraPath,
const int  webcamIndex,
const bool  flirCamera 
)

◆ flagsToRenderMode()

OP_API RenderMode op::flagsToRenderMode ( const int  renderFlag,
const bool  gpuBuggy = false,
const int  renderPoseFlag = -2 
)

◆ flagsToScaleMode()

OP_API ScaleMode op::flagsToScaleMode ( const int  keypointScaleMode)

◆ formatAsDirectory()

OP_API std::string op::formatAsDirectory ( const std::string &  directoryPathString)

This function makes sure that the directoryPathString is properly formatted. I.e., it changes all '\' by '/', and it makes sure that the string finishes with '/'.

Parameters
directoryPathStringstd::string with the directory path to be formatted.
Returns
std::string with the formatted directory path.

◆ getAverageScore()

template<typename T >
T op::getAverageScore ( const Array< T > &  keypoints,
const int  person 
)

◆ getBiggestPerson()

template<typename T >
int op::getBiggestPerson ( const Array< T > &  keypoints,
const T  threshold 
)

◆ getCudaGpuNumber()

OP_API int op::getCudaGpuNumber ( )

◆ getCvCapPropFrameCount()

OP_API int op::getCvCapPropFrameCount ( )

Wrapper of CV_CAP_PROP_FRAME_COUNT to avoid leaving OpenCV dependencies on headers.

◆ getCvCapPropFrameFps()

OP_API int op::getCvCapPropFrameFps ( )

Wrapper of CV_CAP_PROP_FRAME_FPS to avoid leaving OpenCV dependencies on headers.

◆ getCvCapPropFrameHeight()

OP_API int op::getCvCapPropFrameHeight ( )

Wrapper of CV_CAP_PROP_FRAME_HEIGHT to avoid leaving OpenCV dependencies on headers.

◆ getCvCapPropFrameWidth()

OP_API int op::getCvCapPropFrameWidth ( )

Wrapper of CV_CAP_PROP_FRAME_WIDTH to avoid leaving OpenCV dependencies on headers.

◆ getCvFourcc()

OP_API int op::getCvFourcc ( const char  c1,
const char  c2,
const char  c3,
const char  c4 
)

Wrapper of CV_FOURCC to avoid leaving OpenCV dependencies on headers.

◆ getCvImwriteJpegQuality()

OP_API int op::getCvImwriteJpegQuality ( )

Wrapper of CV_IMWRITE_JPEG_QUALITY to avoid leaving OpenCV dependencies on headers.

◆ getCvImwritePngCompression()

OP_API int op::getCvImwritePngCompression ( )

Wrapper of CV_IMWRITE_PNG_COMPRESSION to avoid leaving OpenCV dependencies on headers.

◆ getCvLoadImageAnydepth()

OP_API int op::getCvLoadImageAnydepth ( )

Wrapper of CV_LOAD_IMAGE_ANYDEPTH to avoid leaving OpenCV dependencies on headers.

◆ getCvLoadImageGrayScale()

OP_API int op::getCvLoadImageGrayScale ( )

Wrapper of CV_LOAD_IMAGE_GRAYSCALE to avoid leaving OpenCV dependencies on headers.

◆ getDistance()

template<typename T >
T op::getDistance ( const Array< T > &  keypoints,
const int  person,
const int  elementA,
const int  elementB 
)

◆ getDistanceAverage() [1/2]

template<typename T >
T op::getDistanceAverage ( const Array< T > &  keypoints,
const int  personA,
const int  personB,
const T  threshold 
)

◆ getDistanceAverage() [2/2]

template<typename T >
T op::getDistanceAverage ( const Array< T > &  keypointsA,
const int  personA,
const Array< T > &  keypointsB,
const int  personB,
const T  threshold 
)

◆ getFileExtension()

OP_API std::string op::getFileExtension ( const std::string &  fullPath)

This function extracts the extension from a full path. E.g., if fullPath is /media/document.txt, output will be txt

Parameters
fullPathstd::string with the full path.
Returns
std::string with the file extension.

◆ getFileNameAndExtension()

OP_API std::string op::getFileNameAndExtension ( const std::string &  fullPath)

This function extracts the file name and extension from a full path.

Parameters
fullPathstd::string with the full path.
Returns
std::string with the file name with extension.

◆ getFileNameNoExtension()

OP_API std::string op::getFileNameNoExtension ( const std::string &  fullPath)

This function extracts the file name (without extension) from a full path.

Parameters
fullPathstd::string with the full path.
Returns
std::string with the file name without extension.

◆ getFileParentFolderPath()

OP_API std::string op::getFileParentFolderPath ( const std::string &  fullPath)

This function extracts the full file path of the folder where it is contained.

Parameters
fullPathstd::string with the full path.
Returns
std::string with the full file path of the folder.

◆ getFilesOnDirectory() [1/3]

OP_API std::vector<std::string> op::getFilesOnDirectory ( const std::string &  directoryPath,
const Extensions  extensions 
)

This function extracts all the files in a directory path with the desired group of extensions (e.g., Extensions::Images).

Parameters
directoryPathstd::string with the directory path.
extensionsExtensions with the kind of extensions desired (e.g., Extensions:Images).
Returns
std::vector<std::string> with the existing file names.

◆ getFilesOnDirectory() [2/3]

OP_API std::vector<std::string> op::getFilesOnDirectory ( const std::string &  directoryPath,
const std::string &  extension 
)

Analogous to getFilesOnDirectory(const std::string& directoryPath, const std::vector<std::string>& extensions) for 1 specific extension.

Parameters
directoryPathstd::string with the directory path.
extensionstd::string with the extension of the desired files.
Returns
std::vector<std::string> with the existing file names.

◆ getFilesOnDirectory() [3/3]

OP_API std::vector<std::string> op::getFilesOnDirectory ( const std::string &  directoryPath,
const std::vector< std::string > &  extensions = {} 
)

This function extracts all the files in a directory path with the desired extensions. If no extensions is specified, then all the file names are returned.

Parameters
directoryPathstd::string with the directory path.
extensionsstd::vector<std::string> with the extensions of the desired files.
Returns
std::vector<std::string> with the existing file names.

◆ getFirstNumberOnString()

OP_API std::string op::getFirstNumberOnString ( const std::string &  string)

◆ getFullFilePathNoExtension()

OP_API std::string op::getFullFilePathNoExtension ( const std::string &  fullPath)

This function extracts the full file path without its extension from a full file path.

Parameters
fullPathstd::string with the full path.
Returns
std::string with the full file path without extension.

◆ getGpuMode()

OP_API GpuMode op::getGpuMode ( )

◆ getGpuNumber()

OP_API int op::getGpuNumber ( )

◆ getIfInMainThreadOrEmpty()

OP_API bool op::getIfInMainThreadOrEmpty ( )

◆ getIfNotInMainThreadOrEmpty()

OP_API bool op::getIfNotInMainThreadOrEmpty ( )

◆ getKeypointsArea()

template<typename T >
T op::getKeypointsArea ( const Array< T > &  keypoints,
const int  person,
const T  threshold 
)

◆ getKeypointsPerson()

template<typename T >
Array<T> op::getKeypointsPerson ( const Array< T > &  keypoints,
const int  person,
const bool  noCopy = false 
)

Creates and Array<T> with a specific person.

Parameters
keypointsArray<T> with the original data array to slice.
personindicates the index of the array to extract.
noCopyindicates 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.
Returns
Array<T> with the same dimension than keypoints expect the first dimension being 1. E.g., if keypoints is {p,k,m}, the resulting Array<T> is {1,k,m}.

◆ getKeypointsRectangle()

template<typename T >
Rectangle<T> op::getKeypointsRectangle ( const Array< T > &  keypoints,
const int  person,
const T  threshold,
const int  firstIndex = 0,
const int  lastIndex = -1 
)

◆ getKeypointsRoi() [1/3]

template<typename T >
float op::getKeypointsRoi ( const Array< T > &  keypoints,
const int  personA,
const int  personB,
const T  threshold 
)

◆ getKeypointsRoi() [2/3]

template<typename T >
float op::getKeypointsRoi ( const Array< T > &  keypointsA,
const int  personA,
const Array< T > &  keypointsB,
const int  personB,
const T  threshold 
)

◆ getKeypointsRoi() [3/3]

template<typename T >
float op::getKeypointsRoi ( const Rectangle< T > &  rectangleA,
const Rectangle< T > &  rectangleB 
)

◆ getLastNumber()

OP_API unsigned long long op::getLastNumber ( const std::string &  string)

◆ getNonZeroKeypoints()

template<typename T >
int op::getNonZeroKeypoints ( const Array< T > &  keypoints,
const int  person,
const T  threshold 
)

◆ getNumberCudaBlocks()

unsigned int op::getNumberCudaBlocks ( const unsigned int  totalRequired,
const unsigned int  numberCudaThreads = CUDA_NUM_THREADS 
)
inline

Definition at line 15 of file cuda.hpp.

◆ getNumberCudaThreadsAndBlocks()

OP_API void op::getNumberCudaThreadsAndBlocks ( dim3 &  numberCudaThreads,
dim3 &  numberCudaBlocks,
const Point< unsigned int > &  frameSize 
)

◆ getNumberElementsToRender()

OP_API unsigned int op::getNumberElementsToRender ( const PoseModel  poseModel)

◆ getPoseBodyPartMapping()

OP_API const std::map<unsigned int, std::string>& op::getPoseBodyPartMapping ( const PoseModel  poseModel)

◆ getPoseBodyPartPairsRender()

OP_API const std::vector<unsigned int>& op::getPoseBodyPartPairsRender ( const PoseModel  poseModel)

◆ getPoseColors()

OP_API const std::vector<float>& op::getPoseColors ( const PoseModel  poseModel)

◆ getPoseDefaultConnectInterMinAboveThreshold()

OP_API float op::getPoseDefaultConnectInterMinAboveThreshold ( const bool  maximizePositives = false)

◆ getPoseDefaultConnectInterThreshold()

OP_API float op::getPoseDefaultConnectInterThreshold ( const PoseModel  poseModel,
const bool  maximizePositives = false 
)

◆ getPoseDefaultConnectMinSubsetScore()

OP_API float op::getPoseDefaultConnectMinSubsetScore ( const bool  maximizePositives = false)

◆ getPoseDefaultMinSubsetCnt()

OP_API unsigned int op::getPoseDefaultMinSubsetCnt ( const bool  maximizePositives = false)

◆ getPoseDefaultNmsThreshold()

OP_API float op::getPoseDefaultNmsThreshold ( const PoseModel  poseModel,
const bool  maximizePositives = false 
)

◆ getPoseMapIndex()

OP_API const std::vector<unsigned int>& op::getPoseMapIndex ( const PoseModel  poseModel)

◆ getPoseMaxPeaks()

OP_API unsigned int op::getPoseMaxPeaks ( )

◆ getPoseNetDecreaseFactor()

OP_API float op::getPoseNetDecreaseFactor ( const PoseModel  poseModel)

◆ getPoseNumberBodyParts()

OP_API unsigned int op::getPoseNumberBodyParts ( const PoseModel  poseModel)

◆ getPosePartPairs()

OP_API const std::vector<unsigned int>& op::getPosePartPairs ( const PoseModel  poseModel)

◆ getPoseProtoTxt()

OP_API const std::string& op::getPoseProtoTxt ( const PoseModel  poseModel)

◆ getPoseScales()

OP_API const std::vector<float>& op::getPoseScales ( const PoseModel  poseModel)

◆ getPoseTrainedModel()

OP_API const std::string& op::getPoseTrainedModel ( const PoseModel  poseModel)

◆ getThreadId()

OP_API std::string op::getThreadId ( )

◆ getTimerInit()

OP_API std::chrono::time_point<std::chrono::high_resolution_clock> op::getTimerInit ( )

◆ getTimeSeconds()

OP_API double op::getTimeSeconds ( const std::chrono::time_point< std::chrono::high_resolution_clock > &  timerInit)

◆ keepRoiInside()

OP_API void op::keepRoiInside ( Rectangle< int > &  roi,
const int  imageWidth,
const int  imageHeight 
)

◆ loadData() [1/2]

OP_API Matrix op::loadData ( const std::string &  cvMatName,
const std::string &  fileNameNoExtension,
const DataFormat  dataFormat 
)

◆ loadData() [2/2]

OP_API std::vector<Matrix> op::loadData ( const std::vector< std::string > &  cvMatNames,
const std::string &  fileNameNoExtension,
const DataFormat  dataFormat 
)

◆ loadHandDetectorTxt()

OP_API std::vector<std::array<Rectangle<float>, 2> > op::loadHandDetectorTxt ( const std::string &  txtFilePath)

◆ loadImage()

OP_API Matrix op::loadImage ( const std::string &  fullFilePath,
const int  openCvFlags = getCvLoadImageAnydepth() 
)

◆ makeDirectory()

OP_API void op::makeDirectory ( const std::string &  directoryPath)

◆ maximumCpu()

template<typename T >
void op::maximumCpu ( T *  targetPtr,
const T *const  sourcePtr,
const std::array< int, 4 > &  targetSize,
const std::array< int, 4 > &  sourceSize 
)

◆ maximumGpu()

template<typename T >
void op::maximumGpu ( T *  targetPtr,
const T *const  sourcePtr,
const std::array< int, 4 > &  targetSize,
const std::array< int, 4 > &  sourceSize 
)

◆ mergeVectors()

template<typename T >
std::vector<T> op::mergeVectors ( const std::vector< T > &  vectorA,
const std::vector< T > &  vectorB 
)

std::vector<T> concatenator. Auxiliary function that concatenate std::vectors of any class type T. It assumes basic copy (ideal for smart pointers, pointers, etc.), so note that the copy still shares the same internal data. It will not work for element that cannot be copied.

Parameters
vectorAFirst std::shared_ptr<T> element to be concatenated.
vectorBSecond std::shared_ptr<T> element to be concatenated.
Returns
Concatenated std::vector<T> of both vectorA and vectorB.

Definition at line 40 of file standard.hpp.

◆ nmsCpu()

template<typename T >
void op::nmsCpu ( T *  targetPtr,
int *  kernelPtr,
const T *const  sourcePtr,
const T  threshold,
const std::array< int, 4 > &  targetSize,
const std::array< int, 4 > &  sourceSize,
const Point< T > &  offset 
)

◆ nmsGpu()

template<typename T >
void op::nmsGpu ( T *  targetPtr,
int *  kernelPtr,
const T *const  sourcePtr,
const T  threshold,
const std::array< int, 4 > &  targetSize,
const std::array< int, 4 > &  sourceSize,
const Point< T > &  offset 
)

◆ nmsOcl()

template<typename T >
void op::nmsOcl ( T *  targetPtr,
uint8_t *  kernelGpuPtr,
uint8_t *  kernelCpuPtr,
const T *const  sourcePtr,
const T  threshold,
const std::array< int, 4 > &  targetSize,
const std::array< int, 4 > &  sourceSize,
const Point< T > &  offset,
const int  gpuID = 0 
)

◆ opLog() [1/2]

OP_API void op::opLog ( const std::string &  message,
const Priority  priority = Priority::Max,
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)

◆ opLog() [2/2]

template<typename T >
void op::opLog ( const T &  message,
const Priority  priority = Priority::Max,
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)
inline

Definition at line 86 of file errorAndLog.hpp.

◆ opLogIfDebug()

template<typename T >
void op::opLogIfDebug ( const T &  message,
const Priority  priority = Priority::Max,
const int  line = -1,
const std::string &  function = "",
const std::string &  file = "" 
)
inline

Definition at line 97 of file errorAndLog.hpp.

◆ pafPtrIntoVector()

template<typename T >
std::vector<std::tuple<T, T, int, int, int> > op::pafPtrIntoVector ( const Array< T > &  pairScores,
const T *const  peaksPtr,
const int  maxPeaks,
const std::vector< unsigned int > &  bodyPartPairs,
const unsigned int  numberBodyPartPairs 
)

◆ pafVectorIntoPeopleVector()

template<typename T >
std::vector<std::pair<std::vector<int>, T> > op::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 
)

◆ peopleVectorToPeopleArray()

template<typename T >
void op::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 
)

◆ poseBodyPartMapStringToKey() [1/2]

OP_API unsigned int op::poseBodyPartMapStringToKey ( const PoseModel  poseModel,
const std::string &  string 
)

◆ poseBodyPartMapStringToKey() [2/2]

OP_API unsigned int op::poseBodyPartMapStringToKey ( const PoseModel  poseModel,
const std::vector< std::string > &  strings 
)

◆ positiveCharRound()

template<typename T >
char op::positiveCharRound ( const T  a)
inline

Definition at line 17 of file fastMath.hpp.

◆ positiveIntRound()

template<typename T >
int op::positiveIntRound ( const T  a)
inline

Definition at line 29 of file fastMath.hpp.

◆ positiveLongLongRound()

template<typename T >
long long op::positiveLongLongRound ( const T  a)
inline

Definition at line 41 of file fastMath.hpp.

◆ positiveLongRound()

template<typename T >
long op::positiveLongRound ( const T  a)
inline

Definition at line 35 of file fastMath.hpp.

◆ positiveSCharRound()

template<typename T >
signed char op::positiveSCharRound ( const T  a)
inline

Definition at line 23 of file fastMath.hpp.

◆ printTime()

OP_API void op::printTime ( const std::chrono::time_point< std::chrono::high_resolution_clock > &  timerInit,
const std::string &  firstMessage,
const std::string &  secondMessage,
const Priority  priority 
)

◆ recenter()

template<typename T >
Rectangle<T> op::recenter ( const Rectangle< T > &  rectangle,
const T  newWidth,
const T  newHeight 
)

◆ refineAndSaveExtrinsics()

OP_API void op::refineAndSaveExtrinsics ( const std::string &  parameterFolder,
const std::string &  imageFolder,
const Point< int > &  gridInnerCorners,
const float  gridSquareSizeMm,
const int  numberCameras,
const bool  imagesAreUndistorted,
const bool  saveImagesWithCorners = false 
)

◆ remove0sFromString()

OP_API std::string op::remove0sFromString ( const std::string &  string)

◆ removeAllOcurrencesOfSubString()

OP_API void op::removeAllOcurrencesOfSubString ( std::string &  stringToModify,
const std::string &  substring 
)

◆ removePeopleBelowThresholdsAndFillFaces()

template<typename T >
void op::removePeopleBelowThresholdsAndFillFaces ( std::vector< int > &  validSubsetIndexes,
int &  numberPeople,
std::vector< std::pair< std::vector< int >, T >> &  subsets,
const unsigned int  numberBodyParts,
const int  minSubsetCnt,
const T  minSubsetScore,
const bool  maximizePositives,
const T *const  peaksPtr 
)

◆ removeSpecialsCharacters()

OP_API std::string op::removeSpecialsCharacters ( const std::string &  stringToVariate)

◆ renderFaceKeypointsCpu()

OP_API void op::renderFaceKeypointsCpu ( Array< float > &  frameArray,
const Array< float > &  faceKeypoints,
const float  renderThreshold 
)

◆ renderFaceKeypointsGpu()

void op::renderFaceKeypointsGpu ( float *  framePtr,
float *  maxPtr,
float *  minPtr,
float *  scalePtr,
const Point< unsigned int > &  frameSize,
const float *const  facePtr,
const int  numberPeople,
const float  renderThreshold,
const float  alphaColorToAdd = FACE_DEFAULT_ALPHA_KEYPOINT 
)

◆ renderHandKeypointsCpu()

OP_API void op::renderHandKeypointsCpu ( Array< float > &  frameArray,
const std::array< Array< float >, 2 > &  handKeypoints,
const float  renderThreshold 
)

◆ renderHandKeypointsGpu()

void op::renderHandKeypointsGpu ( float *  framePtr,
float *  maxPtr,
float *  minPtr,
float *  scalePtr,
const Point< unsigned int > &  frameSize,
const float *const  handsPtr,
const int  numberHands,
const float  renderThreshold,
const float  alphaColorToAdd = HAND_DEFAULT_ALPHA_KEYPOINT 
)

◆ renderKeypointsCpu()

template<typename T >
void op::renderKeypointsCpu ( Array< T > &  frameArray,
const Array< T > &  keypoints,
const std::vector< unsigned int > &  pairs,
const std::vector< T >  colors,
const T  thicknessCircleRatio,
const T  thicknessLineRatioWRTCircle,
const std::vector< T > &  poseScales,
const T  threshold 
)

◆ renderPoseDistanceGpu()

void op::renderPoseDistanceGpu ( float *  framePtr,
const Point< unsigned int > &  frameSize,
const float *const  heatMapPtr,
const Point< int > &  heatMapSize,
const float  scaleToKeepRatio,
const unsigned int  part,
const float  alphaBlending = POSE_DEFAULT_ALPHA_HEAT_MAP 
)

◆ renderPoseHeatMapGpu()

void op::renderPoseHeatMapGpu ( float *  frame,
const Point< unsigned int > &  frameSize,
const float *const  heatMapPtr,
const Point< int > &  heatMapSize,
const float  scaleToKeepRatio,
const unsigned int  part,
const float  alphaBlending = POSE_DEFAULT_ALPHA_HEAT_MAP 
)

◆ renderPoseHeatMapsGpu()

void op::renderPoseHeatMapsGpu ( float *  frame,
const PoseModel  poseModel,
const Point< unsigned int > &  frameSize,
const float *const  heatMapPtr,
const Point< int > &  heatMapSize,
const float  scaleToKeepRatio,
const float  alphaBlending = POSE_DEFAULT_ALPHA_HEAT_MAP 
)

◆ renderPoseKeypointsCpu()

OP_API void op::renderPoseKeypointsCpu ( Array< float > &  frameArray,
const Array< float > &  poseKeypoints,
const PoseModel  poseModel,
const float  renderThreshold,
const bool  blendOriginalFrame = true 
)

◆ renderPoseKeypointsGpu()

void op::renderPoseKeypointsGpu ( float *  framePtr,
float *  maxPtr,
float *  minPtr,
float *  scalePtr,
const PoseModel  poseModel,
const int  numberPeople,
const Point< unsigned int > &  frameSize,
const float *const  posePtr,
const float  renderThreshold,
const bool  googlyEyes = false,
const bool  blendOriginalFrame = true,
const float  alphaBlending = POSE_DEFAULT_ALPHA_KEYPOINT 
)

◆ renderPosePAFGpu()

void op::renderPosePAFGpu ( float *  framePtr,
const PoseModel  poseModel,
const Point< unsigned int > &  frameSize,
const float *const  heatMapPtr,
const Point< int > &  heatMapSize,
const float  scaleToKeepRatio,
const int  part,
const float  alphaBlending = POSE_DEFAULT_ALPHA_HEAT_MAP 
)

◆ renderPosePAFsGpu()

void op::renderPosePAFsGpu ( float *  framePtr,
const PoseModel  poseModel,
const Point< unsigned int > &  frameSize,
const float *const  heatMapPtr,
const Point< int > &  heatMapSize,
const float  scaleToKeepRatio,
const float  alphaBlending = POSE_DEFAULT_ALPHA_HEAT_MAP 
)

◆ reorderAndNormalize()

template<typename T >
void op::reorderAndNormalize ( T *  targetPtr,
const unsigned char *const  srcPtr,
const int  width,
const int  height,
const int  channels 
)

◆ replaceAll()

OP_API void op::replaceAll ( std::string &  stringText,
const char  charToChange,
const char  charToAdd 
)

◆ resizeAndMergeCpu()

template<typename T >
void op::resizeAndMergeCpu ( T *  targetPtr,
const std::vector< const T * > &  sourcePtrs,
const std::array< int, 4 > &  targetSize,
const std::vector< std::array< int, 4 >> &  sourceSizes,
const std::vector< T > &  scaleInputToNetInputs = {1.f} 
)

◆ resizeAndMergeGpu()

template<typename T >
void op::resizeAndMergeGpu ( T *  targetPtr,
const std::vector< const T * > &  sourcePtrs,
const std::array< int, 4 > &  targetSize,
const std::vector< std::array< int, 4 >> &  sourceSizes,
const std::vector< T > &  scaleInputToNetInputs = {1.f} 
)

◆ resizeAndMergeOcl()

template<typename T >
void op::resizeAndMergeOcl ( T *  targetPtr,
const std::vector< const T * > &  sourcePtrs,
std::vector< T * > &  sourceTempPtrs,
const std::array< int, 4 > &  targetSize,
const std::vector< std::array< int, 4 >> &  sourceSizes,
const std::vector< T > &  scaleInputToNetInputs = {1.f},
const int  gpuID = 0 
)

◆ resizeAndPadRbgGpu() [1/2]

template<typename T >
void op::resizeAndPadRbgGpu ( T *  targetPtr,
const T *const  srcPtr,
const int  sourceWidth,
const int  sourceHeight,
const int  targetWidth,
const int  targetHeight,
const T  scaleFactor 
)

◆ resizeAndPadRbgGpu() [2/2]

template<typename T >
void op::resizeAndPadRbgGpu ( T *  targetPtr,
const unsigned char *const  srcPtr,
const int  sourceWidth,
const int  sourceHeight,
const int  targetWidth,
const int  targetHeight,
const T  scaleFactor 
)

◆ resizeGetScaleFactor()

OP_API double op::resizeGetScaleFactor ( const Point< int > &  initialSize,
const Point< int > &  targetSize 
)

◆ rotateAndFlipFrame()

OP_API void op::rotateAndFlipFrame ( Matrix frame,
const double  rotationAngle,
const bool  flipFrame = false 
)

It performs rotation and flipping over the desired Mat.

Parameters
cvMatMat with the frame matrix to be rotated and/or flipped.
rotationAngleHow much the cvMat element should be rotated. 0 would mean no rotation.
flipFrameWhether to flip the cvMat element. Set to false to disable it.

◆ saveData() [1/2]

OP_API void op::saveData ( const Matrix opMat,
const std::string  cvMatName,
const std::string &  fileNameNoExtension,
const DataFormat  dataFormat 
)

◆ saveData() [2/2]

OP_API void op::saveData ( const std::vector< Matrix > &  opMats,
const std::vector< std::string > &  cvMatNames,
const std::string &  fileNameNoExtension,
const DataFormat  dataFormat 
)

◆ saveFloatArray()

OP_API void op::saveFloatArray ( const Array< float > &  array,
const std::string &  fullFilePath 
)

◆ saveImage()

OP_API void op::saveImage ( const Matrix matrix,
const std::string &  fullFilePath,
const std::vector< int > &  openCvCompressionParams = {getCvImwriteJpegQuality(), 100, getCvImwritePngCompression(), 9} 
)

◆ savePeopleJson() [1/2]

OP_API void op::savePeopleJson ( const Array< float > &  keypoints,
const std::vector< std::vector< std::array< float, 3 >>> &  candidates,
const std::string &  keypointName,
const std::string &  fileName,
const bool  humanReadable 
)

◆ savePeopleJson() [2/2]

OP_API void op::savePeopleJson ( const std::vector< std::pair< Array< float >, std::string >> &  keypointVector,
const std::vector< std::vector< std::array< float, 3 >>> &  candidates,
const std::string &  fileName,
const bool  humanReadable 
)

◆ scaleKeypoints()

template<typename T >
void op::scaleKeypoints ( Array< T > &  keypoints,
const T  scale 
)

◆ scaleKeypoints2d() [1/2]

template<typename T >
void op::scaleKeypoints2d ( Array< T > &  keypoints,
const T  scaleX,
const T  scaleY 
)

◆ scaleKeypoints2d() [2/2]

template<typename T >
void op::scaleKeypoints2d ( Array< T > &  keypoints,
const T  scaleX,
const T  scaleY,
const T  offsetX,
const T  offsetY 
)

◆ setMainThread()

OP_API void op::setMainThread ( )

◆ splitString()

OP_API std::vector<std::string> op::splitString ( const std::string &  stringToSplit,
const std::string &  delimiter 
)

◆ stringToDataFormat()

OP_API DataFormat op::stringToDataFormat ( const std::string &  dataFormat)

◆ threadIdPP()

OP_API void op::threadIdPP ( unsigned long long &  threadId,
const bool  multiThreadEnabled 
)

Thread ID increase (private internal function). If multi-threading mode, it increases the thread ID. If single-threading mode (for debugging), it does not modify it. Note that mThreadId must be re-initialized to 0 before starting a new Wrapper(T) configuration.

Parameters
threadIdunsigned long long element with the current thread id value. I will be edited to the next `desired thread id number.

◆ toFixedLengthString()

template<typename T >
std::string op::toFixedLengthString ( const T  number,
const unsigned long long  stringLength = 0 
)

This template function turns an integer number into a fixed-length std::string.

Parameters
numberT integer corresponding to the integer to be formatted.
stringLengthunsigned long long indicating the final length. If 0, the final length is the original number length.
Returns
std::string with the formatted value.

◆ toLower()

OP_API std::string op::toLower ( const std::string &  string)

◆ toUpper()

OP_API std::string op::toUpper ( const std::string &  string)

◆ transpose()

OP_API void op::transpose ( Matrix matrix)

◆ tToString()

template<typename T >
std::string op::tToString ( const T &  message)

Definition at line 21 of file errorAndLog.hpp.

◆ uCharCvMatToFloatPtr()

OP_API void op::uCharCvMatToFloatPtr ( float *  floatPtrImage,
const Matrix matImage,
const int  normalize 
)

◆ uCharImageCast()

template<typename T >
void op::uCharImageCast ( unsigned char *  targetPtr,
const T *const  srcPtr,
const int  volume 
)

◆ uCharRound()

template<typename T >
unsigned char op::uCharRound ( const T  a)
inline

Definition at line 48 of file fastMath.hpp.

◆ uIntRound()

template<typename T >
unsigned int op::uIntRound ( const T  a)
inline

Definition at line 54 of file fastMath.hpp.

◆ uLongLongRound()

template<typename T >
unsigned long long op::uLongLongRound ( const T  a)
inline

Definition at line 66 of file fastMath.hpp.

◆ ulongRound()

template<typename T >
unsigned long op::ulongRound ( const T  a)
inline

Definition at line 60 of file fastMath.hpp.

◆ unrollArrayToUCharCvMat()

OP_API void op::unrollArrayToUCharCvMat ( Matrix matResult,
const Array< float > &  array 
)

◆ vectorsAreEqual()

template<typename T >
bool op::vectorsAreEqual ( const std::vector< T > &  vectorA,
const std::vector< T > &  vectorB 
)

Definition at line 9 of file standard.hpp.

◆ wrapperConfigureSanityChecks()

OP_API void op::wrapperConfigureSanityChecks ( WrapperStructPose wrapperStructPose,
const WrapperStructFace wrapperStructFace,
const WrapperStructHand wrapperStructHand,
const WrapperStructExtra wrapperStructExtra,
const WrapperStructInput wrapperStructInput,
const WrapperStructOutput wrapperStructOutput,
const WrapperStructGui wrapperStructGui,
const bool  renderOutput,
const bool  userInputAndPreprocessingWsEmpty,
const bool  userOutputWsEmpty,
const std::shared_ptr< Producer > &  producerSharedPtr,
const ThreadManagerMode  threadManagerMode 
)

It checks that no wrong/contradictory flags are enabled for Wrapper(T)

Parameters
wrapperStructPose
wrapperStructFace
wrapperStructHand
wrapperStructExtra
wrapperStructInput
wrapperStructOutput
renderOutput
userOutputWsEmpty
producerSharedPtr
threadManagerMode

Variable Documentation

◆ CUDA_NUM_THREADS

const auto op::CUDA_NUM_THREADS = 512u

Definition at line 9 of file cuda.hpp.

◆ F135

const auto op::F135 = H135 + 40

Definition at line 187 of file poseParametersRender.hpp.

◆ FACE_CCN_DECREASE_FACTOR

const auto op::FACE_CCN_DECREASE_FACTOR = 8.f

Definition at line 24 of file faceParameters.hpp.

◆ FACE_COLORS_RENDER

const std::vector<float> op::FACE_COLORS_RENDER {FACE_COLORS_RENDER_GPU}

Definition at line 20 of file faceParameters.hpp.

◆ FACE_DEFAULT_ALPHA_HEAT_MAP

const auto op::FACE_DEFAULT_ALPHA_HEAT_MAP = POSE_DEFAULT_ALPHA_HEAT_MAP

Definition at line 30 of file faceParameters.hpp.

◆ FACE_DEFAULT_ALPHA_KEYPOINT

const auto op::FACE_DEFAULT_ALPHA_KEYPOINT = POSE_DEFAULT_ALPHA_KEYPOINT

Definition at line 29 of file faceParameters.hpp.

◆ FACE_MAX_FACES

const auto op::FACE_MAX_FACES = POSE_MAX_PEOPLE

Definition at line 9 of file faceParameters.hpp.

◆ FACE_NUMBER_PARTS

const auto op::FACE_NUMBER_PARTS = 70u

Definition at line 11 of file faceParameters.hpp.

◆ FACE_PAIRS_RENDER

const std::vector<unsigned int> op::FACE_PAIRS_RENDER {FACE_PAIRS_RENDER_GPU}

Definition at line 18 of file faceParameters.hpp.

◆ FACE_PROTOTXT

const std::string op::FACE_PROTOTXT {"face/pose_deploy.prototxt"}

Definition at line 25 of file faceParameters.hpp.

◆ FACE_SCALES_RENDER

const std::vector<float> op::FACE_SCALES_RENDER {FACE_SCALES_RENDER_GPU}

Definition at line 21 of file faceParameters.hpp.

◆ FACE_TRAINED_MODEL

const std::string op::FACE_TRAINED_MODEL {"face/pose_iter_116000.caffemodel"}

Definition at line 26 of file faceParameters.hpp.

◆ H135

const auto op::H135 = 25

Definition at line 186 of file poseParametersRender.hpp.

◆ HAND_CCN_DECREASE_FACTOR

const auto op::HAND_CCN_DECREASE_FACTOR = 8.f

Definition at line 43 of file handParameters.hpp.

◆ HAND_COLORS_RENDER

const std::vector<float> op::HAND_COLORS_RENDER {HAND_COLORS_RENDER_GPU}

Definition at line 38 of file handParameters.hpp.

◆ HAND_DEFAULT_ALPHA_HEAT_MAP

const auto op::HAND_DEFAULT_ALPHA_HEAT_MAP = POSE_DEFAULT_ALPHA_HEAT_MAP

Definition at line 49 of file handParameters.hpp.

◆ HAND_DEFAULT_ALPHA_KEYPOINT

const auto op::HAND_DEFAULT_ALPHA_KEYPOINT = POSE_DEFAULT_ALPHA_KEYPOINT

Definition at line 48 of file handParameters.hpp.

◆ HAND_MAX_HANDS

const auto op::HAND_MAX_HANDS = 2*POSE_MAX_PEOPLE

Definition at line 9 of file handParameters.hpp.

◆ HAND_NUMBER_PARTS

const auto op::HAND_NUMBER_PARTS = 21u

Definition at line 11 of file handParameters.hpp.

◆ HAND_PAIRS_RENDER

const std::vector<unsigned int> op::HAND_PAIRS_RENDER {HAND_PAIRS_RENDER_GPU}

Definition at line 15 of file handParameters.hpp.

◆ HAND_PROTOTXT

const std::string op::HAND_PROTOTXT {"hand/pose_deploy.prototxt"}

Definition at line 44 of file handParameters.hpp.

◆ HAND_SCALES_RENDER

const std::vector<float> op::HAND_SCALES_RENDER {HAND_SCALES_RENDER_GPU}

Definition at line 39 of file handParameters.hpp.

◆ HAND_TRAINED_MODEL

const std::string op::HAND_TRAINED_MODEL {"hand/pose_iter_102000.caffemodel"}

Definition at line 45 of file handParameters.hpp.

◆ POSE_DEFAULT_ALPHA_HEAT_MAP

const auto op::POSE_DEFAULT_ALPHA_HEAT_MAP = 0.7f

Definition at line 11 of file poseParametersRender.hpp.

◆ POSE_DEFAULT_ALPHA_KEYPOINT

const auto op::POSE_DEFAULT_ALPHA_KEYPOINT = 0.6f

Definition at line 10 of file poseParametersRender.hpp.

◆ POSE_MAX_PEOPLE

const auto op::POSE_MAX_PEOPLE = 127u

Definition at line 14 of file poseParameters.hpp.