Image transformation is the art of transforming an image. With image transformation and manipulation, we can enhance the appearance of an image. The transformation and manipulation operation can also be used as preprocessing steps for more complex image processing tasks, such as classification or segmentation, which you will get more acquainted with in later chapters. In this chapter, you are going to learn how to use different Python libraries (NumPy, SciPy, scikit-image, OpenCV-Python, Mahotas, and Matplotlib) for image manipulation and transformation. Different recipes will help you to learn how to write Python code to implement color space transformation, geometric transformations, perspective transforms/homography, and so on.
In this chapter, we will cover the following recipes:
- Transforming color space (RGB → Lab)
- Applying affine transformation
- Applying perspective transformation and homography
- Creating pencil sketches from images
- Creating cartoonish images
- Simulating light art/long exposure
- Object detection using color in HSV