API
ocam2_sdk.c
Go to the documentation of this file.
1 /** -- FIRSTLIGHT --
2  \file ocam2_sdk.c
3 
4  \brief Main library file
5 
6  \author FIRSTLIGHT
7 */
8 
9 #include <stdlib.h>
10 #include <stdio.h>
11 #include <stdarg.h>
12 #include <string.h>
13 #include <assert.h>
14 
15 #include "ocam2_sdk.h"
16 #include "ocam2_pvt.h"
17 
18 #if defined(_WIN32) || defined(_WIN64)
19 /* We are on Windows */
20 #define strtok_r strtok_s
21 #define __restrict__
22 #endif
23 
24 /* SDK global information */
25 int *g_descrblTab=NULL;
26 static int g_nbElem=0;
27 static int g_nbCamera=0;
28 
29 
31 { {0, OCAM2_UNKNOWN,NULL}, /* 0 */
32  {0, OCAM2_UNKNOWN,NULL}, /* 1 */
33  {0, OCAM2_UNKNOWN,NULL}, /* 2 */
34  {0, OCAM2_UNKNOWN,NULL}, /* 3 */
35  {0, OCAM2_UNKNOWN,NULL}, /* 4 */
36  {0, OCAM2_UNKNOWN,NULL}, /* 5 */
37  {0, OCAM2_UNKNOWN,NULL}, /* 6 */
38  {0, OCAM2_UNKNOWN,NULL}, /* 7 */
39  {0, OCAM2_UNKNOWN,NULL}, /* 8 */
40  {0, OCAM2_UNKNOWN,NULL} /* 9 */
41 };
42 
43 
44 void ocam2_printf(ocam2_printf_sev severity, const char * format, ...)
45 {
46  if ( (OCAM2_SEV_INFO==severity) || (OCAM2_SEV_WARNING==severity) || (OCAM2_SEV_ERROR==severity) )
47  {
48  static const char *severityStr[]={"INFO","WARNING","ERROR"};
49 
50  va_list arguments;
51  va_start(arguments, format);
52 
53  fprintf(stderr, "OCAM2SDK:%s: ", severityStr[severity]);
54  vfprintf(stderr, format, arguments);
55 
56  va_end(arguments);
57  }
58 }
59 
61 {
62  if ((0<=id) && (id<OCAM2_SDK_MAX_CAMERA))
63  return 1;/*true==valid*/
64  else
65  return 0;/*false==invalid*/
66 }
67 
68 /* API function */
70 {
71  assert(ocam2_isIdValid(id));
72 
73  return g_camInfoTab[id].mode;
74 }
75 
76 /* API function */
77 const char *ocam2_modeStr(ocam2_mode mode)
78 {
79  static const char *ocam2_modeText[] =
80  {"Uknown",
81  "Standard Mode(240x240@2060Hz)",
82  "Cropping Mode(240x120@3680Hz)",
83  "Binning 2x2 Mode(120x120@3620Hz)",
84  "Binning 3x3 Mode(80x80@4950Hz)",
85  "Binning 4x4 Mode(60x60@5900Hz)",
86  "Cropping Mode(240x128@3500Hz)",
87  "Mode 7",
88  "Mode 8",
89  "Binning 1x3 Mode(240x80@4944Hz)",
90  "Binning 1x4 Mode(240x60@5962Hz)"};
91 
92  switch(mode)
93  {
94  case OCAM2_UNKNOWN:
95  case OCAM2_NORMAL:
97  case OCAM2_BINNING2x2:
98  case OCAM2_BINNING3x3:
99  case OCAM2_BINNING4x4:
101  case OCAM2_BINNING1x3:
102  case OCAM2_BINNING1x4:
103 
104  return ocam2_modeText[mode];
105  default:
106  return NULL;
107  }
108 }
109 
110 /* API function */
111 const char * ocam2_sdkVersion()
112 {
113  return OCAMSDK_VERSION;
114 }
115 
116 /* API function */
117 const char * ocam2_sdkBuild()
118 {
119  return OCAMSDK_BUILD;
120 }
121 
122 int ocam2_fsize(FILE *fp)
123 {
124  int current, sz;
125 
126  current=ftell(fp);
127  fseek(fp, 0L, SEEK_END);
128  sz=ftell(fp);
129  fseek(fp,current,SEEK_SET);
130  return sz;
131 }
132 
133 static int ocam2_fnbElem(char *buff, int bsz, char c)
134 {
135  int nb=0;
136  int i=0;
137 
138  while(i<bsz)
139  {
140  if (buff[i]==c) nb++;
141  i++;
142  }
143  return nb;
144 }
145 
146 
147 static int ocam2_fillDescrblTab(const char *descrbFile)
148 {
149  FILE *fp;
150  int ret =-1;
151 
152  if (NULL!=g_descrblTab)
153  {
154  /* Descramble table already filled, return without error */
155  /* WARNING: if different table exist one day, this code will have to be modified */
156  return 0;
157  }
158 
159  /* Ouverture du fichier de descrambling */
160  if (NULL != (fp=fopen(descrbFile, "rb")))
161  {
162  int nbElem=0;
163  int sz=ocam2_fsize(fp);
164 
165  if (0!=sz)
166  {
167  char *pfileContent;
168  pfileContent=malloc(sz);
169 
170  if (NULL != pfileContent)
171  {
172  if (1==fread(pfileContent, sz, 1, fp))
173  {
174  nbElem=ocam2_fnbElem(pfileContent, sz, ',');
175 
176  if (0!=nbElem)
177  {
178  g_descrblTab = malloc(nbElem*sizeof(int));
179 
180  if (NULL != g_descrblTab)
181  {
182  char *arg;
183  char delim[] = ",\n\r";
184  char *saveptr;
185 
186  char *pfc=pfileContent;
187  int i=0;
188 
189  while (i<nbElem)
190  {
191  arg = strtok_r(pfc, delim, &saveptr);
192  if (NULL != arg)
193  g_descrblTab[i] = atoi(arg);
194 
195  i++;
196  /* For next token pfc should be NULL */
197  if (NULL!=pfc) pfc=NULL;
198  }
199  ret=0;
200  }
201  }
202  }
203  free(pfileContent);
204  }
205  }
206  g_nbElem = nbElem;
207  fclose(fp);
209  ocam2_printf(OCAM2_SEV_WARNING, "Nb element found in descrambling file(=%d) different from normal pixel number(=%d) !!!\n",
211  }
212  else
213  {
214  ocam2_printf(OCAM2_SEV_ERROR, "Invalid File\n");
215  }
216  return ret;
217 }
218 
219 
220 static void ocam2_descramble_normal(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
221 {
222  int i;
223  for (i=0; i< OCAM2_PIXELS_IMAGE_NORMAL; i++)
224  {
225  image[i] = imageRaw[g_descrblTab[i]];
226  }
227  *number = ((int *)imageRaw)[OCAM2_IMAGE_NB_OFFSET/4]; /* int offset */
228 }
229 
230 static void ocam2_descramble_cropping240x120(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
231 {
233  int i;
234  for (i=0; i< chunk; i++)
235  {
238 
239  image[i] = imageRaw[g_descrblTab[OCAM2_AMPLI_WIDTH+x+y*240]];
241  }
242  *number = ((int *)imageRaw)[OCAM2_IMAGE_NB_OFFSET/4]; /* int offset */
243 }
244 
245 static void ocam2_descramble_cropping240x128(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
246 {
248  int i;
249  for (i=0; i< chunk; i++)
250  {
253 
254  image[i] = imageRaw[g_descrblTab[OCAM2_AMPLI_WIDTH-4+x+y*240]];
256  }
257  *number = ((int *)imageRaw)[OCAM2_IMAGE_NB_OFFSET/4]; /* int offset */
258 }
259 
260 static void ocam2_descramble_binning2x2(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
261 {
263  int i;
264  for (i=0; i < chunk; i++)
265  {
266  image[i] = imageRaw[g_descrblTab[i*OCAM2_NB_IDENTICAL_PIXELS_BINNING2x2]];
268  }
269  *number = ((int *)imageRaw)[OCAM2_IMAGE_NB_OFFSET/4]; /* int offset */
270 }
271 
272 static void ocam2_descramble_binning3x3(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
273 {
274  /* In this mode,per ampli, the 17 first pixels are duplicated 3 times,
275  then the 9 last pixels are sent without duplication.
276  17+9=26 beacuse the 6 prescan pixels are sent duplicated 3 times.
277  So we get , 6(x3) + [11(x3)+9] = 60 = the amplifier width in normal mode
278  */
280  int i;
281  /* image[]:line size 80, the g_descrblTab[]:line size 240 */
282  for (i=0; i < chunk; i++)
283  {
285  int xa=x%20; /* xa = x related to one ampli, range[0-19] */
286  int na=x/20; /* na = ampli number */
288 
289  if (!(na%2)) /* even ampli */
290  {
291  if (xa<9)
292  {
293  image[i] = imageRaw[g_descrblTab[na*OCAM2_AMPLI_WIDTH+xa+y*240]];
294  image[chunk+i] = imageRaw[g_descrblTab[na*OCAM2_AMPLI_WIDTH+xa+y*240+OCAM2_BINNING3x3_OFFSET]];
295  }
296  else
297  {
298  image[i] = imageRaw[g_descrblTab[na*OCAM2_AMPLI_WIDTH+9+3*(xa-9)+y*240]];
299  image[chunk+i] = imageRaw[g_descrblTab[na*OCAM2_AMPLI_WIDTH+9+3*(xa-9)+y*240+OCAM2_BINNING3x3_OFFSET]];
300  }
301  }
302  else /* odd ampli */
303  {
304 
305  if (xa<11)
306  {
307  image[i] = imageRaw[g_descrblTab[3*OCAM2_AMPLI_PRESCAN+na*OCAM2_AMPLI_WIDTH+3*xa+y*240]];
309  }
310  else
311  {
312  image[i] = imageRaw[g_descrblTab[3*OCAM2_AMPLI_PRESCAN+na*OCAM2_AMPLI_WIDTH+3*11+xa-11+y*240]];
313  image[chunk+i] = imageRaw[g_descrblTab[3*OCAM2_AMPLI_PRESCAN+na*OCAM2_AMPLI_WIDTH+3*11+xa-11+y*240+OCAM2_BINNING3x3_OFFSET]];
314  }
315  }
316  }
317  *number = ((int *)imageRaw)[OCAM2_IMAGE_NB_OFFSET/4]; /* int offset */
318 }
319 
320 static void ocam2_descramble_binning4x4(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
321 {
322  /* In this mode,per ampli, the first pixel is duplicated 3 times, then 12 pixels are duplicated 4 times,
323  and at last the 9 last pixels are sent without duplication.
324  1+12+9=22 because the 6 prescan pixels are sent too.
325  So we get, [1(x3)+6(x4)] + [6(x4)+9] = 60 = the amplifier width in normal mode.
326  We notice we have an extra pixel in addition to prescan pixel because the end image is 15 pixels per ampli only.
327  */
329  int i;
330  /* image[]:line size 80, the g_descrblTab[]:line size 240 */
331  for (i=0; i < chunk; i++)
332  {
334  int xa=x%15; /* xa = x related to one ampli, range[0-19] */
335  int na=x/15;
337 
338  if (!(na%2)) /* even ampli */
339  {
340  if (xa<9)
341  {
342  image[i] = imageRaw[g_descrblTab[na*OCAM2_AMPLI_WIDTH+xa+y*240]];
343  image[chunk+i] = imageRaw[g_descrblTab[na*OCAM2_AMPLI_WIDTH+xa+y*240+OCAM2_BINNING4x4_OFFSET]];
344  }
345  else
346  {
347  image[i] = imageRaw[g_descrblTab[na*OCAM2_AMPLI_WIDTH+9+4*(xa-9)+y*240]];
348  image[chunk+i] = imageRaw[g_descrblTab[na*OCAM2_AMPLI_WIDTH+9+4*(xa-9)+y*240+OCAM2_BINNING4x4_OFFSET]];
349  }
350  }
351  else /* odd ampli */
352  {
353  if (xa<6)
354  {
355  image[i] = imageRaw[g_descrblTab[3+4*OCAM2_AMPLI_PRESCAN+na*OCAM2_AMPLI_WIDTH+4*xa+y*240]];
356  image[chunk+i] = imageRaw[g_descrblTab[3+4*OCAM2_AMPLI_PRESCAN+na*OCAM2_AMPLI_WIDTH+4*xa+y*240+OCAM2_BINNING4x4_OFFSET]];
357  }
358  else
359  {
360  image[i] = imageRaw[g_descrblTab[3+4*OCAM2_AMPLI_PRESCAN+na*OCAM2_AMPLI_WIDTH+4*6+xa-6+y*240]];
361  image[chunk+i] = imageRaw[g_descrblTab[3+4*OCAM2_AMPLI_PRESCAN+na*OCAM2_AMPLI_WIDTH+4*6+xa-6+y*240+OCAM2_BINNING4x4_OFFSET]];
362  }
363  }
364  }
365  *number = ((int *)imageRaw)[OCAM2_IMAGE_NB_OFFSET/4]; /* int offset */
366 }
367 
368 static void ocam2_descramble_2_track(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
369 {
370  const int chunk=OCAM2_PIXELS_IMAGE_2_TRACK/2;
371  int i;
372  for (i=0; i < chunk; i++)
373  {
374  image[i] = imageRaw[g_descrblTab[i*OCAM2_NB_IDENTICAL_PIXELS_2_TRACK]];
376  }
377  *number = ((int *)imageRaw)[OCAM2_IMAGE_NB_OFFSET/4]; /* int offset */
378 }
379 
380 static void ocam2_descramble_4_track(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
381 {
382  const int chunk=OCAM2_PIXELS_IMAGE_4_TRACK/2;
383  int i;
384  for (i=0; i < chunk; i++)
385  {
386  image[i] = imageRaw[g_descrblTab[i*OCAM2_NB_IDENTICAL_PIXELS_4_TRACK]];
388  }
389  *number = ((int *)imageRaw)[OCAM2_IMAGE_NB_OFFSET/4]; /* int offset */
390 }
391 
392 
393 static void ocam2_descramble_binning1x3(unsigned int* __restrict__ number, short* __restrict__ image, const short* __restrict__ imageRaw)
394 {
395  const int chunk = OCAM2_PIXELS_IMAGE_BINNING1x3 / 2;
396  int i;
397  for (i = 0; i < chunk; i++)
398  {
399  image[i] = imageRaw[g_descrblTab[i * OCAM2_NB_IDENTICAL_PIXELS_BINNING1x3]];
401  }
402  *number = ((int*)imageRaw)[OCAM2_IMAGE_NB_OFFSET / 4]; /* int offset */
403 }
404 
405 static void ocam2_descramble_binning1x4(unsigned int* __restrict__ number, short* __restrict__ image, const short* __restrict__ imageRaw)
406 {
407  const int chunk = OCAM2_PIXELS_IMAGE_BINNING1x4 / 2;
408  int i;
409  for (i = 0; i < chunk; i++)
410  {
411  image[i] = imageRaw[g_descrblTab[i * OCAM2_NB_IDENTICAL_PIXELS_BINNING1x4]];
413  }
414  *number = ((int*)imageRaw)[OCAM2_IMAGE_NB_OFFSET / 4]; /* int offset */
415 }
416 
417 /* API function */
418 void ocam2_descramble(ocam2_id id, unsigned int *number, short *image, const short *imageRaw)
419 {
420  assert(ocam2_isIdValid(id));
421  assert(NULL!=number);
422  assert(NULL!=image);
423  assert(NULL!=imageRaw);
424  assert(NULL!=g_descrblTab);
425  assert(OCAM2_UNKNOWN !=g_camInfoTab[id].mode);
426 
427  g_camInfoTab[id].pfuncDescrbl(number, image, imageRaw);
428 }
429 
430 /* API function */
431 ocam2_rc ocam2_init(ocam2_mode mode, const char *descrbFile, ocam2_id *id)
432 {
433  if ( (mode!=OCAM2_NORMAL) &&
434  (mode!=OCAM2_CROPPING240x120) &&
435  (mode!=OCAM2_CROPPING240x128) &&
436  (mode!=OCAM2_BINNING2x2) &&
437  (mode!=OCAM2_BINNING3x3) &&
438  (mode!=OCAM2_BINNING4x4) &&
439  (mode!=OCAM2_2_TRACK) &&
440  (mode!=OCAM2_4_TRACK) &&
441  (mode != OCAM2_BINNING1x3) &&
442  (mode != OCAM2_BINNING1x4) )
443  return OCAM2_ERROR;
444 
445  if ( (NULL == descrbFile) && (0==g_nbCamera) )
446  return OCAM2_ERROR;
447 
448  if (NULL == id)
449  return OCAM2_ERROR;
450 
452  return OCAM2_ERROR;
453 
454  if (0==g_nbCamera)
455  {
456  if (0!=ocam2_fillDescrblTab(descrbFile))
457  return OCAM2_ERROR;
458  }
459 
460  *id=g_nbCamera;
461  g_nbCamera++;
462 
463  g_camInfoTab[*id].mode=mode;
464 
465  if (OCAM2_CROPPING240x120==mode)
467  else if (OCAM2_CROPPING240x128==mode)
469  else if (OCAM2_BINNING2x2==mode)
471  else if (OCAM2_BINNING3x3==mode)
473  else if (OCAM2_BINNING4x4==mode)
475  else if (OCAM2_2_TRACK==mode)
477  else if (OCAM2_4_TRACK==mode)
479  else if (OCAM2_BINNING1x3 == mode)
481  else if (OCAM2_BINNING1x4 == mode)
483  else
485 
486  return OCAM2_OK;
487 }
488 
489 /* API function */
491 {
492  if (!ocam2_isIdValid(id))
493  return OCAM2_ERROR;
494 
496  g_camInfoTab[id].pfuncDescrbl=NULL;
497  g_nbCamera--;
498 
499  if (0==g_nbCamera)
500  {
501  free(g_descrblTab);
502  g_descrblTab=NULL;
503  }
504  return OCAM2_OK;
505 }
506 
507 
GeneratorWrapper< std::vector< T > > chunk(size_t size, GeneratorWrapper< T > &&generator)
Definition: catch.hpp:4333
Private definition for libocam2sdk.
ocam2_printf_sev
Definition: ocam2_pvt.h:26
@ OCAM2_SEV_INFO
Definition: ocam2_pvt.h:27
@ OCAM2_SEV_ERROR
Definition: ocam2_pvt.h:29
@ OCAM2_SEV_WARNING
Definition: ocam2_pvt.h:28
ocam2_descramble_func_t pfuncDescrbl
Definition: ocam2_pvt.h:46
ocam2_mode mode
Definition: ocam2_pvt.h:45
static void ocam2_descramble_2_track(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
Definition: ocam2_sdk.c:368
static int g_nbElem
Definition: ocam2_sdk.c:26
const char * ocam2_sdkBuild()
Return sdk build.
Definition: ocam2_sdk.c:117
ocam2_rc ocam2_init(ocam2_mode mode, const char *descrbFile, ocam2_id *id)
Create a camera instance with the provided mode.
Definition: ocam2_sdk.c:431
ocam2_camInfo g_camInfoTab[OCAM2_SDK_MAX_CAMERA]
Definition: ocam2_sdk.c:30
int ocam2_isIdValid(ocam2_id id)
Definition: ocam2_sdk.c:60
static void ocam2_descramble_binning1x4(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
Definition: ocam2_sdk.c:405
void ocam2_descramble(ocam2_id id, unsigned int *number, short *image, const short *imageRaw)
Create a camera instance with the provided mode.
Definition: ocam2_sdk.c:418
const char * ocam2_sdkVersion()
Return sdk version.
Definition: ocam2_sdk.c:111
static int ocam2_fillDescrblTab(const char *descrbFile)
Definition: ocam2_sdk.c:147
const char * ocam2_modeStr(ocam2_mode mode)
Return a description text for camera mode.
Definition: ocam2_sdk.c:77
int ocam2_fsize(FILE *fp)
Definition: ocam2_sdk.c:122
static void ocam2_descramble_4_track(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
Definition: ocam2_sdk.c:380
static void ocam2_descramble_binning3x3(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
Definition: ocam2_sdk.c:272
void ocam2_printf(ocam2_printf_sev severity, const char *format,...)
Definition: ocam2_sdk.c:44
static void ocam2_descramble_binning4x4(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
Definition: ocam2_sdk.c:320
ocam2_rc ocam2_exit(ocam2_id id)
Clear a camera instance.
Definition: ocam2_sdk.c:490
static int ocam2_fnbElem(char *buff, int bsz, char c)
Definition: ocam2_sdk.c:133
static void ocam2_descramble_normal(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
Definition: ocam2_sdk.c:220
static void ocam2_descramble_cropping240x128(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
Definition: ocam2_sdk.c:245
static int g_nbCamera
Definition: ocam2_sdk.c:27
static void ocam2_descramble_binning1x3(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
Definition: ocam2_sdk.c:393
static void ocam2_descramble_cropping240x120(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
Definition: ocam2_sdk.c:230
int * g_descrblTab
Definition: ocam2_sdk.c:25
ocam2_mode ocam2_getMode(ocam2_id id)
Return the camera mode.
Definition: ocam2_sdk.c:69
static void ocam2_descramble_binning2x2(unsigned int *__restrict__ number, short *__restrict__ image, const short *__restrict__ imageRaw)
Definition: ocam2_sdk.c:260
The purpose of the libocam2sdk library is to provide an easy way to achieve ocam2 specific opération....
int ocam2_id
Library camera identifier.
Definition: ocam2_sdk.h:268
#define OCAM2_BINNING3x3_OFFSET
Definition: ocam2_sdk.h:102
#define OCAM2_AMPLI_PRESCAN
Definition: ocam2_sdk.h:21
#define OCAM2_IMAGE_HEIGHT_CROPPING240x120
Definition: ocam2_sdk.h:47
#define OCAM2_4_TRACK_OFFSET
Definition: ocam2_sdk.h:153
#define OCAM2_PIXELS_IMAGE_NORMAL
Definition: ocam2_sdk.h:36
#define OCAM2_PIXELS_IMAGE_BINNING3x3
Definition: ocam2_sdk.h:92
#define OCAM2_IMAGE_HEIGHT_CROPPING240x128
Definition: ocam2_sdk.h:60
#define OCAM2_NB_IDENTICAL_PIXELS_BINNING1x4
Definition: ocam2_sdk.h:186
#define OCAM2_IMAGE_WIDTH_BINNING3x3
Definition: ocam2_sdk.h:88
#define OCAM2_PIXELS_IMAGE_CROPPING240x120
Definition: ocam2_sdk.h:49
ocam2_rc
Enum of ocam2 library return code.
Definition: ocam2_sdk.h:258
@ OCAM2_OK
Definition: ocam2_sdk.h:260
@ OCAM2_ERROR
Definition: ocam2_sdk.h:259
@ OCAM2_2_TRACK
Definition: ocam2_sdk.h:240
@ OCAM2_BINNING3x3
Definition: ocam2_sdk.h:232
@ OCAM2_BINNING4x4
Definition: ocam2_sdk.h:234
@ OCAM2_CROPPING240x120
Definition: ocam2_sdk.h:228
@ OCAM2_BINNING1x3
Definition: ocam2_sdk.h:244
@ OCAM2_BINNING1x4
Definition: ocam2_sdk.h:246
@ OCAM2_BINNING2x2
Definition: ocam2_sdk.h:230
@ OCAM2_4_TRACK
Definition: ocam2_sdk.h:242
@ OCAM2_UNKNOWN
Definition: ocam2_sdk.h:224
@ OCAM2_NORMAL
Definition: ocam2_sdk.h:226
@ OCAM2_CROPPING240x128
Definition: ocam2_sdk.h:238
#define OCAM2_NB_IDENTICAL_PIXELS_2_TRACK
Definition: ocam2_sdk.h:134
#define OCAM2_IMAGE_WIDTH_CROPPING240x120
Definition: ocam2_sdk.h:45
#define OCAM2_2_TRACK_OFFSET
Definition: ocam2_sdk.h:136
enum workMode ocam2_mode
typedef of ocam2 camera mode
#define OCAM2_PIXELS_IMAGE_BINNING1x3
Definition: ocam2_sdk.h:161
#define OCAM2_PIXELS_IMAGE_BINNING1x4
Definition: ocam2_sdk.h:178
#define OCAM2_NB_IDENTICAL_PIXELS_BINNING1x3
Definition: ocam2_sdk.h:169
#define OCAM2_IMAGE_NB_OFFSET
Definition: ocam2_sdk.h:208
#define OCAM2_PIXELS_IMAGE_4_TRACK
Definition: ocam2_sdk.h:143
#define OCAM2_IMAGE_WIDTH_CROPPING240x128
Definition: ocam2_sdk.h:58
#define OCAM2_SDK_MAX_CAMERA
Definition: ocam2_sdk.h:286
#define OCAM2_BINNING1x4_OFFSET
Definition: ocam2_sdk.h:188
#define OCAM2_BINNING1x3_OFFSET
Definition: ocam2_sdk.h:171
#define OCAM2_AMPLI_WIDTH
Definition: ocam2_sdk.h:17
#define OCAM2_BINNING2x2_OFFSET
Definition: ocam2_sdk.h:85
#define OCAM2_BINNING4x4_OFFSET
Definition: ocam2_sdk.h:119
#define OCAM2_PIXELS_IMAGE_BINNING2x2
Definition: ocam2_sdk.h:75
#define OCAM2_PIXELS_IMAGE_2_TRACK
Definition: ocam2_sdk.h:126
#define OCAM2_PIXELS_IMAGE_CROPPING240x128
Definition: ocam2_sdk.h:62
#define OCAM2_IMAGE_WIDTH_BINNING4x4
Definition: ocam2_sdk.h:105
#define OCAM2_NB_IDENTICAL_PIXELS_4_TRACK
Definition: ocam2_sdk.h:151
#define OCAM2_PIXELS_IMAGE_BINNING4x4
Definition: ocam2_sdk.h:109
#define OCAM2_NB_IDENTICAL_PIXELS_BINNING2x2
Definition: ocam2_sdk.h:83