summaryrefslogtreecommitdiff
path: root/2003/i/buzz/src/camera/camera.h
blob: b6c003e0208637c1ce648d415787f834775b1301 (plain)
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
#ifndef camera_h
#define camera_h
// camera.h
// buzz - Programme du robot Efrei Robotique I1-I2 2003
// Copyright (C) 2003 Nicolas Schodet

class Camera
{
    int m_fd;
    int m_w, m_h, m_d;
    int m_cut;
    int m_frameSize;
    int m_lastRead;
  public:
    // Constructeur.
    Camera ();
    // Destructeur.
    ~Camera ();
    // Lit une image.
    int read (unsigned char *image);
    // Lit une image en RGB.
    int readRGB (unsigned char *rgb);
    // Lit la taille.
    void getSize (int &w, int &h) const { w = m_w; h = m_h; }
    void getSize (int &w, int &h, int &d) const { w = m_w; h = m_h; d = m_d; }
};

#endif // camera_h