All the Image Processing tasks are done without using any opencv library unless mentioned in order to understand the basics of image processing.For the rotation basically the rotation matrix is used.
Rotating the given image by any angle anticlockwise by using numpy and matplotlib library.Taking the rotation angle as the input from the user and rotate the given image.
Original Input image
Blurring and sharpening the image by using kernel(3x3 filters).
Output
Gaussian Filter | Box Filter | Sharpen |
- Vertical Edge Detection is done by using vertical filter(3x3).
- Horizongtal Edge Detction is done by using horizontal filter(3x3),
- Sobel Edge Detection was done by using two filters sobelx and sobely and applying on the given image. Input Image
Applying Sobel Edge Detector 4. Canny Edge Detection: It basically consists of five steps- 1) Noise Reduction 2)Gradient Calculation 3)Non-maximum suppression 4)Double Threshold 5)Edge Tracking Hysteresis
Applying Morphological Transformation Erosion and Dilation on the given image. Erosion erodes away the boundaries of the object and used to diminsh the features of an image. Dilation increases the object area and used to accentuate features.
Input Image | Erosion | Dilation |
---|---|---|
In this case the blue colour ball is to be detcted from red,green and blue balls. Using cv2.cvtColor(frame, cv.COLOR_BGR2HSV) library the given image is changed from BGR to HSV and the masking is done to detect blue color.
Input Image | Blue Ball Detected |
---|---|
Region of Image is obtained by numpy indexing.In this input image the foot ball is moved from one place to other place using numpy indexing.
Figure 1 | Figure 2 |
---|---|
Video of the Output Images here
- SRA VJTI