Image Processing in Python (Scaling, Rotating, Shifting and Edge Detection)
Taking pictures is just a matter of click so why playing around with it should be more than few lines of code. Seems not a case with python. There are quite a few good libraries available in python to process images such as open-cv, Pillow etc. In this article we’ll be using Open CV, an open source library for computer vision. It has C++, python and java interfaces available. It’s highly optimized (written in C/C++) for real time applications in the domain of computer vision.
Let’s start with a simple one i.e Scaling an image.
Scaling an Image :-
Scaling operation increases/reduces size of an image.
Rotating an image :-
Images can be rotated to any degree clockwise or otherwise. We just need to define rotation matrix listing rotation point, degree of rotation and the scaling factor.
Translating an Image :-
Translating an image means shifting it within a given frame of reference.
Edge detection in an Image :-
The process of image detection involves detecting sharp edges in the image. This edge detection is essential in context of image recognition or object localization/detection. There are several algorithms for detecting edges due to it’s wide applicability. We’ll be using one such algorithm known as Canny Edge Detection.
Please refer Github for more details.
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