CV Lab
CV Lab
LIST OF PROGRAMS
1. Perform the image transformations that include the geometric and morphological
transformations.
2. Perform the image enhancement by applying contrast limited adaptive histogram Equalization
3. Perform the Contours and Region based segmentation in images
4. Perform the Wavelet Transforms on image using PyWavelets.
5. Perform the K-Means clustering for Image segmentation using CV2 library.
6. Perform basic motion detection and tracking using python and OpenCV
7. Perform face detection using OpenCV library
8. Perform Foreground Extraction in an image
9. Perform Pedestrian Detection using OpenCV and Python.
PROGRAM – 1
IN COMMAND PROMPT:
IN IDLE (Python):
PROGRAM:
import numpy as np
import cv2
import matplotlib.pyplot as plt
plt.show()
OUTPUT:
IN COMMAND PROMPT:
IN IDLE (Python):
PROGRAM:
import numpy as np
import matplotlib.pyplot as plt
import pywt
import pywt.data
Figure
PROGRAM – 3
IN IDLE (Python):
import cv2
import numpy as np
(h, w) = image.shape[:2]
center = (w // 2, h // 2)
M = cv2.getRotationMatrix2D(center, 45, 1.0)
rotated_image = cv2.warpAffine(image, M, (w, h))
cv2.imshow('Rotated Image', rotated_image)
cv2.waitKey(0)
Original Image
Resized Image
Rotated Image
Cropped Image
Grayscale Image
Blurred Image
Edge Detected Image
Binary Image
Erosion
Dilation
Opening
Closing
Affine Transformation
Perspective Transformation