From the course: Hands-On AI: Image Processing with Python

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Solution: Convolution filters

Solution: Convolution filters

(bright music) - [Instructor] How did you do? Let me show you my solution. For task 1, I used a nice picture of two Komodo dragons, my second favorite animal species. Look at line 9. Since I decided to play around with edge detection filters, I converted the image to gray scale in this step. Let's see those guys. And there they are, two fellas sharing a nice hug. For task 2, I decided to create a variation of a Sobel filter. This one has a diagonal pattern, like a straight line with a positive slope. Let's see it working. Notice that the positive slopes are indeed highlighted. My second filter is the negative slope version of the first one, so I'm expecting to highlight the other diagonal edges. Let's see it. Yes, the negative slopes are now highlighted. Lastly, let's see both images side by side. There they are. It looks like the grass got in the way. Maybe some blurring at the beginning would've been a good idea.

Contents