EX:3 Image Annotation – Drawing lines, text circle, rectangle, ellipse on images
Aim:
To perform image annotation by drawing lines, text, circles, rectangles, and ellipses
using OpenCV in Python.
Algorithm:
1. Load the image using OpenCV and convert it to RGB and grayscale.
2. Crop a specific region and resize the image to a fixed size.
3. Apply thresholding to segment the image.
4. Detect and draw contours on the image.
5. Perform blob detection and highlight keypoints.
6. Display the original, processed, and detected images using Matplotlib.
Program:
Result:
The program successfully demonstrates image annotation using OpenCV.
EX:4 Image Enhancement - Understanding Color spaces, color space conversion,
Histogram equialization, Convolution, Image smoothing,Gradients, Edge Detection
Aim:
To apply image enhancement techniques including:
1. Color space conversion
2. Contrast enhancement (Histogram Equalization)
3. Filtering using convolution
4. Image smoothing (Blurring)
5. Gradient-based intensity detection
6. Edge detection (Sobel & Canny)
Algorithm:
1. Convert the image to different color spaces (RGB, HSV, LAB).
2. Enhance contrast using histogram equalization.
3. Apply convolution for filtering operations.
4. Smooth the image using blurring techniques.
5. Compute image gradients to detect intensity changes.
6. Perform edge detection using Sobel and Canny filters.
Program:
Result:
Thus the program successfully applies various image enhancement techniques.
EX:5 -Image Features and Image Alignment – Image transforms –Fourier, Hough, Extract ORB
Image features, Feature matching,cloning, Feature matching based image alignment.
Aim:
To perform image segmentation using the GrabCut algorithm, which separates the foreground object
from the background using graph-based optimization techniques.
Algorithm:
● Load the image, convert it to grayscale, and apply Fourier Transform.
● Detect edges using Canny and extract lines using Hough Transform.
● Extract ORB keypoints and perform feature matching with another image.
● Compute the homography matrix and align the images.
● Apply seamless cloning to merge one image into another.
● Display the results using Matplotlib.
Program:
EX NO: 7 Camera Calibration with circular grid
Aim:
To calibrate a camera using a circular grid pattern and estimate its intrinsic and
extrinsic parameters.
Program:
Result:Thus, the program successfully calibrates the camera using a circular grid and
computes the intrinsic and extrinsic parameters.
Circle grid detected! Undistorted image:
EX NO: 8 Pose Estimation
Aim:
To estimate the 3D pose (position and orientation) of an object with respect to the
camera using 2D-3D point correspondences.
Program:
Result:
Thus, the program successfully estimates the 3D pose of the object with respect to the
camera using 2D-3D point correspondences.
EX NO: 9 3D Reconstruction – Creating Depth map from stereo images
Aim:
To generate a 3D depth map from a pair of stereo images using disparity estimation
techniques.
Program:
Result:
Thus, the program successfully creates a depth map from stereo images by computing the
disparity between corresponding points.
Ex:10 Object Detection and Tracking using Kalman Filter, Camshift
Aim:
To detect and track a moving object in a sequence of images using the CamShift algorithm, and
predict its future positions using a Kalman Filter.
Result:
Thus, the program successfully executed using Kalman Filter, Camshift .