Lesson 21 of 28 · Using AI well
What is computer vision?
Computer vision is the field of AI that lets computers interpret images and video: recognising objects, reading text, spotting faces and following movement. It powers phone photo search, document scanning, factory quality checks and driver-assistance features. Instead of following hand-written rules, a vision model learns what things look like from many labelled example images.
What computer vision does
Computer vision is a family of tasks, each answering a different question about an image. An easy way to remember them is to picture what each one would draw on a photo of a busy street.
- Classification: what is in this picture? It answers "a street with cars".
- Object detection: where is each thing? It draws a box around every car and person.
- Segmentation: exactly which pixels belong to each thing, like colouring inside the lines.
- Optical character recognition (OCR): what does the text say? It types out the shop signs.
- Tracking: where does each thing move from one video frame to the next?
How a computer "sees"
To a computer, a photo is a grid of numbers. Each tiny dot, called a pixel, is stored as three brightness values for red, green and blue. A phone photo contains millions of them, and nothing in those numbers says "cat".
A vision model learns the link between number patterns and meaning from training examples. It is usually a neural network: layers of simple maths units that adjust themselves as they learn. Classic convolutional networks slide small filters across the image, so early layers react to edges and colours, later layers to shapes such as eyes or wheels, and the last layers to whole objects. Large labelled collections such as ImageNet, used in a yearly recognition challenge from 2010, drove rapid progress. Newer vision transformers cut the image into patches and treat them a little like words in a sentence.
Where you meet it in real tools
Computer vision is one of the most widespread kinds of AI, and it mostly works quietly inside other products:
- Phones: face unlock, searching your photos for "beach" and translating a sign through the camera.
- Documents: scanning apps and expense tools that read receipts, IDs and invoices.
- Shops and factories: self-checkout, stock counting and spotting defects on a production line.
- Cars: lane keeping, parking cameras and pedestrian warnings.
- AI assistants: multimodal chat tools that read your screenshots and photos.
What it is not, and its limits
Computer vision analyses images; it is not the same as image generation, which creates new pictures. That is generative AI, although both rely on similar learned representations. Vision models also do not understand a scene the way a person does: they recognise patterns they met in training.
That is why accuracy can drop with poor lighting, unusual angles, rare objects, or people and settings that were under-represented in the training data, which can produce biased results. Face recognition in particular raises privacy and legal questions, and some jurisdictions restrict how it may be used. For important uses such as medical images or identity checks, a vision model should support a qualified person, not replace them.
Example
See an image as numbers
Code sample# pip install pillow
from PIL import Image
img = Image.open("photo.jpg").convert("RGB")
print(img.size) # (width, height) in pixels
tiny = img.resize((3, 2)) # shrink to 3 x 2 pixels
for pixel in tiny.getdata():
print(pixel) # (red, green, blue), each 0-255This short Python script uses the free Pillow library to print the raw numbers behind any photo. Every vision model starts from numbers like these; training teaches it which patterns among millions of them mean "face", "receipt" or "crack in a weld".
Key points
- Computer vision lets computers interpret images and video: classify, detect, segment, read text and track.
- To a computer an image is a grid of numbers; a model learns which patterns mean which objects.
- It runs inside everyday tools, from phone cameras to receipt scanners and car safety features.
- It recognises patterns rather than understanding scenes, so lighting, angles and biased data cause errors.
- Face recognition and other uses on people carry privacy and legal limits.
Try it on Mindber
Related terms
Related topics
Frequently asked questions
Is computer vision the same as image recognition?
Image recognition is one part of computer vision. Recognition, or classification, says what is in an image. Computer vision is the wider field, which also covers finding where objects are, outlining them pixel by pixel, reading text, estimating depth, following movement in video and reconstructing scenes in 3D.
Is computer vision a type of AI?
Yes. Modern computer vision is a branch of artificial intelligence built mainly on machine learning: models learn from labelled images instead of following hand-written rules. Older systems relied on hand-designed rules, such as detecting edges with fixed formulas, and simple versions of those techniques are still used for predictable jobs like reading barcodes.
Can I use computer vision without coding?
Yes. Many apps package it for everyday jobs: scanning documents into editable text, removing photo backgrounds, counting stock from shelf photos or describing images for people with low vision. Multimodal chat assistants also let you upload a picture and ask questions about it. Coding is only needed when you want to train or integrate your own model.
Sources
- ImageNet Large Scale Visual Recognition Challenge. Russakovsky et al., arXiv, September 2014
- Deep Residual Learning for Image Recognition. He et al., arXiv, December 2015
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. Dosovitskiy et al., arXiv, October 2020
Last updated