Image lighting, colors and contrast can be also enhanced. It can be done with 3 types of enhancements: light, color and white_balance.
Copy {
"enhancements": ["light", "color", "white_balance", "exposure_correction"]
}
Those types of enhancements can be parametrized further.
Copy "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.
hdr_light_andvanced hdr_light contrast
Copy {
"url": "https://deep-image.ai/api-example3.jpg",
"enhancements": ["light"],
"light_parameters": {
"type": "hdr_light_advanced",
"level": 1
}
}
Copy {
"url": "https://deep-image.ai/api-example3.jpg",
"enhancements": ["light"],
"light_parameters": {
"type": "hdr_light",
"level": 1
}
}
Copy {
"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
Copy {
"url": "https://deep-image.ai/api-example3.jpg",
"enhancements": ["color"],
"color_parameters": {
"type": "hdr_light_advanced",
"level": 1
}
}
Copy {
"url": "https://deep-image.ai/api-example3.jpg",
"enhancements": ["color"],
"color_parameters": {
"type": "hdr_light",
"level": 1
}
}
Copy {
"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
Copy {
"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
}
}
Copy {
"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
}
}
Copy {
"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 correction
White balance can be also automatically fixed if it went wrong with camera's settings.
Copy {
"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.
Copy "enhancements": ["exposure_correction"]
Last updated 8 months ago