 What's up everybody welcome back to the Python image library module tutorial series We're gonna be moving on in the last video. We're looking at image ops and image operations now We're gonna check out image enhance now image enhance is kind of nice It contains a few classes that are used for simple image enhancement and they all work kind of the same way So I'm gonna wrap it all into just one video here So I don't think we actually need this functionality to convert things rather from an RGB a band to an RGB Image band, so I'm just gonna kill that If we do get a problem, I mean, hey, we could just rewrite that But I'm pretty sure the image enhance module will work just fine with an RGB a image So I mean without further ado what you do when you run the image enhance Module here is you create a class that is either a sharpness enhancer and And the all of these will take the image that you're working with as an argument. There's also a color enhancer There is a brightness enhancer a contrast enhancer and Those are all of them actually yeah brightness and Contrast so I'm actually just gonna write those here Yeah, I use Brightness contrast sharpness and Color and now every single one of these when you create them You're gonna want to store them in for one thing and an object and I'll just call mine enhancer So that'll be the let's go back to sharpness actually sharpness first and There it is There's our object that we're gonna be able to use our image enhance module Sharpness class or color class or contrast or brightness class and what this will do is will change the value in the image So we set it up with actually a factor the enhancer Object or the object that we created to store the module class has a one function It's called enhance and all it does is it takes one factor and this factor is typically either values from 0.0 to 1.0 I think for some of them it goes to 2.0 and we'll experiment and find out as we move along here, so Let's go ahead and run with it. What this does is it returns the image So we're gonna actually set image to equal enhancer and dot enhance So um, I'm gonna check it out here the I'm looking at the documentation off in the side here. So yeah 0.0 for sharpness is gonna return a blurred image. So let's run this and If I fire up the image here Hey, I don't know if you can really see it all that well, but it is slightly blurred If we use 1.0, it will return the original image. Now you might be able to see the difference Actually leave this open And 2.0 is going to return a even sharpened image Which you totally can't see Let's change it with color because maybe it will be we'll have a little bit more a little bit more Visual change there. So this takes in a range from 0.0 and 1.0 1.0 is gonna actually give the original image and 0.0 is gonna turn it black and white. So if we run this Now if I check out there we go. Hey, oh an apple wants to update. That's cool And of course you can choose any values in between this 0.5 And you've got a somewhat like Less colored image do the same thing with brightness Brightness goes from 0.0 to 1.0 I'm pretty sure sharpness is the only one that goes to 2.0 In fact, it is All right, so brightness It's gonna bring it down to well Empty image a black image. So because we've got the alpha channel. It's all transparent and 1.0 gives it the original image. Let's go to 0.5. See if that looks should run the code and There and we'll look at finally the contrast Now contrast adjusts contrast 0.0 is gonna give it a solid gray image and 1.0 is of course the original image like we've seen in all the other examples and anything that we do use in between is Of course the in between so Okay, so anyway, that's the image enhance module I don't see too much of a use for it But I want you guys to know that it exists and these are the four things you can kind of manipulate and play with By an enhancer object the simple enhance function and then a factor value It's typically a float from 0.0 To 1.0, but if using sharpness you can go all the way up to 2.0, so Okay, uh Think I'm done here. That's all I wanted to show you guys again super simple Probably you aren't gonna have a whole lot of use for it, but know that it exists. Thanks guys. I'll see you in the next tutorial