An image filter is a mathematical operation on the original image that transforms it to the filtered image. The goal of the mathematical operation is to perform a mathematical computation for a pixel, based on the values of the neighboring pixels. A precisely defined image filter is a function that transforms each pixel of the original image to pixels of the filtered image. Consider a simple example—what would one do if he or she wants to decrease the brightness of an image?
In an image with gray scale representation, each pixel would contain one integer representing intensity. Deduct some positive integer say VALUE
from all the pixels and if some integer becomes negative then truncate the result to zero. This is referred to as the mathematical operation which is applied to every pixel in the original image. This function would transform the image into one that is the same as the original image, but with lower brightness. Similarly adding a constant value to all...