Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

gpu-camera-sample

> DevOps
Open source

Image processing software on GPU (Windows, Linux, ARM) for real time machine vision camera applications. Performance benchmarks and Glass-to-Glass time measurem

371 stars0 likes1 views
WebsiteGitHub

About

Image processing software on GPU (Windows, Linux, ARM) for real time machine vision camera applications. Performance benchmarks and Glass-to-Glass time measurem

gpu-camera-sample

Camera sample application with realtime GPU image processing performance (Windows, Linux, Jetson)

That software is based on the following image processing pipeline for camera applications that includes:

  • Raw image capture (monochrome or bayer 8-bit, 12-bit packed/unpacked, 16-bit)
  • Import to GPU
  • Raw data conversion and unpacking
  • Linearization curve
  • Bad Pixel Correction
  • Dark frame subtraction
  • Flat-Field Correction
  • White Balance
  • Exposure Correction (brightness control)
  • Debayer with HQLI (5×5 window), L7 (7×7 window), DFPD (11×11), MG (23×23) algorithms
  • Color correction with 3×3 matrix
  • Bilaterea or NLM denoiser
  • Crop / Resize / Flip / Flop / Rotate
  • Gamma (linear, sRGB)
  • JPEG / MJPEG encoding/decoding
  • H.264 and HEVC encoding/decoding
  • Output to monitor via OpenGL
  • Export from GPU to CPU memory
  • MJPEG and H.264/H.265 streaming
  • Storage of compressed images/video to SSD

Processing is done on NVIDIA GPU to speedup the performance. The software could also work with raw bayer images in PGM format and you can utilize these images for testing or if you don't have a camera, or if your camera is not supported. More info about that project you can find here.

From the benchmarks on NVIDIA Quadro RTX 6000 or GeForce RTX 4090 we can see that GPU-based raw image processing is very fast and it could offer high image quality at the same time. The total performance could reach 4 GPix/s for color cameras. The performance strongly depends on complexity of the pipeline. Multiple GPU solutions could significantly improve the performance.

Currently the software is working with XIMEA cameras via XIMEA SDK. FLIR cameras are supported via Spinnaker SDK. We can work with Imperx cameras via Imperx SDK. LUCID Vision Labs cameras are supported via Arena SDK.

Via GenICam the software can work with XIMEA, MATRIX VISION, Basler, FLIR, Imperx, JAI, LUCID Vision Labs, Daheng Imaging cameras.

The software is also working with Leopard Imaging mipi csi cameras on Jetson. You need to have a proper driver to be able to acquire raw frames from mipi camera for further image processing on the GPU with 16/32-bit precision. The software doesn't use NVIDIA ISP via libargus.

Soon we are going to add support for Baumer, Kaya Instruments, IDS Imaging Development Systems cameras. Cameras from Emergent Vision Technologies, IO Industries and Hikrobot are already supported (see the roadmap below). You can add support for desired cameras by yourself. The software is working with demo version of Fastvideo SDK, that is why you can see a watermark on the screen. To get a Fastvideo SDK license for development and for deployment, please contact Fastvideo company.

Performance at a glance

All figures below are on a single NVIDIA GeForce RTX 4090 unless noted. They match the numbers published on Fastvideo's product and benchmark pages (linked in the last column).

Task Performance Source
Full color-camera ISP (this application) up to 4 GPix/s this repository
FastVCR, 65 MPix camera (9344×7000) 70 fps (8-bit) / 60 fps (10-bit) FastVCR for XIMEA
Debayer, MG algorithm (62 MPix, 16-bit) up to 20 GPix/s, ~40.5 dB PSNR (Kodak) GPU Debayer
Debayer, HQLI algorithm (fastest) up to 69 GPix/s GPU Debayer
Motion JPEG encoding (Full HD) up to 5500 fps Motion JPEG on CUDA
Bilateral denoiser (8.9 MPix, 16-bit RGB) 0.13 ms (61 GPix/s) GPU Denoiser
RawZipper RAW Bayer codec (12-bit, 12 MPix) lossy compression ratio ~10 at up to ~1 GPix/s RawZipper RAW codec
Adaptive local tone mapping (65 MPix, 16-bit) 6.3 ms (10 GPix/s) ALTMapper
Fast CinemaDNG RAW-to-RGB (12 MPix DNG, on RTX 2080ti) 3000 frames/min = 50 fps Fast CinemaDNG Processor
Glass-to-glass latency (XIMEA USB3, 3 MPix, 120 fps, 144 Hz monitor) ~35–40 ms FastVCR

The whole pipeline runs in 16/32-bit precision on the NVIDIA GPU. The software does not use the NVIDIA Jetson hardware ISP (libargus), so every stage of the ISP is tunable and quality-critical steps — demosaicing, denoising, and tone mapping — use high-quality algorithms rather than fixed-function approximations.

How to build gpu-camera-sample

Requirements for Windows

  • Camera SDK or GenICam package + camera vendor GenTL producer (.cti). Сurrently XIMEA, MATRIX VISION, Basler, FLIR, Imperx, JAI, LUCID Vision Labs, Daheng Imaging cameras are supported
  • Fastvideo SDK (demo) ver.0.22.0.0
  • NVIDIA CUDA-12.6
  • Qt ver.5.13.1
  • Compiler MSVC 2022 or later

Requirements for Linux

  • Ubuntu 22.04 for x64 platform, Ubuntu 20.04 for Arm64 platform with CUDA 11.4 / CUDA 12.2, Ubuntu 18.04 for Arm64 platform with CUDA 10.2
  • Camera SDK or GenICam package + camera vendor GenTL producer (.cti). Currently XIMEA, MATRIX VISION, Basler, FLIR, Imperx, JAI, Daheng Imaging cameras are supported
  • Fastvideo SDK (demo) ver.0.22.0.0
  • NVIDIA CUDA-12.6 for x64, CUDA-11.4/12.6 (Jetson AGX Xavier, Orin) or CUDA-10.2 (Jetson TX2, NX) for ARM64 platform
  • Compiler gcc 7.4 or later
  • Qt 5 (qtbase5-dev)
bash
sudo apt-get install qtbase5-dev qtbase5-dev-tools qtcreator git
  • FFmpeg libraries
bash
sudo apt-get install  libavutil-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavresample-dev libx264-dev

Jetson users have to build FFmpeg libraries from sources. See this shell script for details.

  • Libjpeg and zlib libraries
bash
sudo apt-get install libjpeg-dev zlib1g-dev

Build instructions

  • Obtain source code:
bash
git clone https://github.com/fastvideo/gpu-camera-sample.git 

For Windows users

  • Create OtherLibs folder in the project root folder. This folder will contains external libraries, used in gpu-camera-sample application.
  • Download Fastvideo SDK from Fastvideo SDK (demo) for Windows-10, 64-bit, unpack it into /OtherLibs/FastvideoSDK folder. If the trial period is expired, please send an inquiry to Fastvideo to obtain the latest version.
  • If you need direct XIMEA camera support, download XiAPI from https://www.ximea.com/support/wiki/apis/XIMEA_Windows_Software_Package. Install downloaded package (by default into C:\XIMEA). Copy API folder from XIAPI installation folder into /OtherLibs folder.
  • To work with FLIR cameras
    • Download Spinnaker SDK from https://www.flir.com/support-center/iis/machine-vision/downloads/spinnaker-sdk-and-firmware-download/.
    • Install downloaded package.
    • Copy bin64, include and lib64 folders from c:/Program Files/FLIR System/Spinnaker to /OtherLibs/FLIR
  • To work with Imperx cameras, download Imperx SDK (IpxCameraSdk) from https://www.imperx.com/downloads/. Unpack and copy archive content to /OtherLibs/Imperx folder.
  • To work with LUCID Vision Labs cameras, download Arena SDK from https://thinklucid.com/downloads-hub/. Install it and copy "C:\Program Files\Lucid Vision Labs\Arena SDK" folder into /OtherLibs.
  • If you need GenICam support
    • Download GenICamTM Package Version 2019.11 from https://www.emva.org/wp-content/uploads/GenICam_Package_2019.11.zip
    • If you are going to use Imperx cameras, download GenICamTM Package Version 3.0.2 from https://www.emva.org/wp-content/uploads/GenICam_Package_v3_0_2.zip
    • Unpack it to a temporary folder and cd to Reference Implementation folder.
    • Create /OtherLibs/GenICam folder.
    • Unpack GenICam_V3_2_0-Win64_x64_VC141-Release-SDK.zip into /OtherLibs/GenICam folder.
    • Unpack GenICam_V3_2_0-Win64_x64_VC141-Release-Runtime.zip into /OtherLibs/GenICam/library/CPP

You also can download precompiled libs.

  • By default the application will be built with no camera support. The only option is camera simulator which is working with PGM files.
  • Open /src/GPUCameraSample.pro in Qt Creator.
  • Open common_defs.pri
  • To enable GenICam support, uncomment DEFINES += SUPPORT_GENICAM
  • To enable XIMEA camera support, uncomment DEFINES += SUPPORT_XIMEA
  • To enable Lucid Vision Labs camera support, uncomment DEFINES += SUPPORT_LUCID
  • To enable FLIR camera support, uncomment DEFINES += SUPPORT_FLIR
  • To enable Imperx camera support, uncomment DEFINES += SUPPORT_IMPERX.
  • Build the project
  • Binaries will be placed into /GPUCameraSample_x64 folder.

For Linux users

Here and after we assume you put source code into home directory, so project root is ~/gpu-camera-sample

  • Make sure file /Scripts/make_links.sh is executable
bash
chmod 755 ~/gpu-camera-sample/Scripts/make_links.sh
  • Create OtherLibsLinux folder in the project root folder. This folder will contain external libraries, used in gpu-camera-sample application.
  • Download Fastvideo SDK x64 platform for Windows-10/11, Linux Ubuntu 22.04, or Arm64 for NVIDIA Jetson Nano, TX2, Xavier, Orin and unpack it into /OtherLibsLinux/FastvideoSDK folder. Copy all files from /OtherLibsLinux/FastvideoSDK/fastvideo_sdk/lib to /OtherLibsLinux/FastvideoSDK/fastvideo_sdk/lib/Linux64 for x64 platform and to /OtherLibsLinux/FastvideoSDK/fastvideo_sdk/lib/Arm64 for Arm64 platform.
  • Create links to Fastvideo SDK *.so files
bash
cd ~/gpu-camera-sample/Scripts
./make_links.sh ~/gpu-camera-sample/OtherLibsLinux/FastvideoSDK/fastvideo_sdk/lib/Linux64
  • If you need direct XIMEA camera support, download XiAPI from https://www.ximea.com/support/wiki/apis/XIMEA_Linux_Software_Package. Unpack and install downloaded package.
  • If you need GenICam support
    • Download GenICamTM Package Version 2019.11 (https://www.emva.org/wp-content/uploads/GenICam_Package_2019.11.zip).
    • Unpack it to a temporary folder and cd to Reference Implementation folder.
    • Create /OtherLibsLinux/GenICam folder.
    • Unpack GenICam_V3_2_0-Linux64_x64_gcc48-Runtime.tgz or GenICam_V3_2_0-Linux64_ARM_gcc49-Runtime.tgz into /OtherLibsLinux/GenICam folder.
    • Unpack GenICam_V3_2_0-Linux64_x64_gcc48-SDK.tgz or GenICam_V3_2_0-Linux64_ARM_gcc49-SDK.tgz into /OtherLibsLinux/GenICam/library/CPP
    • Create \OtherLibsLinux\GenICam\library\CPP\include\GenTL folder and copy there
      • GenICam_Package_2019.11.zip\GenICam_Package_2019.11\GenTL\GenTL_v1_6.zip\GenTL.h
      • GenICam_Package_2019.11.zip\GenICam_Package_2019.11\SFNC\PFNC.h
    • Ensure Qt uses gcc, not clang to build project.
  • If you need LUCID Vision Labs cameras support.
    • Download Arena SDK for Linux from https://thinklucid.com/downloads-hub/ and unpack it into OtherLibsLinux/Arena SDK/ArenaSDK_Linux_x64/ for x64 platform and OtherLibsLinux/Arena SDK/ArenaSDK_Linux_ARM64 for arm64 platform.
    • Run
bash
        sudo /.Arena_SDK_Linux_x64.conf

for x64 platform and

bash
        sudo /.Arena_SDK_ARM64.conf

for arm64 platform cd to precompiledExamples and run

bash
        ./IpConfigUtility /list

if everything is OK you will see something like that

bash
    Scanning for devices...
    index MAC             IP              SUBNET          GATEWAY                 IP CONFIG
    0     1C0FAF5A908A    169.254.139.144 255.255.0.0     0.0.0.0                 DHCP= 1 Persistent Ip= 0 LLA = 1

run

bash
        ./Cpp_Acquisition

to test that camera is working.

  • If you need built-in MIPI cameras support on Jetson TX2 or Leopard Imaging IMX477 MIPI SCI camera support on Jetson AGX Xavier, read this guide how to setup

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++baslercamera-softwarecudacuda-jpeg-codec

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理