There are various kernels that can be used to highlight the edges in an image.
The method we just discussed can also be achieved using the Prewitt kernel (in the x-direction).
Given below is the Prewitt kernel: We take the values surrounding the selected pixel and multiply it with the selected kernel (Prewitt kernel).
We can then add the resulting values to get a final value.
Since we already have -1 in one column and 1 in the other column, adding the values is equivalent to taking the difference.
There are various other kernels and I have mentioned four most popularly used ones below: Source: Applied Machine Learning Course Let’s now go back to the notebook and generate edge features for the same image: View the code on Gist.
End Notes This was a friendly introduction to getting your hands dirty with image data.
I feel this is a very important part of a data scientist’s toolkit given the rapid rise in the number of images being generated these days.
So what can you do once you are acquainted with this topic?.We will deep dive into the next steps in my next article – dropping soon!.So watch this space and if you have any questions or thoughts on this article, let me know in the comments section below.
Also, here are two comprehensive courses to get you started with machine learning and deep learning: Applied Machine Learning: Beginner to Professional Computer Vision using Deep Learning You can also read this article on Analytics Vidhyas Android APP Share this:Click to share on LinkedIn (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on Twitter (Opens in new window)Click to share on Pocket (Opens in new window)Click to share on Reddit (Opens in new window) Related Articles (adsbygoogle = window.
adsbygoogle || ).