中文版

GPU Debayer

Updated:

Fastvideo GPU Debayer converts a raw Bayer image from a camera or DSLR into a full-color RGB image on the NVIDIA GPU with four high-quality demosaicing algorithms — HQLI, L7, DFPD, and MG. The highest-quality MG algorithm reaches about 40.5 dB average PSNR on the Kodak data set, and on an NVIDIA GeForce RTX 4090 the algorithms run at up to 69 GPix/s (65 MPix, 16-bit) — far faster than any CPU implementation. It doubles as a testing tool: it measures the processing time of each method and computes PSNR/MSE against reference images, so demosaicing quality and speed can be compared before building a heavier image processing service. To embed the same algorithms into your own pipeline, the functionality is also available as the CUDA Debayer Library.

Detailed benchmark data. Measured results are published on our benchmark pages: Debayer benchmarks, all benchmarks.

Need the developer component or the algorithm background? Integrate the CUDA Debayer Library into your own pipeline, or see how the demosaicing algorithms (HQLI, L7, DFPD, MG) work. This page is the ready GPU debayer software.

Fastvideo SDK GPU debayer for NVIDIA GPUs

Trusted by imaging teams

Infinite Realities MRTech XIMEA
“Fastvideo SDK is lightning fast… we can now process a 28,800 image sequence set in under 10 minutes, instead of 10 hours.”
— Infinite Realities

Bayer pattern RGGBWhat's unique in GPU Debayer software

GPU Debayer Software Features

Which demosaicing algorithms does GPU Debayer support?

Demosaicing algorithms compared: window size, image quality (average PSNR and SSIM on the Kodak set) and peak speed on the NVIDIA GeForce RTX 4090.
Demosaicing algorithm Window Avg PSNR (Kodak) SSIM Peak speed on RTX 4090*
HQLI 5×5 ~36 dB ~0.965 up to 69 GPix/s
L7 7×7 ~37.1 dB ~0.971 up to 62 GPix/s
DFPD 11×11 ~39 dB ~0.978 up to 48 GPix/s
MG (highest quality) 23×23 ~40.5 dB up to 20 GPix/s

* GPU computations only, 65 MPix 16-bit image, no batch, no streaming.

What else is interesting in Fastvideo GPU Debayer

Fastvideo GPU Debayer is a CUDA library of high-quality demosaicing algorithms — HQLI, L7, DFPD, and MG — that convert 8/16-bit Bayer data to RGB on NVIDIA GPUs. The higher-quality MG algorithm reaches about 40.5 dB average PSNR on the Kodak data set, and all four run fast enough for real-time camera pipelines as well as quality-critical offline processing.

GPU Debayer FAQ

What is the difference between debayer and demosaicing?

They are two names for the same operation — converting raw Bayer/CFA sensor data into a full RGB image. “Debayer” is the applied, camera-side term; “demosaicing” (or demosaicking) is the academic one. See the demosaicing algorithms page for the theory behind GPU Debayer.

Which demosaicing algorithm gives the best image quality?

MG (Multiple Gradients, 23×23 window) is the highest-quality algorithm, at about 40.5 dB average PSNR on the Kodak data set. HQLI, L7, and DFPD trade some quality for higher speed, so the right choice depends on whether the pipeline is quality-critical or throughput-critical.

How fast is GPU debayering?

On an NVIDIA GeForce RTX 4090, peak throughput ranges from up to 69 GPix/s for HQLI down to 20 GPix/s for the highest-quality MG (65 MPix 16-bit image, GPU computation only) — far faster than any CPU debayer.

Which Bayer patterns and bit depths are supported?

All four Bayer patterns are supported (RGGB, BGGR, GBRG, GRBG). Input is an 8/16-bit raw Bayer image from a camera, DSLR, or PGM file; output is a 24/48-bit RGB image.

Does GPU Debayer run on NVIDIA Jetson?

Yes. It runs on the NVIDIA Jetson line — Nano, Xavier NX/AGX, and Orin NX/AGX — under Linux4Tegra, as well as on desktop NVIDIA GPUs under Windows and Linux.

What is the difference between GPU Debayer and the CUDA Debayer Library?

GPU Debayer is a ready-to-run demo and testing tool: it times each method and computes PSNR/MSE against reference images. The CUDA Debayer Library embeds the same algorithms into your own GPU pipeline.

How is demosaicing quality measured?

Quality is reported as average PSNR (and SSIM) against reference images on the standard Kodak data set. The application computes MSE and PSNR directly, so you can verify quality on your own images. These are not the best possible metrics, but they look approprite.

Can I test it on my own images and hardware?

Yes. The command-line demo for Windows 10/11 and Linux Ubuntu / L4T reads 8/16-bit Bayer images in PGM format from disk, so no camera is required, and it reports timing and quality for every algorithm on your own GPU.

GPU Debayer Roadmap

GPU Debayer is a mature, production module of the Fastvideo SDK, under active development. Recent work delivered the high-quality MG algorithm (about 40.5 dB average PSNR on Kodak), its integration into FastVCR, and optimizations for the Ampere and Ada GPU architectures.

Current development focuses on:

Fyodor Serzhenko, Fastvideo

About the author

Fyodor Serzhenko, PhD, is the founder and CEO of Fastvideo. He earned his PhD at the Moscow Institute of Physics and Technology (MIPT) in 1993. Since 2009 he has led the development of Fastvideo’s GPU-accelerated image codecs and ISP modules, including the Fastvideo SDK. Connect on LinkedIn.

Why you can trust these results

Fastvideo has built GPU-accelerated image processing software since 2009. Our codecs comply with the standards they implement — JPEG (ITU-T T.81 / ISO IEC 10918) and JPEG2000 (ITU-T T.800 / ISO IEC 15444) — and our tools are open source on GitHub. Every performance figure we publish is reproducible: see our benchmark methodology, download the Fastvideo SDK benchmark report (PDF), and measure it on your own GPU.

Contact Form

This form collects your name and email. See our Privacy Policy for how we handle your personal data.