As part of our computer vision and image processing journey so far, we have essentially seen two different types of operation. The first and simpler ones were the grayscale transformations, where the output intensity value of a pixel depends only upon the intensity of the corresponding pixel in the input image. The second, slightly more complex form of processing that we saw is the image filtering operations, where the output intensity depends on a neighborhood rather than a single intensity value.
During our discourse on image filtering in Chapter 2, Image Filtering, we laid emphasis on how the aforementioned two approaches differ. However, there is some sense in which grayscale transformations and image filtering operations are alike. Algorithms belonging to both these classes produce grayscale images. Irrespective of the complexity of implementation, all the algorithms that we have discussed up to this point take a grayscale image as input and produce another...