Technologies for image and video processing, including object detection and recognition
Computer Vision is a field of artificial intelligence that trains computers to interpret and understand the visual world. Using digital images from cameras and videos and deep learning models, machines can accurately identify and classify objects and react to what they "see."
# Install OpenCV
pip install opencv-python
# Import OpenCV
import cv2
import numpy as np
# Read an image
img = cv2.imread('image.jpg')
# Convert to grayscale
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
# Apply Gaussian blur
blurred = cv2.GaussianBlur(gray, (5, 5), 0)
# Edge detection
edges = cv2.Canny(blurred, 50, 150)
# Display the result
cv2.imshow('Edges', edges)
cv2.waitKey(0)