End-to-End RAW Image Processing Pipeline with Research-Grade ISP Components
The Advanced Camera ISP Pipeline is a complete RAW image processing system that converts Bayer sensor RAW data into visually enhanced final RGB images.
This project recreates the major stages used inside real smartphone and DSLR camera pipelines.
The system processes .dng / RAW images through multiple ISP stages including:
- RAW linearization
- Dead Pixel Correction
- Lens Shading Correction
- Advanced Demosaicing
- White Balance
- Color Correction Matrix (CCM)
- Exposure Correction
- Gamma Rendering
- Adaptive Final Rendering
Goal: Design and implement a complete software-based camera ISP pipeline from scratch using image science and research methods.
RAW images were captured using the Open Camera application:
π https://play.google.com/store/apps/details?id=net.sourceforge.opencamera
Features used:
- RAW (DNG) capture enabled
- Manual exposure control
- Auto white balance disabled (for ISP evaluation)
Device: Samsung Galaxy S24 Ultra
DSLR RAW images were sourced from the MIT-Adobe FiveK Dataset:
π https://data.csail.mit.edu/graphics/fivek/
- Reads Bayer RAW
.dng - Per-channel black level subtraction
- White level normalization
- CFA pattern detection
Supported Bayer patterns:
- RGGB
- BGGR
- GBRG
- GRBG
Smart CFA-aware hot/dead pixel removal using same-color neighborhood analysis.
Features:
- Hot pixel correction
- Dead pixel correction
- Highlight protection
- Adaptive thresholds
Corrects corner vignetting and sensor brightness falloff.
Features:
- Radial gain compensation
- Adaptive corner brightening
Implemented multiple demosaicing algorithms:
- Bilinear
- OpenCV Edge Aware
- Malvar-He-Cutler (MHC)
- Hamilton-Adams
- Menon
- ARI
- CNN-based Demosaic
Multiple white balance algorithms:
- Camera Metadata WB
- Gray World
- Shades of Gray
- Grey Edge
- White Patch
- Gamut Mapping
- Bayesian WB
Transforms sensor RGB into display color space.
Includes:
- Adaptive CCM
- Warm CCM
- Cool CCM
- Neutral CCM
Scene brightness correction:
- Global Gain
- Mean Target
- Percentile Exposure
- Highlight Safe Exposure
- Adaptive Exposure
- Shadow Lift
Implemented rendering curves:
- Gamma 2.2
- Gamma 2.4
- sRGB Gamma
- BT.709
- Adaptive Gamma
- Filmic Curve
Final aesthetic stage:
- Scene-aware brightness
- Vibrance
- Saturation
- Contrast
- Black Point
- Warmth control
- Orientation correction
- DSLR pipeline tuned for natural tones and controlled contrast
- Smartphone pipeline optimized for vibrant colors and dynamic scenes
- Custom rendering outperforms default RAW processing in highlight handling
- Better highlight preservation in bright skies
- Full custom RAW pipeline from scratch
- Modular ISP architecture
- Multiple research algorithms per stage
- Real camera imaging science implementation
Project/
β
βββ Core/
β βββ methods/
β βββ calibration/
β βββ data/
β βββ docs/
β βββ models/
β βββ notebooks/
β
βββ run_phone_pipeline.ipynb
βββ run_dslr_pipeline.ipynb
β
βββ README.md
βββ .gitignorepip install -r requirements.txtjupyter notebookOpen:
run_phone_pipeline.ipynb
run_dslr_pipeline.ipynb- AI Auto White Balance
- AI Demosaicing
- Noise Reduction
- Sharpening Engine
- HDR Merge
- Portrait Skin Tuning
- Real-time Mobile ISP
Keshav B.Tech CSE Bennett University
If you like this project, give it a star β on GitHub.


