Search Creators CG LAB Program-09
Search Creators CG LAB Program-09
Subject Code:21CSL66
Program-09
9. Read an image and extract and display low-level features such as edges,
textures using filtering techniques.
Program
import cv2
import numpy as np
img = cv2.imread(image_path)
# Edge detection
# Texture extraction
texture = cv2.filter2D(gray, -1, kernel) # Apply the averaging filter for texture
extraction
cv2.imshow("Edges", edges)
cv2.imshow("Texture", texture)
cv2.waitKey(0)
cv2.destroyAllWindows()
Output
Explanation