-
Book Overview & Buying
-
Table Of Contents
Hands-On Image Processing and Computer Vision with Python - Second Edition
By :
As discussed earlier, opencv-python is a powerful and widely used library for image manipulation and computer vision tasks in the Python programming language. Renowned for its simplicity and efficiency, opencv-python empowers developers to perform a diverse range of image-processing operations, from basic transformations to advanced computer vision applications. In this section, you will learn how to implement a few image manipulation tasks with the library functions.
OpenCV provides efficient functions for performing image rotation through affine transformations. In the following python demonstration, an input image is rotated both counterclockwise and clockwise by
about its center. The image is first loaded with cv2.imread() and converted from OpenCV’s default BGR color format to RGB using cv2.cvtColor() for correct visualization.
The rotation matrix is computed with cv2.getRotationMatrix2D(center, angle, scale)...
Change the font size
Change margin width
Change background colour