Tonemap for endoscopy — real-time local contrast
Updated:
Tonemap for endoscopy is the Fastvideo adaptive local tone mapping module, configured for endoscopic imaging — the same module, not a separate product. It processes the endoscope video stream on the GPU in real time — before the image reaches the monitor and before it is recorded — lifting detail out of the shadows, evening out illumination and holding local contrast, without adding halos or shifting color. It is a classic, deterministic algorithm designed by Fastvideo and runs on NVIDIA CUDA, on live video from Pentax, Olympus, Fujinon and Aohua endoscopy processors.
This page is adaptive local contrast / local tone mapping for endoscopy. Looking for narrow-band, color and surface enhancement? See Image-Enhanced Endoscopy (IEE). Need raw-sensor processing? See the GPU ISP for the OmniVision OH02B10 endoscopy sensor.
The problem it solves
Endoscopic image quality is limited by the physics of the shot: the endoscope lights the tissue from its own tip, so the area near the probe is overexposed while distant areas sit in deep shadow. Add uneven illumination and vignetting, and shadows behind the folds — and detail in the shadows and under the highlights becomes hard to read. That raises visual strain for the doctor and degrades the recorded video as well.
Before and after
The same endoscope frame — original on the left, processed by Tonemap for endoscopy on the right. Watch the deeper, shadowed folds: detail and the vascular pattern become readable, while the bright reflections stay controlled.
The behavior is the same across different scenes and anatomy, with no per-frame tuning — the algorithm lifts detail out of the shadows and keeps the bright reflections under control, without haloing or color shift. In the colonoscopy example below, the same shadow recovery opens up the recesses between the mucosal folds.
What Tonemap for endoscopy does to the image
- Reveals detail in the shadows — selectively brightens the darker, distant areas without blowing out the already bright zones near the probe, so readability is even across the whole frame.
- Keeps and sharpens local contrast — boosts the micro-contrast of the vascular pattern, mucosal relief and edges without smearing the picture.
- Flattens the illumination — compensates for the brightness falloff toward the periphery and the uneven light of the endoscope.
- Runs in real time — low latency, reduced inter-frame flicker, no halos and no color distortion.
Key properties
- Real data only. The software does not create or paint in structures that are not in the frame — only what the camera actually captured stays on screen.
- Deterministic result. Re-processing the same frame always gives an identical result, which matters for reproducibility, documentation and medical-device certification.
- Predictable behavior. It works consistently across different tissues, organs and study types with no per-scene tuning.
Where it sits in the pipeline
- Endoscopy video processor (Pentax, Olympus, Fujinon, Aohua) — the video source.
- GPU capture and ISP → a color (RGB) frame.
- Tonemap for endoscopy (GPU, real time) — shadow recovery, local contrast, illumination flattening.
- Enhanced video → the doctor’s monitor in real time.
- In parallel — recording and archiving of the video and frames.
Areas of application
Thanks to a classic, deterministic algorithm, Tonemap for endoscopy is equally effective across different kinds of endoscopy without extra tuning:
- gastroscopy, esophagoscopy, colonoscopy;
- bronchoscopy;
- laparoscopy and video endosurgery;
- cystoscopy, hysteroscopy;
- arthroscopy;
- ENT endoscopy (rhinoscopy, laryngoscopy).
How you can use it
- as part of the Fastvideo SDK image-processing pipeline (Windows, Linux, NVIDIA Jetson) — real-time enhancement on the GPU;
- as a module / library (API) to integrate the processing into your own software or video system;
- as a console utility for batch processing of recorded material;
- source code (optional) for deep integration and customisation;
- engineering support and consulting at every stage of integration.
System requirements
| Parameter | Value |
|---|---|
| Platform | Windows 10/11, Linux; NVIDIA Jetson for embedded |
| GPU (for real time) | NVIDIA GeForce RTX / NVIDIA RTX with CUDA |
| CPU | x86_64 (Intel/AMD) or ARM (Jetson) |
| Memory | from 16 GB (depends on resolution: Full HD / 4K) |
| Video source | Pentax, Olympus, Fujinon, Aohua video processors |
| Input formats | video stream or frames (RGB): JPEG, TIFF, PNG, BMP |
| Output formats | processed video stream; frames in JPEG, TIFF |
| Latency | real time, low latency on the GPU |
Important: Tonemap for endoscopy is software for improving the visualization of images received from a video processor. It does not diagnose and does not flag pathology — it raises the readability of the picture for the specialist.
Related GPU imaging
- Image-Enhanced Endoscopy (IEE) — narrow-band and multi-band color enhancement.
- GPU ISP for OmniVision OH02B10 endoscopy sensors.
- Tonemap — adaptive local tone mapping on GPU (the module itself).
- Low-latency ISP on CUDA.
- Fast DICOM processing on CUDA.
Image sources & credits
The before/after examples use endoscopic images from the HyperKvasir dataset, released under a Creative Commons Attribution 4.0 International (CC BY 4.0) license, which permits reuse — including commercial — with attribution. We processed the frames with Tonemap for endoscopy to illustrate the effect; the processing is ours, the original images remain © their authors under CC BY 4.0.
Dataset: Borgli H, Thambawita V, Smedsrud PH, et al. “HyperKvasir, a comprehensive multi-class image and video dataset for gastrointestinal endoscopy.” Scientific Data 7, 283 (2020). doi:10.1038/s41597-020-00622-y · datasets.simula.no/hyper-kvasir
Original source files used (from HyperKvasir, then processed with Tonemap for endoscopy):
00076284-62a7-4a63-bad4-b1d0fd962b81.jpg0009841a-0ebf-4c82-9a4e-1e370becdc68.jpg