openFrameworks addon for IDS uEye+ / GenICam cameras via the **IDS peak genericSDK** (C++).
README
ofxIdsPeak
openFrameworks addon for IDS uEye+ / GenICam cameras via the IDS peak genericSDK (C++).
- openFrameworks: 0.12.1 (Linux x86_64, gcc 6 release)
- Platforms: Linux 64-bit (tested). The IDS peak SDK is Linux/Windows; this addon currently only ships Linux build rules in
addon_config.mk. - Dependencies:
ofxGui(used for the optional parameter panel)
Requirements
- openFrameworks 0.12.1 — https://openframeworks.cc/download/
- IDS peak SDK installed on the build/runtime machine (headers +
libids_peak,libids_peak_ipl) GENICAM_GENTL64_PATHpointing at the IDS peak CTI directory at runtime (the addon also tries to auto-set this on Linux when missing)
Install
Clone into your openFrameworks
addons/ directory:cd /path/to/of_v0.12.1_linux64_gcc6_release/addons
git clone https://github.com/thegreeneyl/ofxIdsPeak.gitThe folder name must be
ofxIdsPeak (matches addon_config.mk).Usage
Add
ofxIdsPeak to your project's addons.make, include ofxIdsPeak.h, and use ofxIdsPeak::Grabber.Example app:
omnivisu — clone into apps/myApps/omnivisu next to this addon.ofxIdsPeak::Grabber grabber;
void ofApp::setup() {
// Defaults: ProcessAll + RGBA (backward compatible)
grabber.setup();
}
void ofApp::update() {
grabber.update();
if (grabber.isFrameNew()) {
const ofPixels& px = grabber.getPixels(); // for OpenCV / CPU processing
// cv::Mat mat(px.getHeight(), px.getWidth(), ...);
}
}Processing modes
| Mode | Capture thread | update() | Use when |
|---|---|---|---|
ProcessAll (default) | Converts every frame | One queued frame per update() (FIFO) | Recording, metrology, deterministic CV |
LatestOnly | Drops stale SDK buffers before convert | Drains queue, keeps newest | Live view, tracking, minimum latency |
processing mode parameter (0 = ProcessAll, 1 = LatestOnly).Output formats
| Format | ofPixels type | Texture | OpenCV notes |
|---|---|---|---|
RGBA (default) | OF_IMAGE_COLOR_ALPHA | GL_RGBA | Extra channel vs BGR; fine for display |
RGB | OF_IMAGE_COLOR | GL_RGB | Less bandwidth than RGBA; good for color CV |
Mono | OF_IMAGE_GRAYSCALE | auto (e.g. GL_R8 on GL 3.3) | Fastest path for grayscale CV |
output format parameter (0 = RGBA, 1 = RGB, 2 = Mono).Changing output format at runtime reallocates buffers and reconfigures the IPL converter (no restart required).
Low-latency preset (OpenCV-oriented)
Does not change camera exposure/WB or application vsync — only grabber policies:
grabber.applyLowLatencyPreset(ofxIdsPeak::OutputFormat::Mono);
// or OutputFormat::RGB for color tracking
grabber.setup();Equivalent to:
grabber.setProcessingMode(ofxIdsPeak::ProcessingMode::LatestOnly);
grabber.setOutputFormat(ofxIdsPeak::OutputFormat::RGB);For lowest display latency, disable vsync in the app (
ofSetVerticalSync(false)).Counters
getFrameCounter()— successfully converted framesgetErrorCounter()— acquisition/conversion errorsgetDroppedFrameCounter()— SDK buffers skipped inLatestOnlymode
Build notes
addon_config.mk searches common Linux install locations for peak/peak.hpp and peak_ipl/peak_ipl.hpp, and links ids_peak / ids_peak_ipl. If your install is elsewhere, set IDS_PEAK_ROOT in the app config.make or extend the find paths in addon_config.mk.License
MIT — see LICENSE.
ofxAddons