-
Notifications
You must be signed in to change notification settings - Fork 0
/
prosilica.h
executable file
·94 lines (68 loc) · 1.92 KB
/
prosilica.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//
// C++ Interface: prosilica
//
// Description:
//
//
// Author: Arnaud Sevin <[email protected]>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef PROSILICA_H
#define PROSILICA_H
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <sstream>
#include <vector>
#include <time.h>
#include <sys/time.h> /* gettimeofday() */
#include <PvApi.h>
#include <ImageLib.h>
#include "yapi.h"
using namespace std;
/**
@author Arnaud Sevin <[email protected]>
*/
typedef struct tCamera {
unsigned long UID;
tPvHandle Handle;
tPvFrame Frame;
} tCamera;
// wait for a camera to be plugged
void waitForCamera();
// get the first camera found
void cameraGet(tCamera* camera);
// open the camera
void cameraSetup(tCamera* camera);
// setup and start streaming
void cameraStart(tCamera* camera, tPvUint32 packetSize);
// stop streaming
void cameraStop(tCamera* camera);
// snap and save a frame from the camera
void cameraSnap(tCamera* camera);
tPvFrame *cameraSnap(tCamera* camera, int nbSnap);
void cameraFreeBuf(tPvFrame* buff, int nbSnap);
// unsetup the camera
void cameraUnsetup(tCamera* camera);
string cameraGetError(tPvErr Err);
void cameraSetPixelFormat(tCamera* camera, string format);
void cameraGetPixelFormat(tCamera* camera, char *format, const int formatSize);
void cameraSetExpo(tCamera* camera, tPvUint32 expo);
void cameraGetExpo(tCamera* camera, tPvUint32 *expo);
void cameraSetROI(tCamera* camera, tPvUint32 *ROI);
void cameraGetROI(tCamera* camera, tPvUint32 *ROI);
extern "C" {
void Y_camera_obj(int argc);
void camera_free(void *obj);
void camera_eval(void *obj, int argc);
void camera_extract(void *obj, char *func);
void Y_camera_start(int argc);
void Y_camera_stop(int argc);
void Y_camera_setExpo(int argc);
void Y_camera_getExpo(int argc);
void Y_camera_setROI(int argc);
void Y_camera_getROI(int argc);
};
#endif