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
}
Let's check the various combinations of light algorithms enhancements.
Our input image:

The results of 3 light enhancement types.
hdr_light_andvanced
hdr_light
contrast
{
"url": "https://deep-image.ai/api-example3.jpg",
"enhancements": ["light"],
"light_parameters": {
"type": "hdr_light_advanced",
"level": 1
}
}

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

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

The input image which is little bit desaturated.

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

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

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

Combining all together.
hdr_light_andvanced
hdr_light
contrast
{
"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
}
}

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

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

White balance can be also automatically fixed if it went wrong with camera's settings.
-1.jpg?alt=media&token=ead6da5d-027e-44a5-9bb2-370b369c1aa1)
{
"enhancements": ["white_balance"]
}
-1-.jpg?alt=media&token=1a720d6a-9a7c-4feb-9bf0-81f362d489cf)
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 modified 13d ago