The following operations have been performed mainly using only Numpy and Pillow library is used just to load and save image.
The image can be rotated by any angle bound or inbound.It involves finding the centre of the Matrix and Shifting along the centre using Rotation Matrix.There are two methods of rotating the image following above approach
- Using Pure Rotation Matrix
- Using Shearing Rotation
Input Image |
Output
Shearing Rotation(No Bound) | Shearing Rotation(Bound) |
Pure Rotation Matrix(No Bound) | Pure Rotation Matrix(Bound) |
Convolution is a simple mathematical operation which is fundamental to many common image processing operators. Convolution provides a way of multiplying together two arrays of numbers, generally of different sizes, but of the same dimensionality, to produce a third array of numbers of the same dimensionality.Kernels form the Second Matrix which provides effects to the Image.
Applying 5X5 filters to do the following task
- Blurring
- Sharpening
Input Image |
Output
Box Blur | Gaussian Blur | Sharpen |
Edge detection is an image processing technique for finding the boundaries of objects within images. It works by detecting discontinuities in brightness.
Applying Edge Detection in following sequence
- Vertical edge detection
- Horizontal edge detection
- Sobel edge detection (right, left, top, bottom)
- Canny edge detection
Input Image |
Output
Horizontal Edge Detection | Vertical Edge Detection |
Sobel Edge Detection | Canny Edge Detection |
Morphological transformations are some simple operations based on the image shape. It is normally performed on binary images. It needs two inputs, one is our original image, second one is called structuring element or kernel which decides the nature of operation. Two basic morphological operators are Erosion and Dilation. Applying dilation and erosion transformation to the image
Output
Input-Image | Dilation | Erosion | Edge-Detection |
Masking is an image processing method in which we define a small 'image piece' and use it to modify a larger image. Masking is the process that is underneath many types of image processing, including edge detection, motion detection, and noise reduction. To show only blue ball a mask has been applied to the following input image
Input Image | Masked Image(output) |
A region of interest (ROI) is a portion of an image that you want to filter or perform some other operation on. You define an ROI by creating a binary mask, which is a binary image that is the same size as the image you want to process with pixels that define the ROI set to 1 and all other pixels set to 0.
Input Image | Output Image |