level() function controls the black and white boundaries of an image. Similar to the gamma() method, mid-point levels can be adjusted with the gamma keyword argument. The black and white point arguments are expecting values between 0.0 & 1.0 which represent percentages.
Syntax :wand.image.evaluate(operator, value, channel)
Parameter Input Type Description black numbers.Real Black point, as a percentage of the system’s quantum range. Defaults to 0.. white numbers.Real White point, as a percentage of the system’s quantum range. Defaults to 1.0. gamma numbers.Real Optional gamma adjustment. Values > 1.0 lighten the image’s midtones while values < 1.0 darken them. channel basestringl The channel type.
Increasing black and white value to 0.5 and 0.7.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course