🦾OpenCV
Also known as Open Source Computer Vision Library, cv2, opencv-python
A free library of tools for working with images and video. Python calls it cv2.
Think of it like
It is like a big toolbox for photos. Each tool does one job, like cut, blur or find edges.
Example
Jack's robot uses OpenCV to read each camera frame, shrink it, and turn it grey. Then his model looks for red cups.
Why it matters
Most vision projects need the same basic steps. OpenCV gives them ready-made, so you can start on the real problem.
Definition
Example code
python
import cv2
img = cv2.imread("cup.jpg")
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
edges = cv2.Canny(gray, 100, 200)
cv2.imwrite("edges.jpg", edges)Common mistake
Key takeaways
- 1Ready-made tools. Resize, blur, edges and more.
- 2C++ inside. Fast code under a Python wrapper.
- 3Free to use. Open source, even for business.