CSC 494 · Introduction to Artificial Intelligence
Our notes
2 min readWhat computer vision is
Getting computers to extract useful information from images and video: recognising objects and faces, reading text, measuring, tracking movement, guiding robots and cars.
Images in a computer
- A digital image is a grid of pixels.
- Greyscale: each pixel a brightness, often 0 (black) to 255 (white), 8 bits.
- Colour: three values per pixel (red, green, blue).
- Resolution: a 1920 × 1080 image has about 2.07 million pixels; in 8-bit RGB that is about 6.2 MB uncompressed.
Stages of a vision system
- Image acquisition: cameras, scanners, satellites, medical scanners.
- Pre-processing: noise removal (smoothing filters), contrast enhancement, resizing.
- Segmentation: separate objects from background (thresholding, region growing, edge-based).
- Feature extraction: edges, corners, shapes, textures, colour histograms.
- Recognition / classification: match features to known objects.
- Interpretation: understand the scene.
Edge detection
Edges are sharp changes in brightness. Filters (small matrices called kernels) slide over the image:
- Sobel and Prewitt operators estimate the brightness gradient.
- Canny detector: smoothing, gradient, thinning, thresholds: clean edges.
Worked example: thresholding
A 3 × 3 greyscale patch: 30, 40, 200 / 35, 210, 220 / 25, 205, 215. With threshold 128, pixels above become 1 (object), others 0:
0 0 1 / 0 1 1 / 0 1 1: the bright object occupies the right and lower part.
Worked example: a convolution
Apply the horizontal-gradient kernel [−1 0 1] to the row 10, 10, 10, 200, 200, 200 (centre positions 2 to 5): results 0, 190, 190, 0. The large values mark the edge between the dark and bright parts.
Recognition methods
- Template matching: compare with stored images (simple, sensitive to size and rotation).
- Feature-based: keypoint descriptors matched between images.
- Statistical and neural: convolutional neural networks (CNNs) learn features from labelled images; the basis of modern face recognition, medical image analysis and self-driving perception.
Applications
Face recognition (phones, security), optical character recognition (scanning documents, number plates), medical imaging, crop and disease monitoring from phone photos and drones, quality inspection in factories, satellite mapping of floods and land use, sports analysis.
Issues
Lighting, viewpoint and occlusion make vision hard; bias in face recognition across skin tones has been widely reported, so training data must represent the people the system will serve; privacy and consent for cameras in public.
Exams usually ask
- Describe the stages of a computer vision system.
- Explain edge detection and segmentation.
- Discuss applications of vision systems.
Common mistake
Assuming a vision system that works in the lab will work everywhere. Test it under the lighting, cameras and people it will really meet.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Computer vision
(opens en.wikipedia.org in a new tab)
Wikipedia, Computer vision, CC BY-SA 4.0 · licence
-
Convolutional neural network
(opens en.wikipedia.org in a new tab)
Wikipedia, Convolutional neural network, CC BY-SA 4.0 · licence
Watch
-
Best pick Computer Vision: Crash Course Computer Science #35
11 min · ≈ 50 MB · about ₦28
(opens youtube.com in a new tab)
-
How to Use AI in Industrial Automation: Machine Vision
6 min · ≈ 27 MB · about ₦15
(opens youtube.com in a new tab)
-
Computer Vision Explained
6 min · ≈ 27 MB · about ₦15
(opens youtube.com in a new tab)
-
Computer Vision Explained for Beginners
22 min · ≈ 99 MB · about ₦56
(opens youtube.com in a new tab)
-
What is Computer Vision? | Introduction
8 min · ≈ 36 MB · about ₦20
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.