17 #define OCAM2_AMPLI_WIDTH 60
19 #define OCAM2_AMPLI_WIDTH_RAW 66
21 #define OCAM2_AMPLI_PRESCAN (OCAM2_AMPLI_WIDTH_RAW-OCAM2_AMPLI_WIDTH)
24 #define OCAM2_AMPLI_HEIGHT 120
27 #define OCAM2_PIXEL_MAX_VAL 32767
29 #define OCAM2_PIXEL_MIN_VAL (-32768)
32 #define OCAM2_IMAGE_WIDTH_NORMAL 240
34 #define OCAM2_IMAGE_HEIGHT_NORMAL 240
36 #define OCAM2_PIXELS_IMAGE_NORMAL (OCAM2_IMAGE_WIDTH_NORMAL*OCAM2_IMAGE_HEIGHT_NORMAL)
38 #define OCAM2_IMAGE_WIDTH_RAW_NORMAL 1056
40 #define OCAM2_IMAGE_HEIGHT_RAW_NORMAL 121
42 #define OCAM2_PIXELS_RAW_NORMAL ((OCAM2_IMAGE_WIDTH_RAW_NORMAL*OCAM2_IMAGE_HEIGHT_RAW_NORMAL)/2)
45 #define OCAM2_IMAGE_WIDTH_CROPPING240x120 120
47 #define OCAM2_IMAGE_HEIGHT_CROPPING240x120 120
49 #define OCAM2_PIXELS_IMAGE_CROPPING240x120 (OCAM2_IMAGE_WIDTH_CROPPING240x120*OCAM2_IMAGE_HEIGHT_CROPPING240x120)
51 #define OCAM2_IMAGE_WIDTH_RAW_CROPPING240x120 1056
53 #define OCAM2_IMAGE_HEIGHT_RAW_CROPPING240x120 61
55 #define OCAM2_PIXELS_RAW_CROPPING240x120 ((OCAM2_IMAGE_WIDTH_RAW_CROPPING240x120*OCAM2_IMAGE_HEIGHT_RAW_CROPPING240x120)/2)
58 #define OCAM2_IMAGE_WIDTH_CROPPING240x128 128
60 #define OCAM2_IMAGE_HEIGHT_CROPPING240x128 128
62 #define OCAM2_PIXELS_IMAGE_CROPPING240x128 (OCAM2_IMAGE_WIDTH_CROPPING240x128*OCAM2_IMAGE_HEIGHT_CROPPING240x128)
64 #define OCAM2_IMAGE_WIDTH_RAW_CROPPING240x128 1056
66 #define OCAM2_IMAGE_HEIGHT_RAW_CROPPING240x128 65
68 #define OCAM2_PIXELS_RAW_CROPPING240x128 ((OCAM2_IMAGE_WIDTH_RAW_CROPPING240x128*OCAM2_IMAGE_HEIGHT_RAW_CROPPING240x128)/2)
71 #define OCAM2_IMAGE_WIDTH_BINNING2x2 120
73 #define OCAM2_IMAGE_HEIGHT_BINNING2x2 120
75 #define OCAM2_PIXELS_IMAGE_BINNING2x2 (OCAM2_IMAGE_WIDTH_BINNING2x2*OCAM2_IMAGE_HEIGHT_BINNING2x2)
77 #define OCAM2_IMAGE_WIDTH_RAW_BINNING2x2 1056
79 #define OCAM2_IMAGE_HEIGHT_RAW_BINNING2x2 62
81 #define OCAM2_PIXELS_RAW_BINNING2x2 ((OCAM2_IMAGE_WIDTH_RAW_BINNING2x2*OCAM2_IMAGE_HEIGHT_RAW_BINNING2x2)/2)
83 #define OCAM2_NB_IDENTICAL_PIXELS_BINNING2x2 2
85 #define OCAM2_BINNING2x2_OFFSET (OCAM2_PIXELS_IMAGE_NORMAL - (OCAM2_PIXELS_IMAGE_BINNING2x2/2*OCAM2_NB_IDENTICAL_PIXELS_BINNING2x2))
88 #define OCAM2_IMAGE_WIDTH_BINNING3x3 80
90 #define OCAM2_IMAGE_HEIGHT_BINNING3x3 80
92 #define OCAM2_PIXELS_IMAGE_BINNING3x3 (OCAM2_IMAGE_WIDTH_BINNING3x3*OCAM2_IMAGE_HEIGHT_BINNING3x3)
94 #define OCAM2_IMAGE_WIDTH_RAW_BINNING3x3 1056
96 #define OCAM2_IMAGE_HEIGHT_RAW_BINNING3x3 41
98 #define OCAM2_PIXELS_RAW_BINNING3x3 ((OCAM2_IMAGE_WIDTH_RAW_BINNING3x3*OCAM2_IMAGE_HEIGHT_RAW_BINNING3x3)/2)
100 #define OCAM2_NB_IDENTICAL_PIXELS_BINNING3x3 3
102 #define OCAM2_BINNING3x3_OFFSET (OCAM2_PIXELS_IMAGE_NORMAL - (OCAM2_PIXELS_IMAGE_BINNING3x3/2*OCAM2_NB_IDENTICAL_PIXELS_BINNING3x3))
105 #define OCAM2_IMAGE_WIDTH_BINNING4x4 60
107 #define OCAM2_IMAGE_HEIGHT_BINNING4x4 60
109 #define OCAM2_PIXELS_IMAGE_BINNING4x4 (OCAM2_IMAGE_WIDTH_BINNING4x4*OCAM2_IMAGE_HEIGHT_BINNING4x4)
111 #define OCAM2_IMAGE_WIDTH_RAW_BINNING4x4 1056
113 #define OCAM2_IMAGE_HEIGHT_RAW_BINNING4x4 31
115 #define OCAM2_PIXELS_RAW_BINNING4x4 ((OCAM2_IMAGE_WIDTH_RAW_BINNING4x4*OCAM2_IMAGE_HEIGHT_RAW_BINNING4x4)/2)
117 #define OCAM2_NB_IDENTICAL_PIXELS_BINNING4x4 4
119 #define OCAM2_BINNING4x4_OFFSET (OCAM2_PIXELS_IMAGE_NORMAL - (OCAM2_PIXELS_IMAGE_BINNING4x4/2*OCAM2_NB_IDENTICAL_PIXELS_BINNING4x4))
122 #define OCAM2_IMAGE_WIDTH_2_TRACK 240
124 #define OCAM2_IMAGE_HEIGHT_2_TRACK 2
126 #define OCAM2_PIXELS_IMAGE_2_TRACK (OCAM2_IMAGE_WIDTH_2_TRACK*OCAM2_IMAGE_HEIGHT_2_TRACK)
128 #define OCAM2_IMAGE_WIDTH_RAW_2_TRACK 1056
130 #define OCAM2_IMAGE_HEIGHT_RAW_2_TRACK 2
132 #define OCAM2_PIXELS_RAW_2_TRACK ((OCAM2_IMAGE_WIDTH_RAW_2_TRACK*OCAM2_IMAGE_HEIGHT_RAW_2_TRACK)/2)
134 #define OCAM2_NB_IDENTICAL_PIXELS_2_TRACK 1
136 #define OCAM2_2_TRACK_OFFSET (OCAM2_PIXELS_IMAGE_NORMAL - (OCAM2_PIXELS_IMAGE_2_TRACK/2*OCAM2_NB_IDENTICAL_PIXELS_2_TRACK))
139 #define OCAM2_IMAGE_WIDTH_4_TRACK 240
141 #define OCAM2_IMAGE_HEIGHT_4_TRACK 4
143 #define OCAM2_PIXELS_IMAGE_4_TRACK (OCAM2_IMAGE_WIDTH_4_TRACK*OCAM2_IMAGE_HEIGHT_4_TRACK)
145 #define OCAM2_IMAGE_WIDTH_RAW_4_TRACK 1056
147 #define OCAM2_IMAGE_HEIGHT_RAW_4_TRACK 3
149 #define OCAM2_PIXELS_RAW_4_TRACK ((OCAM2_IMAGE_WIDTH_RAW_4_TRACK*OCAM2_IMAGE_HEIGHT_RAW_4_TRACK)/2)
151 #define OCAM2_NB_IDENTICAL_PIXELS_4_TRACK 1
153 #define OCAM2_4_TRACK_OFFSET (OCAM2_PIXELS_IMAGE_NORMAL - (OCAM2_PIXELS_IMAGE_4_TRACK/2*OCAM2_NB_IDENTICAL_PIXELS_4_TRACK))
157 #define OCAM2_IMAGE_WIDTH_BINNING1x3 240
159 #define OCAM2_IMAGE_HEIGHT_BINNING1x3 80
161 #define OCAM2_PIXELS_IMAGE_BINNING1x3 (OCAM2_IMAGE_WIDTH_BINNING1x3*OCAM2_IMAGE_HEIGHT_BINNING1x3)
163 #define OCAM2_IMAGE_WIDTH_RAW_BINNING1x3 1056
165 #define OCAM2_IMAGE_HEIGHT_RAW_BINNING1x3 41
167 #define OCAM2_PIXELS_RAW_BINNING1x3 ((OCAM2_IMAGE_WIDTH_RAW_BINNING1x3*OCAM2_IMAGE_HEIGHT_RAW_BINNING1x3)/2)
169 #define OCAM2_NB_IDENTICAL_PIXELS_BINNING1x3 1
171 #define OCAM2_BINNING1x3_OFFSET (OCAM2_PIXELS_IMAGE_NORMAL - (OCAM2_PIXELS_IMAGE_BINNING1x3/2*OCAM2_NB_IDENTICAL_PIXELS_BINNING1x3))
174 #define OCAM2_IMAGE_WIDTH_BINNING1x4 240
176 #define OCAM2_IMAGE_HEIGHT_BINNING1x4 60
178 #define OCAM2_PIXELS_IMAGE_BINNING1x4 (OCAM2_IMAGE_WIDTH_BINNING1x4*OCAM2_IMAGE_HEIGHT_BINNING1x4)
180 #define OCAM2_IMAGE_WIDTH_RAW_BINNING1x4 1056
182 #define OCAM2_IMAGE_HEIGHT_RAW_BINNING1x4 31
184 #define OCAM2_PIXELS_RAW_BINNING1x4 ((OCAM2_IMAGE_WIDTH_RAW_BINNING1x4*OCAM2_IMAGE_HEIGHT_RAW_BINNING1x4)/2)
186 #define OCAM2_NB_IDENTICAL_PIXELS_BINNING1x4 1
188 #define OCAM2_BINNING1x4_OFFSET (OCAM2_PIXELS_IMAGE_NORMAL - (OCAM2_PIXELS_IMAGE_BINNING1x4/2*OCAM2_NB_IDENTICAL_PIXELS_BINNING1x4))
192 #define OCAM2_IMAGE_WIDTH_BINNING OCAM2_IMAGE_WIDTH_BINNING2x2
194 #define OCAM2_IMAGE_HEIGHT_BINNING OCAM2_IMAGE_HEIGHT_BINNING2x2
196 #define OCAM2_PIXELS_IMAGE_BINNING OCAM2_PIXELS_IMAGE_BINNING2x2
198 #define OCAM2_IMAGE_WIDTH_RAW_BINNING OCAM2_IMAGE_WIDTH_RAW_BINNING2x2
200 #define OCAM2_IMAGE_HEIGHT_RAW_BINNING OCAM2_IMAGE_HEIGHT_RAW_BINNING2x2
202 #define OCAM2_PIXELS_RAW_BINNING OCAM2_PIXELS_RAW_BINNING2x2
204 #define OCAM2_BINNING_OFFSET OCAM2_BINNING2x2_OFFSET
206 #ifndef OCAM2_IMAGE_NB_OFFSET
208 #define OCAM2_IMAGE_NB_OFFSET 8
211 #define OCAM2_IMAGE_NB_SZ 4
286 #define OCAM2_SDK_MAX_CAMERA 10
const char * ocam2_sdkBuild()
Return sdk build.
int ocam2_id
Library camera identifier.
ocam2_rc ocam2_init(ocam2_mode mode, const char *descrbFile, ocam2_id *id)
Create a camera instance with the provided mode.
void ocam2_descramble(ocam2_id id, unsigned int *number, short *image, const short *imageRaw)
Create a camera instance with the provided mode.
ocam2_camFirmVer
Camera firmware release For firmware build date before 18/03/2015, use OCAM2_FIRM_V1 else OCAM2_FIRM_...
ocam2_rc
Enum of ocam2 library return code.
workMode
Enum of ocam2 camera work mode.
enum workMode ocam2_mode
typedef of ocam2 camera mode
const char * ocam2_sdkVersion()
Return sdk version.
ocam2_rc ocam2_exit(ocam2_id id)
Clear a camera instance.
const char * ocam2_modeStr(ocam2_mode mode)
Return a description text for camera mode.
ocam2_rc ocam2_sendFlat(ocam2_id id, const char *flatFile, int offset, ocam2_serialOut_func_t cb, void *p, ocam2_camFirmVer camVer)
Send flat image to the camera link serial port.
void(* ocam2_serialOut_func_t)(void *p, const char *buffer, int number)
Callback used to send characters to the serial port.
ocam2_mode ocam2_getMode(ocam2_id id)
Return the camera mode.
ocam2_rc ocam2_sendBias(ocam2_id id, const char *biasFile, int offset, ocam2_serialOut_func_t cb, void *p, ocam2_camFirmVer camVer)
Send bias image to the camera link serial port.