Warp/Transform Image | OpenCV vs Pillow | Python

Warp/Transform Image | OpenCV vs Pillow | Python

This tutorial will show you how to warp/transform an image in OpenCV (cv2) and Pillow (PIL), using the perspective transformation technique. OpenCV The vertices of transformation are as follows: Pillow Where pa is the four vertices in the current plane, and pb contains four vertices in the resulting plane. (find_coeffs function, modified from here) Full Example OpenCV Pillow Syntax OpenCV Parameters: […]

Rotate/Translate Image with Background Color | OpenCV vs Pillow | Python

Rotate/Translate Image with Background Color | OpenCV vs Pillow | Python

In this tutorial, you will learn how to rotate or translate/shift an image with a specified background color. For simple image rotation and translation, please read the previous tutorials: 1. Image Rotation Rotate 45 degrees counterclockwise with a background color RGB(0,0,0) (black). OpenCV Pillow 2. Image Translation Translate the image to the right by 10 […]