forked from ItBitCo/JavaFlyCam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FlyCapture2Defs_C.h
1626 lines (1425 loc) · 48.3 KB
/
FlyCapture2Defs_C.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//=============================================================================
// Copyright © 2017 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved.
//
// This software is the confidential and proprietary information of FLIR
// Integrated Imaging Solutions, Inc. ("Confidential Information"). You
// shall not disclose such Confidential Information and shall use it only in
// accordance with the terms of the license agreement you entered into
// with FLIR Integrated Imaging Solutions, Inc. (FLIR).
//
// FLIR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
// SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE, OR NON-INFRINGEMENT. FLIR SHALL NOT BE LIABLE FOR ANY DAMAGES
// SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
// THIS SOFTWARE OR ITS DERIVATIVES.
//=============================================================================
//=============================================================================
// $Id: FlyCapture2Defs_C.h,v 1.74 2010-12-13 23:58:00 mgara Exp $
//=============================================================================
#ifndef PGR_FC2_FLYCAPTURE2DEFS_C_H
#define PGR_FC2_FLYCAPTURE2DEFS_C_H
#include <stdlib.h>
//=============================================================================
// Definitions header file for FlyCapture2 C API.
//
// Holds enumerations, typedefs and structures that are used across the
// FlyCapture2 C API wrapper.
//
// Please see FlyCapture2Defs.h or the API documentation for full details
// of the various enumerations and structures.
//=============================================================================
#ifdef __cplusplus
extern "C"
{
#endif
/**
* @defgroup CTypeDefs TypeDefs
*/
/*@{*/
typedef int BOOL;
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FULL_32BIT_VALUE
#define FULL_32BIT_VALUE 0x7FFFFFFF
#endif
#define MAX_STRING_LENGTH 512
/**
* A context to the FlyCapture2 C library. It must be created before
* performing any calls to the library.
*/
typedef void* fc2Context;
/**
* A context to the FlyCapture2 C GUI library. It must be created before
* performing any calls to the library.
*/
typedef void* fc2GuiContext;
/**
* An internal pointer used in the fc2Image structure.
*/
typedef void* fc2ImageImpl;
/**
* A context referring to the AVI recorder object.
*/
typedef void* fc2AVIContext;
/**
* A context referring to the ImageStatistics object.
*/
typedef void* fc2ImageStatisticsContext;
/**
* A context referring to the TopologyNode object.
*/
typedef void* fc2TopologyNodeContext;
/**
* A GUID to the camera. It is used to uniquely identify a camera.
*/
typedef struct _fc2PGRGuid
{
unsigned int value[4];
} fc2PGRGuid;
/*@}*/
/**
* @defgroup CEnumerations Enumerations
*/
/*@{*/
/** The error types returned by functions. */
typedef enum _fc2Error
{
FC2_ERROR_UNDEFINED = -1, /**< Undefined */
FC2_ERROR_OK, /**< Function returned with no errors. */
FC2_ERROR_FAILED, /**< General failure. */
FC2_ERROR_NOT_IMPLEMENTED, /**< Function has not been implemented. */
FC2_ERROR_FAILED_BUS_MASTER_CONNECTION, /**< Could not connect to Bus Master. */
FC2_ERROR_NOT_CONNECTED, /**< Camera has not been connected. */
FC2_ERROR_INIT_FAILED, /**< Initialization failed. */
FC2_ERROR_NOT_INTITIALIZED, /**< Camera has not been initialized. */
FC2_ERROR_INVALID_PARAMETER, /**< Invalid parameter passed to function. */
FC2_ERROR_INVALID_SETTINGS, /**< Setting set to camera is invalid. */
FC2_ERROR_INVALID_BUS_MANAGER, /**< Invalid Bus Manager object. */
FC2_ERROR_MEMORY_ALLOCATION_FAILED, /**< Could not allocate memory. */
FC2_ERROR_LOW_LEVEL_FAILURE, /**< Low level error. */
FC2_ERROR_NOT_FOUND, /**< Device not found. */
FC2_ERROR_FAILED_GUID, /**< GUID failure. */
FC2_ERROR_INVALID_PACKET_SIZE, /**< Packet size set to camera is invalid. */
FC2_ERROR_INVALID_MODE, /**< Invalid mode has been passed to function. */
FC2_ERROR_NOT_IN_FORMAT7, /**< Error due to not being in Format7. */
FC2_ERROR_NOT_SUPPORTED, /**< This feature is unsupported. */
FC2_ERROR_TIMEOUT, /**< Timeout error. */
FC2_ERROR_BUS_MASTER_FAILED, /**< Bus Master Failure. */
FC2_ERROR_INVALID_GENERATION, /**< Generation Count Mismatch. */
FC2_ERROR_LUT_FAILED, /**< Look Up Table failure. */
FC2_ERROR_IIDC_FAILED, /**< IIDC failure. */
FC2_ERROR_STROBE_FAILED, /**< Strobe failure. */
FC2_ERROR_TRIGGER_FAILED, /**< Trigger failure. */
FC2_ERROR_PROPERTY_FAILED, /**< Property failure. */
FC2_ERROR_PROPERTY_NOT_PRESENT, /**< Property is not present. */
FC2_ERROR_REGISTER_FAILED, /**< Register access failed. */
FC2_ERROR_READ_REGISTER_FAILED, /**< Register read failed. */
FC2_ERROR_WRITE_REGISTER_FAILED, /**< Register write failed. */
FC2_ERROR_ISOCH_FAILED, /**< Isochronous failure. */
FC2_ERROR_ISOCH_ALREADY_STARTED, /**< Isochronous transfer has already been started. */
FC2_ERROR_ISOCH_NOT_STARTED, /**< Isochronous transfer has not been started. */
FC2_ERROR_ISOCH_START_FAILED, /**< Isochronous start failed. */
FC2_ERROR_ISOCH_RETRIEVE_BUFFER_FAILED, /**< Isochronous retrieve buffer failed. */
FC2_ERROR_ISOCH_STOP_FAILED, /**< Isochronous stop failed. */
FC2_ERROR_ISOCH_SYNC_FAILED, /**< Isochronous image synchronization failed. */
FC2_ERROR_ISOCH_BANDWIDTH_EXCEEDED, /**< Isochronous bandwidth exceeded. */
FC2_ERROR_IMAGE_CONVERSION_FAILED, /**< Image conversion failed. */
FC2_ERROR_IMAGE_LIBRARY_FAILURE, /**< Image library failure. */
FC2_ERROR_BUFFER_TOO_SMALL, /**< Buffer is too small. */
FC2_ERROR_IMAGE_CONSISTENCY_ERROR, /**< There is an image consistency error. */
FC2_ERROR_INCOMPATIBLE_DRIVER, /**< The installed driver is not compatible with the library. */
FC2_ERROR_FORCE_32BITS = FULL_32BIT_VALUE
} fc2Error;
/** The type of bus callback to register a callback function for. */
typedef enum _fc2BusCallbackType
{
FC2_BUS_RESET, /**< Register for all bus events. */
FC2_ARRIVAL, /**< Register for arrivals only. */
FC2_REMOVAL, /**< Register for removals only. */
FC2_CALLBACK_TYPE_FORCE_32BITS = FULL_32BIT_VALUE
} fc2BusCallbackType;
/**
* The grab strategy employed during image transfer. This type controls
* how images that stream off the camera accumulate in a user buffer
* for handling.
*/
/*
@remark Unlike earlier versions of the FlyCapture SDK, it is no longer
* necessary to explicitly start the image grabbing process before
* specifying an image grabbing mode.
*/
typedef enum _fc2GrabMode
{
/**
* Grabs the newest image in the user buffer each time the
* RetrieveBuffer() function is called. Older images are dropped
* instead of accumulating in the user buffer. Grabbing blocks if the
* camera has not finished transmitting the next available image. If
* the camera is transmitting images faster than the application can
* grab them, images may be dropped and only the most recent image
* is stored for grabbing. Note that this mode is the equivalent of
* flycaptureLockLatest in earlier versions of the FlyCapture SDK.
*/
FC2_DROP_FRAMES,
/**
* Images accumulate in the user buffer, and the oldest image is
* grabbed for handling before being discarded. This member can be
* used to guarantee that each image is seen. However, image processing
* time must not exceed transmission time from the camera to the
* buffer. Grabbing blocks if the camera has not finished transmitting
* the next available image. The buffer size is controlled by the
* numBuffers parameter in the FC2Config struct. Note that this mode is
* the equivalent of flycaptureLockNext in earlier versions of the
* FlyCapture SDK.
*/
FC2_BUFFER_FRAMES,
/**
* Unspecified grab mode.
*/
FC2_UNSPECIFIED_GRAB_MODE,
FC2_GRAB_MODE_FORCE_32BITS = FULL_32BIT_VALUE
} fc2GrabMode;
/** Timeout options for grabbing images. */
typedef enum _fc2GrabTimeout
{
FC2_TIMEOUT_NONE = 0, /**< Non-blocking wait. */
FC2_TIMEOUT_INFINITE = -1, /**< Wait indefinitely. */
FC2_TIMEOUT_UNSPECIFIED = -2, /**< Unspecified timeout setting. */
FC2_GRAB_TIMEOUT_FORCE_32BITS = FULL_32BIT_VALUE
} fc2GrabTimeout;
/** Bandwidth allocation options for 1394 devices. */
typedef enum _fc2BandwidthAllocation
{
/** Do not allocate bandwidth. */
FC2_BANDWIDTH_ALLOCATION_OFF = 0,
/** Allocate bandwidth. This is the default setting. */
FC2_BANDWIDTH_ALLOCATION_ON = 1,
/**
* Bandwidth allocation is not supported by either the camera or
* operating system.
*/
FC2_BANDWIDTH_ALLOCATION_UNSUPPORTED = 2,
/** Not specified. This leaves the current setting unchanged. */
FC2_BANDWIDTH_ALLOCATION_UNSPECIFIED = 3,
FC2_BANDWIDTH_ALLOCATION_FORCE_32BITS = FULL_32BIT_VALUE
}fc2BandwidthAllocation;
/** Interfaces that a camera may use to communicate with a host. */
typedef enum _fc2InterfaceType
{
FC2_INTERFACE_IEEE1394, /**< IEEE-1394 (Includes 1394a and 1394b). */
FC2_INTERFACE_USB_2, /**< USB 2.0. */
FC2_INTERFACE_USB_3, /**< USB 3.0. */
FC2_INTERFACE_GIGE, /**< GigE. */
FC2_INTERFACE_UNKNOWN, /**< Unknown interface. */
FC2_INTERFACE_TYPE_FORCE_32BITS = FULL_32BIT_VALUE
} fc2InterfaceType;
/**
* Camera properties. Not all properties may be supported, depending
* on the camera model.
*/
typedef enum _fc2PropertyType
{
FC2_BRIGHTNESS,
FC2_AUTO_EXPOSURE,
FC2_SHARPNESS,
FC2_WHITE_BALANCE,
FC2_HUE,
FC2_SATURATION,
FC2_GAMMA,
FC2_IRIS,
FC2_FOCUS,
FC2_ZOOM,
FC2_PAN,
FC2_TILT,
FC2_SHUTTER,
FC2_GAIN,
FC2_TRIGGER_MODE,
FC2_TRIGGER_DELAY,
FC2_FRAME_RATE,
FC2_TEMPERATURE,
FC2_UNSPECIFIED_PROPERTY_TYPE,
FC2_PROPERTY_TYPE_FORCE_32BITS = FULL_32BIT_VALUE
} fc2PropertyType;
/** Frame rates in frames per second. */
typedef enum _fc2FrameRate
{
FC2_FRAMERATE_1_875, /**< 1.875 fps. */
FC2_FRAMERATE_3_75, /**< 3.75 fps. */
FC2_FRAMERATE_7_5, /**< 7.5 fps. */
FC2_FRAMERATE_15, /**< 15 fps. */
FC2_FRAMERATE_30, /**< 30 fps. */
FC2_FRAMERATE_60, /**< 60 fps. */
FC2_FRAMERATE_120, /**< 120 fps. */
FC2_FRAMERATE_240, /**< 240 fps. */
FC2_FRAMERATE_FORMAT7, /**< Custom frame rate for Format7 functionality. */
FC2_NUM_FRAMERATES, /**< Number of possible camera frame rates. */
FC2_FRAMERATE_FORCE_32BITS = FULL_32BIT_VALUE
} fc2FrameRate;
/** DCAM video modes. */
typedef enum _fc2VideoMode
{
FC2_VIDEOMODE_160x120YUV444, /**< 160x120 YUV444. */
FC2_VIDEOMODE_320x240YUV422, /**< 320x240 YUV422. */
FC2_VIDEOMODE_640x480YUV411, /**< 640x480 YUV411. */
FC2_VIDEOMODE_640x480YUV422, /**< 640x480 YUV422. */
FC2_VIDEOMODE_640x480RGB, /**< 640x480 24-bit RGB. */
FC2_VIDEOMODE_640x480Y8, /**< 640x480 8-bit. */
FC2_VIDEOMODE_640x480Y16, /**< 640x480 16-bit. */
FC2_VIDEOMODE_800x600YUV422, /**< 800x600 YUV422. */
FC2_VIDEOMODE_800x600RGB, /**< 800x600 RGB. */
FC2_VIDEOMODE_800x600Y8, /**< 800x600 8-bit. */
FC2_VIDEOMODE_800x600Y16, /**< 800x600 16-bit. */
FC2_VIDEOMODE_1024x768YUV422, /**< 1024x768 YUV422. */
FC2_VIDEOMODE_1024x768RGB, /**< 1024x768 RGB. */
FC2_VIDEOMODE_1024x768Y8, /**< 1024x768 8-bit. */
FC2_VIDEOMODE_1024x768Y16, /**< 1024x768 16-bit. */
FC2_VIDEOMODE_1280x960YUV422, /**< 1280x960 YUV422. */
FC2_VIDEOMODE_1280x960RGB, /**< 1280x960 RGB. */
FC2_VIDEOMODE_1280x960Y8, /**< 1280x960 8-bit. */
FC2_VIDEOMODE_1280x960Y16, /**< 1280x960 16-bit. */
FC2_VIDEOMODE_1600x1200YUV422, /**< 1600x1200 YUV422. */
FC2_VIDEOMODE_1600x1200RGB, /**< 1600x1200 RGB. */
FC2_VIDEOMODE_1600x1200Y8, /**< 1600x1200 8-bit. */
FC2_VIDEOMODE_1600x1200Y16, /**< 1600x1200 16-bit. */
FC2_VIDEOMODE_FORMAT7, /**< Custom video mode for Format7 functionality. */
FC2_NUM_VIDEOMODES, /**< Number of possible video modes. */
FC2_VIDEOMODE_FORCE_32BITS = FULL_32BIT_VALUE
} fc2VideoMode;
/** Camera modes for DCAM formats as well as Format7. */
typedef enum _fc2Mode
{
FC2_MODE_0 = 0,
FC2_MODE_1,
FC2_MODE_2,
FC2_MODE_3,
FC2_MODE_4,
FC2_MODE_5,
FC2_MODE_6,
FC2_MODE_7,
FC2_MODE_8,
FC2_MODE_9,
FC2_MODE_10,
FC2_MODE_11,
FC2_MODE_12,
FC2_MODE_13,
FC2_MODE_14,
FC2_MODE_15,
FC2_MODE_16,
FC2_MODE_17,
FC2_MODE_18,
FC2_MODE_19,
FC2_MODE_20,
FC2_MODE_21,
FC2_MODE_22,
FC2_MODE_23,
FC2_MODE_24,
FC2_MODE_25,
FC2_MODE_26,
FC2_MODE_27,
FC2_MODE_28,
FC2_MODE_29,
FC2_MODE_30,
FC2_MODE_31,
FC2_NUM_MODES, /**< Number of modes */
FC2_MODE_FORCE_32BITS = FULL_32BIT_VALUE
} fc2Mode;
/** Pixel formats available for Format7 modes. */
typedef enum _fc2PixelFormat
{
FC2_PIXEL_FORMAT_MONO8 = 0x80000000, /**< 8 bits of mono information. */
FC2_PIXEL_FORMAT_411YUV8 = 0x40000000, /**< YUV 4:1:1. */
FC2_PIXEL_FORMAT_422YUV8 = 0x20000000, /**< YUV 4:2:2. */
FC2_PIXEL_FORMAT_444YUV8 = 0x10000000, /**< YUV 4:4:4. */
FC2_PIXEL_FORMAT_RGB8 = 0x08000000, /**< R = G = B = 8 bits. */
FC2_PIXEL_FORMAT_MONO16 = 0x04000000, /**< 16 bits of mono information. */
FC2_PIXEL_FORMAT_RGB16 = 0x02000000, /**< R = G = B = 16 bits. */
FC2_PIXEL_FORMAT_S_MONO16 = 0x01000000, /**< 16 bits of signed mono information. */
FC2_PIXEL_FORMAT_S_RGB16 = 0x00800000, /**< R = G = B = 16 bits signed. */
FC2_PIXEL_FORMAT_RAW8 = 0x00400000, /**< 8 bit raw data output of sensor. */
FC2_PIXEL_FORMAT_RAW16 = 0x00200000, /**< 16 bit raw data output of sensor. */
FC2_PIXEL_FORMAT_MONO12 = 0x00100000, /**< 12 bits of mono information. */
FC2_PIXEL_FORMAT_RAW12 = 0x00080000, /**< 12 bit raw data output of sensor. */
FC2_PIXEL_FORMAT_BGR = 0x80000008, /**< 24 bit BGR. */
FC2_PIXEL_FORMAT_BGRU = 0x40000008, /**< 32 bit BGRU. */
FC2_PIXEL_FORMAT_RGB = FC2_PIXEL_FORMAT_RGB8, /**< 24 bit RGB. */
FC2_PIXEL_FORMAT_RGBU = 0x40000002, /**< 32 bit RGBU. */
FC2_PIXEL_FORMAT_BGR16 = 0x02000001, /**< R = G = B = 16 bits. */
FC2_PIXEL_FORMAT_BGRU16 = 0x02000002, /**< 64 bit BGRU. */
FC2_PIXEL_FORMAT_422YUV8_JPEG = 0x40000001, /**< JPEG compressed stream. */
FC2_NUM_PIXEL_FORMATS = 20, /**< Number of pixel formats. */
FC2_UNSPECIFIED_PIXEL_FORMAT = 0 /**< Unspecified pixel format. */
} fc2PixelFormat;
/** Bus speeds. */
typedef enum _fc2BusSpeed
{
FC2_BUSSPEED_S100, /**< 100Mbits/sec. */
FC2_BUSSPEED_S200, /**< 200Mbits/sec. */
FC2_BUSSPEED_S400, /**< 400Mbits/sec. */
FC2_BUSSPEED_S480, /**< 480Mbits/sec. Only for USB2 cameras. */
FC2_BUSSPEED_S800, /**< 800Mbits/sec. */
FC2_BUSSPEED_S1600, /**< 1600Mbits/sec. */
FC2_BUSSPEED_S3200, /**< 3200Mbits/sec. */
FC2_BUSSPEED_S5000, /**< 5000Mbits/sec. Only for USB3 cameras. */
FC2_BUSSPEED_10BASE_T, /**< 10Base-T. Only for GigE cameras. */
FC2_BUSSPEED_100BASE_T, /**< 100Base-T. Only for GigE cameras.*/
FC2_BUSSPEED_1000BASE_T, /**< 1000Base-T (Gigabit Ethernet). Only for GigE cameras. */
FC2_BUSSPEED_10000BASE_T, /**< 10000Base-T. Only for GigE cameras. */
FC2_BUSSPEED_S_FASTEST, /**< The fastest speed available. */
FC2_BUSSPEED_ANY, /**< Any speed that is available. */
FC2_BUSSPEED_SPEED_UNKNOWN = -1, /**< Unknown bus speed. */
FC2_BUSSPEED_FORCE_32BITS = FULL_32BIT_VALUE
} fc2BusSpeed;
typedef enum _fc2PCIeBusSpeed
{
FC2_PCIE_BUSSPEED_2_5, /** 2.5 Gb/s */
FC2_PCIE_BUSSPEED_5_0, /** 5.0 Gb/s */
FC2_PCIE_BUSSPEED_UNKNOWN = -1, /** Speed is unknown */
FC2_PCIE_BUSSPEED_FORCE_32BITS = FULL_32BIT_VALUE
} fc2PCIeBusSpeed;
/** Types of low level drivers that FlyCapture uses. */
typedef enum _fc2DriverType
{
FC2_DRIVER_1394_CAM, /**< PGRCam.sys. */
FC2_DRIVER_1394_PRO, /**< PGR1394.sys. */
FC2_DRIVER_1394_JUJU, /**< firewire_core. */
FC2_DRIVER_1394_VIDEO1394, /**< video1394. */
FC2_DRIVER_1394_RAW1394, /**< raw1394. */
FC2_DRIVER_USB_NONE, /**< No usb driver used just BSD stack. (Linux only) */
FC2_DRIVER_USB_CAM, /**< PGRUsbCam.sys. */
FC2_DRIVER_USB3_PRO, /**< PGRXHCI.sys. */
FC2_DRIVER_GIGE_NONE, /**< no GigE drivers used, MS/BSD stack. */
FC2_DRIVER_GIGE_FILTER, /**< PGRGigE.sys. */
FC2_DRIVER_GIGE_PRO, /**< PGRGigEPro.sys. */
FC2_DRIVER_GIGE_LWF, /**< PgrLwf.sys. */
FC2_DRIVER_UNKNOWN = -1, /**< Unknown driver type. */
FC2_DRIVER_FORCE_32BITS = FULL_32BIT_VALUE
} fc2DriverType;
/**
* Color processing algorithms. Please refer to our knowledge base at
* article at http://www.ptgrey.com/support/kb/index.asp?a=4&q=33 for
* complete details for each algorithm.
*/
typedef enum _fc2ColorProcessingAlgorithm
{
/** Default method. */
FC2_DEFAULT,
/** No color processing. */
FC2_NO_COLOR_PROCESSING,
/**
* Fastest but lowest quality. Equivalent to
* FLYCAPTURE_NEAREST_NEIGHBOR_FAST in FlyCapture.
*/
FC2_NEAREST_NEIGHBOR_FAST,
/** Weights surrounding pixels based on localized edge orientation. */
FC2_EDGE_SENSING,
/** Well-balanced speed and quality. */
FC2_HQ_LINEAR,
/** Slowest but produces good results. */
FC2_RIGOROUS,
/** Multithreaded with similar results to edge sensing. */
FC2_IPP,
/** Best quality but much faster than rigorous. */
FC2_DIRECTIONAL,
/** Weighted pixel average from different directions*/
FC2_WEIGHTED_DIRECTIONAL,
FC2_COLOR_PROCESSING_ALGORITHM_FORCE_32BITS = FULL_32BIT_VALUE
} fc2ColorProcessingAlgorithm;
/** Bayer tile formats. */
typedef enum _fc2BayerTileFormat
{
FC2_BT_NONE, /**< No bayer tile format. */
FC2_BT_RGGB, /**< Red-Green-Green-Blue. */
FC2_BT_GRBG, /**< Green-Red-Blue-Green. */
FC2_BT_GBRG, /**< Green-Blue-Red-Green. */
FC2_BT_BGGR, /**< Blue-Green-Green-Red. */
FC2_BT_FORCE_32BITS = FULL_32BIT_VALUE
} fc2BayerTileFormat;
/** File formats to be used for saving images to disk. */
typedef enum _fc2ImageFileFormat
{
FC2_FROM_FILE_EXT = -1, /**< Determine file format from file extension. */
FC2_PGM, /**< Portable gray map. */
FC2_PPM, /**< Portable pixmap. */
FC2_BMP, /**< Bitmap. */
FC2_JPEG, /**< JPEG. */
FC2_JPEG2000, /**< JPEG 2000. */
FC2_TIFF, /**< Tagged image file format. */
FC2_PNG, /**< Portable network graphics. */
FC2_RAW, /**< Raw data. */
FC2_IMAGE_FILE_FORMAT_FORCE_32BITS = FULL_32BIT_VALUE
} fc2ImageFileFormat;
/*@}*/
/**
* @defgroup CGigEEnums GigE specific enumerations
*
* These enumerations are specific to GigE camera operation only.
*/
/*@{*/
/** Possible properties that can be queried from the camera. */
typedef enum _fc2GigEPropertyType
{
FC2_HEARTBEAT,
FC2_HEARTBEAT_TIMEOUT,
PACKET_SIZE,
PACKET_DELAY
} fc2GigEPropertyType;
/*@}*/
/**
* Channels that allow statistics to be calculated.
*/
typedef enum _fc2StatisticsChannel
{
FC2_STATISTICS_GREY,
FC2_STATISTICS_RED,
FC2_STATISTICS_GREEN,
FC2_STATISTICS_BLUE,
FC2_STATISTICS_HUE,
FC2_STATISTICS_SATURATION,
FC2_STATISTICS_LIGHTNESS,
FC2_STATISTICS_FORCE_32BITS = FULL_32BIT_VALUE
} fc2StatisticsChannel;
/** Possible operating systems. */
typedef enum _fc2OSType
{
FC2_WINDOWS_X86, /**< All Windows 32-bit variants. */
FC2_WINDOWS_X64, /**< All Windows 64-bit variants. */
FC2_LINUX_X86, /**< All Linux 32-bit variants. */
FC2_LINUX_X64, /**< All Linux 32-bit variants. */
FC2_MAC, /**< Mac OSX. */
FC2_UNKNOWN_OS, /**< Unknown operating system. */
FC2_OSTYPE_FORCE_32BITS = FULL_32BIT_VALUE
} fc2OSType;
/** Possible byte orders. */
typedef enum _fc2ByteOrder
{
FC2_BYTE_ORDER_LITTLE_ENDIAN,
FC2_BYTE_ORDER_BIG_ENDIAN,
FC2_BYTE_ORDER_FORCE_32BITS = FULL_32BIT_VALUE
} fc2ByteOrder;
/**
* Possible states of a port on a node.
*/
typedef enum _fc2PortType
{
NOT_CONNECTED = 1,
CONNECTED_TO_PARENT,
CONNECTED_TO_CHILD
} fc2PortType;
/**
* Type of node.
*/
typedef enum _fc2NodeType
{
COMPUTER,
BUS,
CAMERA,
NODE
} fc2NodeType;
/**
* @defgroup CStructures Structures
*/
/*@{*/
//
// Description:
// An image. It is comparable to the Image class in the C++ library.
// The fields in this structure should be considered read only.
//
typedef struct _fc2Image
{
unsigned int rows;
unsigned int cols;
unsigned int stride;
unsigned char* pData;
unsigned int dataSize;
unsigned int receivedDataSize;
fc2PixelFormat format;
fc2BayerTileFormat bayerFormat;
fc2ImageImpl imageImpl;
} fc2Image;
/** Description of the system. */
typedef struct _fc2SystemInfo
{
/** Operating system type as described by OSType. */
fc2OSType osType;
/** Detailed description of the operating system. */
char osDescription[ MAX_STRING_LENGTH];
/** Byte order of the system. */
fc2ByteOrder byteOrder;
/** Amount of memory available on the system. */
size_t sysMemSize;
/** Detailed description of the CPU. */
char cpuDescription[ MAX_STRING_LENGTH];
/** Number of cores on all CPUs on the system. */
size_t numCpuCores;
/** List of drivers used. */
char driverList[ MAX_STRING_LENGTH];
/** List of libraries used. */
char libraryList[ MAX_STRING_LENGTH];
/** Detailed description of the GPU. */
char gpuDescription[ MAX_STRING_LENGTH];
/** Screen resolution width in pixels. */
size_t screenWidth;
/** Screen resolution height in pixels. */
size_t screenHeight;
/** Reserved for future use. */
unsigned int reserved[16];
} fc2SystemInfo;
/** The current version of the library. */
typedef struct _fc2Version
{
unsigned int major; /**< Major version number. */
unsigned int minor; /**< Minor version number. */
unsigned int type; /**< Type version number. */
unsigned int build; /**< Build version number. */
} fc2Version;
/**
* @defgroup CGigEStructures GigE specific structures
*
* These structures are specific to GigE camera operation only.
*/
/*@{*/
/** IPv4 address. */
typedef struct _fc2IPAddress
{
unsigned char octets[4];
} fc2IPAddress;
/** MAC address. */
typedef struct _fc2MACAddress
{
unsigned char octets[6];
} fc2MACAddress;
/** A GigE property. */
typedef struct _fc2GigEProperty
{
/** The type of property. */
fc2GigEPropertyType propType;
/**
* Whether the property is readable. If this is false, then
* no other value in this structure is valid.
*/
BOOL isReadable;
/** Whether the property is writable. */
BOOL isWritable;
/** Minimum value. */
unsigned int min;
/** Maximum value. */
unsigned int max;
/** Current value. */
unsigned int value;
unsigned int reserved[8];
} fc2GigEProperty;
/** Information about a single GigE stream channel. */
typedef struct _fc2GigEStreamChannel
{
/** Network interface index used (or to use). */
unsigned int networkInterfaceIndex;
/** Host port on the PC where the camera will send the data stream. */
unsigned int hostPort;
/** Disable IP fragmentation of packets. */
BOOL doNotFragment;
/** Packet size, in bytes. */
unsigned int packetSize;
/** Inter packet delay, in timestamp counter units. */
unsigned int interPacketDelay;
/** Destination IP address. It can be a multicast or unicast address. */
fc2IPAddress destinationIpAddress;
/** Source UDP port of the stream channel. Read only. */
unsigned int sourcePort;
unsigned int reserved[8];
} fc2GigEStreamChannel;
/**
* Configuration for a GigE camera. These options are options that are
* generally should be set before starting isochronous transfer.
*/
typedef struct _fc2GigEConfig
{
/** Turn on/off packet resend functionality */
BOOL enablePacketResend;
/**
* Number of retries to perform when a register read/write timeout
* is received by the library. The default value is 0.
*/
unsigned int registerTimeoutRetries;
/**
* Register read/write timeout value, in microseconds.
* The default value is dependent on the interface type.
*/
unsigned int registerTimeout;
unsigned int reserved[8];
} fc2GigEConfig;
/** Format 7 information for a single mode. */
typedef struct _fc2GigEImageSettingsInfo
{
/** Maximum image width. */
unsigned int maxWidth;
/** Maximum image height. */
unsigned int maxHeight;
/** Horizontal step size for the offset. */
unsigned int offsetHStepSize;
/** Vertical step size for the offset. */
unsigned int offsetVStepSize;
/** Horizontal step size for the image. */
unsigned int imageHStepSize;
/** Vertical step size for the image. */
unsigned int imageVStepSize;
/** Supported pixel formats in a bit field. */
unsigned int pixelFormatBitField;
/** Vendor unique pixel formats in a bit field. */
unsigned int vendorPixelFormatBitField;
/** Reserved for future use. */
unsigned int reserved[16];
} fc2GigEImageSettingsInfo;
/** Image settings for a GigE camera. */
typedef struct _fc2GigEImageSettings
{
/** Horizontal image offset. */
unsigned int offsetX;
/** Vertical image offset. */
unsigned int offsetY;
/** Width of image. */
unsigned int width;
/** Height of image. */
unsigned int height;
/** Pixel format of image. */
fc2PixelFormat pixelFormat;
/** Reserved for future use. */
unsigned int reserved[8];
} fc2GigEImageSettings;
/*@}*/
/**
* @defgroup CIIDCStructures IIDC specific structures
*
* These structures are specific to IIDC camera operation only.
*/
/*@{*/
/** Format 7 image settings. */
typedef struct _fc2Format7ImageSettings
{
/** Format 7 mode. */
fc2Mode mode;
/** Horizontal image offset. */
unsigned int offsetX;
/** Vertical image offset. */
unsigned int offsetY;
/** Width of image. */
unsigned int width;
/** Height of image. */
unsigned int height;
/** Pixel format of image. */
fc2PixelFormat pixelFormat;
/** Reserved for future use. */
unsigned int reserved[8];
} fc2Format7ImageSettings;
/** Format 7 information for a single mode. */
typedef struct _fc2Format7Info
{
/** Format 7 mode. */
fc2Mode mode;
/** Maximum image width. */
unsigned int maxWidth;
/** Maximum image height. */
unsigned int maxHeight;
/** Horizontal step size for the offset. */
unsigned int offsetHStepSize;
/** Vertical step size for the offset. */
unsigned int offsetVStepSize;
/** Horizontal step size for the image. */
unsigned int imageHStepSize;
/** Vertical step size for the image. */
unsigned int imageVStepSize;
/** Supported pixel formats in a bit field. */
unsigned int pixelFormatBitField;
/** Vendor unique pixel formats in a bit field. */
unsigned int vendorPixelFormatBitField;
/** Current packet size in bytes. */
unsigned int packetSize;
/** Minimum packet size in bytes for current mode. */
unsigned int minPacketSize;
/** Maximum packet size in bytes for current mode. */
unsigned int maxPacketSize;
/** Current packet size as a percentage of maximum packet size. */
float percentage;
/** Reserved for future use. */
unsigned int reserved[16];
} fc2Format7Info;
/** Format 7 packet information. */
typedef struct _fc2Format7PacketInfo
{
/** Recommended bytes per packet. */
unsigned int recommendedBytesPerPacket;
/** Maximum bytes per packet. */
unsigned int maxBytesPerPacket;
/** Minimum bytes per packet. */
unsigned int unitBytesPerPacket;
/** Reserved for future use. */
unsigned int reserved[8];
} fc2Format7PacketInfo;
/*@}*/
/**
* Configuration for a camera. These options are options that are
* generally should be set before starting isochronous transfer.
*/
typedef struct _fc2Config
{
/** Number of buffers used by the FlyCapture2 library to grab images. */
unsigned int numBuffers;
/**
* Number of notifications per image. This value should only be set
* after the image settings to be used is set to the camera.
* The default number of notifications is 1.
*
* There are 4 general scenarios:
* - 1 notification - End of image
* - 2 notifications - After first packet and end of image
* - 3 notifications - After first packet, middle of image, end of image
* - x notifications - After first packet, (x -2) spread evenly, end of image
*
* Specifying zero for the number of notifications will be ignored (the current value
* will not be modified).
*
* Note that the event numbers start at 0. Ex. when 3 notifications are
* used, the three events will be 0, 1 and 2.
*/
unsigned int numImageNotifications;
/**
* Minimum number of notifications needed for the current image
* settings on the camera. Read-only value.
*/
unsigned int minNumImageNotifications;
/**
* Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent()
* will wait for an image before timing out and returning.
*/
int grabTimeout;
/** Grab mode for the camera. The default is DROP_FRAMES. */
fc2GrabMode grabMode;
/** This parameter enables RetrieveBuffer to run in high
* performance mode. This means that any interaction
* with the camera, other than grabbing the image is disabled.
* Currently Retrieve buffer reads registers on the camera to
* determine which embedded image information settings have been
* enabled, and it reads what the bayer tile is currently set to.
* When High Performance mode is on, these reads are disabled. This
* means that any changes to the Bayer Tile or to the Embedded image
* info after StartCapture() will not be tracked when made using
* direct register writes. If the corresponding SetEmbededImageInfo()
* and GetEmbededImageInfo() calls are used then the changes will be
* appropriately reflected. This also means that changes to embedded
* image info from other processes will not be updated either. */
BOOL highPerformanceRetrieveBuffer;
/** Isochronous bus speed. */
fc2BusSpeed isochBusSpeed;
/** Asynchronous bus speed. */
fc2BusSpeed asyncBusSpeed;
/**
* Bandwidth allocation flag that tells the camera the bandwidth
* allocation strategy to employ.
*/
fc2BandwidthAllocation bandwidthAllocation;
/**
* Number of retries to perform when a register read/write timeout
* is received by the library. The default value is 0.
*/
unsigned int registerTimeoutRetries;
/**
* Register read/write timeout value, in microseconds.
* The default value is dependent on the interface type.
*/
unsigned int registerTimeout;
/** Reserved for future use */
unsigned int reserved[16];
} fc2Config;
/**
* Information about a specific camera property. This structure is also
* also used as the TriggerDelayInfo structure.
*/
typedef struct _fc2PropertyInfo
{
/** Property info type. */
fc2PropertyType type;
/** Flag indicating if the property is present. */
BOOL present;
/** Flag indicating if auto is supported. */
BOOL autoSupported;
/** Flag indicating if manual is supported. */
BOOL manualSupported;
/** Flag indicating if on/off is supported. */
BOOL onOffSupported;
/** Flag indicating if one push is supported. */
BOOL onePushSupported;
/** Flag indicating if absolute mode is supported. */
BOOL absValSupported;
/** Flag indicating if property value can be read out. */
BOOL readOutSupported;
/** Minimum value (as an integer). */
unsigned int min;
/** Maximum value (as an integer). */
unsigned int max;
/** Minimum value (as a floating point value). */
float absMin;
/** Maximum value (as a floating point value). */
float absMax;
/** Textual description of units. */
char pUnits[MAX_STRING_LENGTH];
/** Abbreviated textual description of units. */
char pUnitAbbr[MAX_STRING_LENGTH];
/** Reserved for future use. */
unsigned int reserved[8];
} fc2PropertyInfo, fc2TriggerDelayInfo;