visageSDK
ShowcaseDemo/app/src/main/cpp/AndroidImageCapture.h
1 #ifndef CAMERASAMPLE_ANDROIDIMAGECAPTURE_H
2 #define CAMERASAMPLE_ANDROIDIMAGECAPTURE_H
3 
4 #include <pthread.h>
5 #include <cerrno>
6 #include "vs_main.h"
7 
8 #define VISAGE_FRAMEGRABBER_FMT_RGB 0
9 #define VISAGE_FRAMEGRABBER_FMT_BGR 1
10 #define VISAGE_FRAMEGRABBER_FMT_LUMINANCE 2
11 #define VISAGE_FRAMEGRABBER_FMT_RGBA 3
12 #define VISAGE_FRAMEGRABBER_FMT_BGRA 4
13 
14 #define VISAGE_FRAMEGRABBER_ORIGIN_TL 0
15 #define VISAGE_FRAMEGRABBER_ORIGIN_BL 1
16 
17 
18 namespace VisageSDK
19 {
20 
25 
26  public:
27 
32 
39  AndroidImageCapture(int width, int height, int format=VISAGE_FRAMEGRABBER_FMT_LUMINANCE);
40 
45 
50  VsImage *GrabFrame(long &timeStamp);
51 
58  void WriteFrame(unsigned char *imageData, int width, int height);
59 
60 
61  private:
62 
63  VsImage* buffer;
64  int width, height;
65  char *pixelsData;
66  };
67 
68 }
69 
70 #endif //CAMERASAMPLE_ANDROIDIMAGECAPTURE_H
AndroidImageCapture is class that implements a simple frame grabber that serves a single image to the...
void WriteFrame(unsigned char *imageData, int width, int height)
Method for writing imageData to buffer object.
VsImage * GrabFrame(long &timeStamp)
This function is called to get the frame to process.
Namespace.
Definition: android_header.h:1
Image store container.