Class 10 ยท Unit 5 ยท 4 marks + practical

Computer Vision

How machines see: pixels, features, kernels and CNNs, plus a no-code image sorter you can train yourself.

1What is computer vision?

Computer Vision (CV) is the domain of AI that helps machines see. It takes in images or videos, finds patterns in the pixels and works out what they show, so that the machine can act on it.

2Computer vision tasks

CV models do four main jobs. For an image with one object: classification and classification + localisation. For images with many objects: object detection and image segmentation.

3Images and pixels

A digital image is a grid of tiny squares called pixels. Resolution is how many pixels the image has. Each pixel is stored as numbers: one number from 0 to 255 in a grayscale image, and three numbers (red, green, blue) in an RGB colour image.

4Image features

A feature is a small, distinctive part of an image that helps a computer recognise it. Flat areas look the same everywhere, edges look the same all along a line, but corners are unique, so they make the best features.

Where did each patch come from? Pick a patch, then tap the place in the picture where you think it was cut from. The computer then shows every place the patch could fit.

5Convolution

Convolution slides a small grid of numbers, called a kernel, over an image. At each position it multiplies the pixels by the kernel numbers and adds them up. Different kernels blur, sharpen or find edges.

Slide a kernel over a picture. Each output pixel is the sum of the 3 ร— 3 pixels around it, each multiplied by the matching kernel number. Point at the input picture to see the maths, or press Slide.

Input (grayscale, 64 ร— 64)
Output (feature map)

6Convolutional Neural Network (CNN)

A CNN is a neural network built for images. Its convolution layer finds features, ReLU keeps only the useful positive values, the pooling layer shrinks the result, and the fully connected layer makes the final decision.

Tap squares on the input to draw.
Stage 1 of 4: the input layer is just pixel numbers. 1 = ink, 0 = blank.

7No-code computer vision: build a smart sorter

With no-code tools such as Teachable Machine and Lobe, anyone can train an image classifier: create classes, give examples, train, test and export. Try it with the shape sorter below.

A shape sorter machine. Teach it like Teachable Machine: give examples of each class, train, then test it with new drawings.

Try it yourself