Giter Site home page Giter Site logo

18879023681 / imagesignalprocessing_c Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lesialin/imagesignalprocessing_c

0.0 0.0 0.0 9.05 MB

ISP image signal processor implementation in C function

License: MIT License

C++ 99.91% CMake 0.09%

imagesignalprocessing_c's Introduction

ISP Image Signal Processor in C

This repo is an implementation of ISP in c function, basically it is re-implemented from openISP in python. It's currently in very first version, I list some TODO list to make pipeline more robust.

And if you find something wrong in my implementation, welcome to let me know.

Function list

  • Dead Pixel Correction

  • Black Level Compensation

  • Len Shading Correction

    (need calibration parameters)

  • Anti-aliasing Noise Filter

  • AWB gain Control

  • CFA interpolation

    only implement rggb bayer pattern

  • Color Correction

  • Gamma Correction

    piecewise LUT

  • Color Space Conversion

  • Noise Filter for chroma

    • False Color Suppression
  • Hue Saturation Control

  • Noise Filter for Luma

    • Non local mean denoise
    • Bilateral Filter
  • Edge Enhancement

  • Contrast Brightness Control

Usage

build exe file,

mkdir build/
cd build 
cmake ..
cmake --build .

then isp_pipeline.exe will in prebuilt/ folder

test isp pipeline

isp_pipeline.exe test.raw

Configuration

The configuration can be a adjusted as input raw image.

In the config file , parameters are floats which are converted to fixed point type in C function to make operation in integer type.

config.json

{
    "width": 1920,
    "height": 1080,
    "image_bits": 10,
    "blc": {
        "bl_r": 0,
        "bl_gr": 0,
        "bl_gb": 0,
        "bl_b": 0,
        "alpha": 0.0,
        "beta": 0.0
    },
    "dpc": {
        "dead_thres": 30,
        "mode": "gradient"
    },
    "bayer_pattern": "rggb",
    "cfa_mode": "malvar",
    "awb_gain": {
        "r_gain": 1.5,
        "gr_gain": 1.0,
        "gb_gain": 1.0,
        "b_gain": 1.1
    },
    "ccm": [
        [
            1.0,
            0.0,
            0.0,
            0.0
        ],
        [
            0.0,
            1.0,
            0.0,
            0.0
        ],
        [
            0.0,
            0.0,
            1.0,
            0.0
        ]
    ],
    "gamma": 0.8,
    "csc": [
        [0.2568,0.5041,0.0979,16],
        [-0.1482,-0.291,0.4392,128],
        [0.4392,-0.3678,-0.0714,128]
    ],
    "nlm":{
        "Ds":4,
        "ds":1,
        "h":5
    },
    "bnf":{
        "dw":[
            [8,12,32,12,8],
            [12,64,128,64,12],
            [32,128,1024,128,32],
            [12,64,128,64,12],
            [8,12,32,12,8]
        ],
        "rw":[0,8,16,32],
        "rthres":[128,32,8]
    },
    "edge_filter":[
        [-1,0,-1,0,-1],
        [-1,0,8,0,-1],
        [-1,0,-1,0,-1]
    ],
    "eeh":{
        "gain_min":32,
        "gain_max":128,
        "thres_min":4,
        "thres_max":16,
        "em_clip_min":-64,
        "em_clip_max":64
    },
    "fcs":{
        "edge_min":32,
        "edge_max":64
    },
    "hsc":{
        "hue_offset":0,
        "saturation_gain":1.3 
    },
    "bcc":{
        "brightness":0,
        "contrast":1.1
    }


}

TODO

  • board condition (I didn't handle any board condition in any function)

  • lens shading correction (if I have parameters)

  • CFA ( with more bayer pattern)

  • color space conversion (with more yuv format)

  • Non local mean denoise (optimization in exponential operation)

  • bilateral filter (with non-fixed kernel and optimize in fixed point operation)

  • False color suppression (the current result is kind of weird, need to find the reference algorithm)s

  • Hue Saturation Control (the current result is kind of weird, need to find the reference algorithm)

imagesignalprocessing_c's People

Contributors

lesialin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.