-
Notifications
You must be signed in to change notification settings - Fork 36
/
Camera.h
73 lines (56 loc) · 1.15 KB
/
Camera.h
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
/*
* http://github.com/dusty-nv/jetson-video
*/
#ifndef __JETSON_CAMERA_H__
#define __JETSON_CAMERA_H__
#include <stdint.h>
/**
* Abstract camera interface.
*/
class Camera
{
public:
/**
* Constructor
*/
Camera();
/**
* Destructor
*/
virtual ~Camera();
/**
* Open camera for streaming
*/
virtual bool Open() = 0;
/**
* Close camera stream.
*/
virtual bool Close() = 0;
/**
* Get width, in pixels, of camera image.
*/
inline uint32_t GetWidth() const { return mWidth; }
/**
* Retrieve height, in pixels, of camera image.
*/
inline uint32_t GetHeight() const { return mHeight; }
/**
* Return the size in bytes of one line of the image.
*/
inline uint32_t GetPitch() const { return mPitch; }
/**
* Return the bit depth per pixel.
*/
inline uint32_t GetDepth() const { return mDepth; }
/**
* Return the size (in bytes) of one image frame.
*/
inline uint32_t GetSize() const { return mSize; }
protected:
uint32_t mWidth;
uint32_t mHeight;
uint32_t mPitch;
uint32_t mDepth;
uint32_t mSize;
};
#endif