Why bilinear demosaicing is not enough

Updated:

This is the software‑product view of Fastvideo demosaicing: a ready‑to‑use component that converts raw Bayer frames from a high speed or machine vision camera into full‑colour RGB in real time on the NVIDIA GPU. It ships as part of Fastvideo Lab and the Fastvideo SDK, so you can plug high quality debayering into a capture or streaming pipeline without writing CUDA kernels yourself.

What it does

Why not bilinear

Most demosaicing in machine vision is still bilinear interpolation or a simple gradient variant, because that is what fits a CPU budget. On flat areas it is indistinguishable from anything better. It fails exactly where the image is interesting: alternating light and dark pixels along high‑contrast edges — the zipper artefact — colour fringes on single‑pixel structures such as wires, text and grid lines, and moiré on periodic patterns like fabric or roof tiles.

None of that is cosmetic if the picture is later measured. False colour changes pixel values, and a zipper edge moves the edge. Better demosaicing has existed for years; what it lacked was a machine fast enough to run it on every frame. HQLI, DFPD and MG are those algorithms, written for CUDA from the start.

Algorithms and quality

Four demosaicing algorithms trade quality against speed, so you can pick the right point for your application. Image quality is measured on the Kodak data set; the numbers below summarise the algorithm family — full per‑GPU benchmarks are on the dedicated CUDA Debayer benchmark page.

AlgorithmWindowAvg PSNR, KodakRelative speed
HQLI5×5~ 36 dBFastest
L77×7~ 37.1 dBFast
DFPD11×11~ 39 dBMedium
MG (highest quality)23×23~ 40.5 dBQuality-first

Integration

The same demosaicing engine powers the Fast CinemaDNG Processor and the Fastvideo SDK, where debayer is one stage of a full pipeline: dark‑frame subtraction, flat‑field correction, white balance, denoising, colour correction, tone mapping, resize, sharpening and JPEG/JPEG2000 encoding.

Specifications, benchmarks and licensing for this module are on the product page: GPU Debayer at fastcompression.com.

Related pages

Contact Form

This form collects your name and email. Check out our Privacy Policy on how we protect and manage your personal data.