Hello friends! Welcome to the last post on Image Editing Software. In this post, you will be learning how to apply color filters to an image. We will be doing this using the OpenCV library package. You can also check out the video below. So let's get started. We will start by importing Opencv and Numpy to our code. import cv2 import numpy as np And now we will start writing the callback methods for applying filters. Let us start with the yellowButton_callback() method. def yellowButton_callback (): opencvImage = cv2.cvtColor(np.array(originalImage) , cv2.COLOR_RGB2BGR) opencvImage[: , : , 0 ] = 20 global outputImage outputImage = Image.fromarray(cv2.cvtColor(opencvImage , cv2.COLOR_BGR2RGB)) dispayImage(outputImage) Alright. Let us understand the above code line by line. To apply a color filter I have to manipulate the image array. So I need the image in an array form. np.array(originalImage) converts the image that we read using the PI...
In this blog, you will get to learn a lot about computer vision. The blog posts are written in such a way that even a newbie can understand. This blog tries to clear the most fundamental concepts of image processing and computer vision.