An Digital Image generally is nothing more than a two dimensional (2D array) signal. It is defined by the mathematical function I(x,y) where x and y are the horizontal and vertical co-ordinates. The value of I(x,y) at any point gives the pixel values at that point of an image.

RGB, Colored Image is the one type of digital images; however, the value of I(x,y) at any point gives the Red, Green, and Blue (R,G,B) pixel values at that point of an image. For example, a (200x200) RGB image consists of (200x200) red pixels, (200x200) green pixels and (200x200) blue pixels. Each pixel value has a values between 0-255


Digital Image processing is a method to perform some operations on an image, in order to get an enhanced image or to extract some useful information from it. It is a type of signal processing in which input is an image and output may be image or characteristics/features (such image edges) associated with that image.

Here, a demo example for various image processing filtering methods and canny edge detection application. You can test several images or you can snap and test images from your camera. For better understanding of digital image processing, start with the RGB circles image first








In this operation (filter), the red part of image is extracted while the green and blue parts are ignored.

In this operation (filter), the green part of image is extracted while the red and blue parts are ignored.

In this operation (filter), the blue part of image is extracted while the red and green are ignored.



A gray scale image can be obtained from RGB image using many algorithms such as averging of RGB pixels or luminosity method which accounts for human perception. We’re more sensitive to green, so green is weighted heavily, luminosity formula is 0.21 R + 0.72 G + 0.07 B.

Sepia is a reddish-brown color. Sepia effects gives an image a new tone in which the picture appears in shades of brown as opposed to greyscale as in a black-and-white image. Compare the Grayscale image with Sepia image

Inverting an image RGB colors result in color inverse (white goes to black and black goes to white). The invert RGB image is achieved by subtracting the maximum pixel values 255 from each color chaneel. The (new image R = 255 - original R), (new image G = 255 - original G), and (new image B = 255 - original B).



Thresholding is the simplest method of image segmentation. From a grayscale image, thresholding can be used to create binary images.



Gaussian blur (Gaussian smoothing - lowpass filtering) is the result of blurring an image by a Gaussian function. It is a widely used effect

The bigger the function, the more blur the filtered image becomes. In this operation, 5x5 gaussian blur function applied to the image, notice the image is more blured than the previous 3x3 gaussian filtered image

Generally High Pass filter, passes the high frequencies and rejects the low frequencies. In image processing, high frequency represents the details of the image such as (the edge) and the low frequency represents the contents of the image.



In image processing, sharpening refers to any enhancement technique that highlights edges and fine details in an image. Image sharpening is widely used in printing and photographic industries for increasing the local contrast and sharpening the images.

Laplacian of an image a derivative which is used to find edges in an image. The major difference between Laplacian and other operators like Prewitt, Sobel, Robinson and Kirsch is that these all are first order derivative masks but Laplacian is a second order derivative mask

Image gradient (derivative) is used for edge detection in an image. It detects edges in X-direction. Edges are calculated by using difference between corresponding pixel intensities of an image.

Image gradient (derivative) is used for edge detection in an image. It detects edges in Y-direction. Edges are calculated by using difference between corresponding pixel intensities of an image.



Magnitude of gradient: compute the horizontal and vertical image gradients, square them, sum them, under the square root.

The Canny edge detector is an edge detection operator that uses a multi-stage algorithm to detect a wide range of edges in images.