Computer Vision in Practice · Lesson 1 of 15 · 2 min read · 5 min video
How computers see images
Pixels, channels and resolution: what an image looks like to a model.
📄 Download slides (PDF)You look at a photo of RK Beach and instantly see sand, waves and people. A computer sees a grid of numbers. Computer vision is the craft of turning those numbers into meaning.
Pixels and channels
A digital image is a grid of pixels. Each pixel stores how bright it is:
- Grayscale: one number per pixel, from 0 (black) to 255 (white)
- Colour: three numbers per pixel, one each for red, green and blue (the RGB channels)
So a 1920 × 1080 colour photo is a block of 1920 × 1080 × 3 ≈ 6.2 million numbers.
from PIL import Image
import numpy as np
img = np.array(Image.open("rk_beach.jpg"))
print(img.shape) # (1080, 1920, 3): height, width, channels
print(img[500, 900]) # one pixel, e.g. [ 64 148 201] → a sea blueWhy seeing is hard
The same object can produce completely different numbers:
- Lighting: a Vizag street at noon vs at night
- Angle and size: a car seen from the side, from the front, or far away
- Occlusion: half hidden behind a bus or a tree
- Background: clutter that looks a bit like the object
A good vision model has to learn what stays the same about an object while all of these change.
The main vision tasks
- Classification: what is in this image? ("auto-rickshaw")
- Detection: what is where? (boxes around every vehicle)
- Segmentation: which pixels belong to what? (road, sky, people)
- OCR: what text is written here?
- Tracking: where does each object move, frame by frame?
This course covers all of them, from classic image processing to modern foundation models.
In one line
To a computer, an image is a grid of numbers in colour channels, and computer vision means learning what those numbers mean despite changes in light, angle and background.
Share with a friend