The goal of this chapter is to develop a number of image processing filters and then apply them to the video stream of a webcam in real time. These filters will rely on various OpenCV functions to manipulate matrices through splitting, merging, arithmetic operations, and applying lookup tables for complex functions.
We will cover the following three effects, which will help familiarize you with OpenCV, and we will build on these effects in future chapters of this book:
- Warming and cooling filters: We will implement our own curve filters using a lookup table.
- Black-and-white pencil sketch: We will make use of two image-blending techniques, known as dodging and burning.
- Cartoonizer: We will combine a bilateral filter, a median filter, and adaptive thresholding.
OpenCV is an advanced toolchain. It often raises the question, that is, not how to implement something...