Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Processes video frame by frame and converts to grayscale.
import cv2
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.imshow('Gray Video', gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()OpenCV (Open Source Computer Vision Library) is an open-source computer vision and machine learning library that provides tools for real-time image and video processing across multiple platforms.
Origin & Creator
OpenCV was originally developed by Intel in 1999, led by Gary Bradski, with contributions from Willow Garage and Itseez, and has grown into one of the most widely used computer vision libraries worldwide.
Industrial Note
OpenCV is extensively used in robotics, autonomous vehicles, medical imaging, augmented reality, surveillance, and industrial automation.