Enhance lighting and colors

Image lighting, colors and contrast can be also enhanced. It can be done with 3 types of enhancements: light, color and white_balance.

{
    "enhancements": ["light", "color", "white_balance", "exposure_correction"]
}

Those types of enhancements can be parametrized further.

    "light_parameters": {
        "type": "contrast", // "hdr_light" | "hdr_light_advanced"
        "level": 0.8
    },

    "color_parameters": {
        "type": "contrast", // "hdr_light" | "hdr_light_advanced",
        "level": 0.8
    },

    "white_balance_parameters": {
        "level": 0.8
    }

Types of light and colors algorithms

Let's check the various combinations of light algorithms enhancements.

Our input image:

The results of 3 light enhancement types.

{
    "url": "https://deep-image.ai/api-example3.jpg",
    "enhancements": ["light"],
    "light_parameters": {
        "type": "hdr_light_advanced",
        "level": 1
    }
}

The input image which is little bit desaturated.

The results of color enhancements

{
    "url": "https://deep-image.ai/api-example3.jpg",
    "enhancements": ["color"],
    "color_parameters": {
        "type": "hdr_light_advanced",
        "level": 1
    }
}

Combining all together.

{
    "url": "https://deep-image.ai/api-example3.jpg",
    "enhancements": ["light","color"],
    "light_parameters": {
        "type": "hdr_light_advanced",
        "level": 1
    },
    "color_parameters": {
        "type": "hdr_light_advanced",
        "level": 1
    }
}

White balance correction

White balance can be also automatically fixed if it went wrong with camera's settings.

{
    "enhancements": ["white_balance"]
}

Exposure correction

Exposure can be corrected with "exposure_correction" enhancement type. This algorithm works different than previous "light" enhancement. It corrects image globally with amending its with gamma correction.

    "enhancements": ["exposure_correction"]

Last updated