C++ Sample Program Collection
This section contains sample programs and implementation examples for controlling the INFINICAM GbE-2 (Ethernet model) from a Visual Studio (C++) environment.
Basics and Environment Setup
Section titled “Basics and Environment Setup”Basic programs covering the build settings for your development environment (Visual Studio) and camera initialization/information retrieval.
HelloWorldDetect and open a GbE-2 on the network, and retrieve its serial number and version information.
SingleImageCapture and decode one frame of compressed data, then save it as a PGM image file.
SingleImage (Color)Capture compressed data from a GbE-2 color model, apply Bayer conversion/decoding, and save it as a PPM image.
Changing Capture Settings + SingleImageChange capture parameters such as resolution, frame rate, and shutter speed, then capture and save one frame.
External Device SynchronizationExplains how to configure capture synchronized to an external pulse signal (SYNC IN), and how to handle errors.
Advanced / High-Speed Processing Samples
Section titled “Advanced / High-Speed Processing Samples”Examples of high-speed decoding and real-time streaming that take advantage of INFINICAM’s hallmark “fixed-length compression.”
OpenCV LiveViewDecode captured image data in real time and stream it to an OpenCV window.
Continuous High-Speed CaptureUse a callback function, a ring buffer, and multi-threaded decoding to continuously acquire high-speed images without dropping frames.
SingleImage + ROI DecodeDecode only a specified Region of Interest (ROI) at extremely high speed, without expanding the entire image.
SingleImage + DC Component ExtractionExtract only the DC component of the compressed data to instantly generate a lightweight 1/8-size preview image.
Sample List by Feature
Section titled “Sample List by Feature”| Sample Name | Target Feature / Key API | Difficulty | Key Learning Points |
|---|---|---|---|
| HelloWorld | PUC_DetectDevice2 / PUC_OpenDevice2 |
Beginner | Detecting and opening a GbE-2, and retrieving device information |
| SingleImage | PUC_GetSingleXferData / PUC_DecodeData |
Beginner | Capturing one frame, standard decoding, and PGM output |
| SingleImage (Color) | PUC_SetWhiteBalanceGain / PUC_DecodeData |
Beginner | Bayer-conversion decoding of color data and PPM saving |
| Changing Capture Settings + SingleImage | PUC_SetResolution / PUC_SetFramerateShutter |
Beginner | Changing image size, frame rate, and shutter speed, then capturing |
| External Device Synchronization | PUC_SetSyncInMode / PUC_GetSingleXferData |
Intermediate | Capturing in sync with an external signal (SYNC IN) and timeout control |
| OpenCV LiveView | PUC_BeginXferData / cv::imshow |
Intermediate | Real-time image display via callbacks |
| Continuous High-Speed Capture | PUC_BeginXferData / PUC_DecodeDataMultiThread |
Advanced | Callback reception, ring buffer expansion, and multi-threaded decoding |
| ROI Decode | PUC_DecodeData (with coordinates specified) |
Intermediate | Limited decoding of a specific region (in 8x8 block units) |
| DC Component Extraction | PUC_DecodeDCData |
Intermediate | Extremely fast generation of a 1/8-scale preview image |
