-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDrawSkeleton.h
More file actions
executable file
·74 lines (57 loc) · 2.16 KB
/
DrawSkeleton.h
File metadata and controls
executable file
·74 lines (57 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
* @file DrawSkeleton.h
* @ingroup Drawing Kinect
* @author Dominique Vaufreydaz, Grenoble Alpes University, Inria
* @copyright All right reserved.
*/
#ifndef __DRAW_SKELETON_H__
#define __DRAW_SKELETON_H__
#define SkeletonFileName "/skeleton/skeleton.timestamp"
#ifdef KINECT_1
// to refactor
#endif
#ifdef KINECT_2
#include "DrawRawData.h"
#include "Kinect/KinectBody.h"
#define RawSkeletonFileName "/skeleton/skeleton.raw"
namespace MobileRGBD { namespace Kinect2 {
/**
* @class DrawSkeleton DrawSkeleton.cpp DrawSkeleton.h
* @brief Class to draw skeletons (aka Bodies) from the Kinect2 data.
*
* @author Dominique Vaufreydaz, Grenoble Alpes University, Inria
*/
class DrawSkeleton : public DrawRawData
{
public:
/** @brief constructor. Draw data from the skeleton stream of the Kinect2.
*
* @param Folder [in] Main folder containing the data. Body data will be search in 'Folder/skeleton/' subfolder.
* @param _DrawInDepth [in] Boolean to know if we want to draw in Depth of in Video stream (for scaling purpose)
*/
DrawSkeleton( const std::string& Folder, bool _DrawInDepth = true )
: DrawRawData( Folder + SkeletonFileName, Folder + RawSkeletonFileName, 0 /* will be corrected late in constructor */ )
{
// Skeleton's are not in single mode
Mode = SubFramesMode;
DrawInDepth = _DrawInDepth;
// Correct size of frame
CurrentBody.Set((unsigned char*)nullptr);
FrameSize = CurrentBody.BodySize;
}
/** @brief Virtual destructor, always.
*/
virtual ~DrawSkeleton() {};
bool DrawInDepth; /*!< @brief Boolean value to store if we draw in Depth or in Video (for scaling purpose) */
protected:
/** @brief ProcessElement is a callback function called by mother classes when data are ready.
*
* @param RequestTimestamp [in] The timestamp of the data.
* @param UserData [in] User pointer to working data. Here a pointer to a cv:Mat to draw in.
*/
virtual bool ProcessElement( const TimeB &RequestTimestamp, void * UserData = nullptr );
KinectBody CurrentBody; /*!< @brief KinectBody object to store data to draw */
};
}} // namespace MobileRGBD::Kinect2
#endif // KINECT_2
#endif