CHAPTER PDF
Complete curriculum textbook chapter document for reading and offline study.
NOTES
Complete conceptual breakdown, formulas, diagrams, and memory aids.
Unit 5: Computer Vision
Complete textbook-sequence notes with image fundamentals, computer vision tasks, No-Code tools, image features, convolution, CNN layers, practical activities and fully solved textbook exercises.
Unit overview and learning outcomes
Computer Vision is a branch of Artificial Intelligence that enables machines to interpret and understand visual information from the real world, such as images and videos.
Objectives
- Introduce the basic principles and techniques of computer vision.
- Familiarise learners with common algorithms and tools used in image processing and analysis.
- Apply computer vision techniques to solve real-world problems.
- Develop critical thinking and problem-solving skills in this domain.
Learning outcomes
- Understand fundamental concepts and theories of computer vision.
- Implement image-processing techniques using programming languages such as Python.
- Apply object detection, image segmentation and feature extraction.
- Develop ideas for real-world problems using computer vision technologies.
Approach: Practical implementation. Prerequisite: Essential understanding of Artificial Intelligence.
Key concepts: Image processingFeature extractionObject detectionObject recognitionCNN
5.1 — Introduction to Computer Vision
Humans use their eyes to see objects, the brain to interpret what is seen and then decide what action to take. Computer Vision gives machines a similar ability: a camera or other sensor captures visual information, and algorithms process and analyse it to identify objects, patterns or meaningful details.
The textbook describes computer vision as extracting information from images, text and videos. In practical terms, it is concerned with visual data; text may be recognised from an image using techniques such as Optical Character Recognition (OCR).
Emoji Scavenger Hunt activity (PDF page 2)
Open Google Emoji Scavenger Hunt. The game challenges the player to find eight requested objects within a time limit. The camera captures an object and a trained model attempts to recognise it.
Activity reflection — suggested answers
- Strategy: Read the requested item, locate a matching object quickly, hold it clearly in front of the camera and keep it within the camera frame.
- Could the computer identify every item? Not necessarily. Recognition depends on the object's appearance, camera quality, training data and environmental conditions.
- Does lighting matter? Yes. Very dim light, glare, shadows or strong backlighting can hide important visual features and reduce recognition accuracy.
Human vision and computer vision analogy
captures light
interprets image
captures image
analyses image
Computer Vision and Artificial Intelligence
AI is the broader field that enables computers to perform tasks associated with human intelligence. Computer Vision is an AI domain that allows systems to see, observe and make sense of visual data. Machine Learning and Deep Learning provide methods that can be used to learn visual patterns.
Computer Vision vs Image Processing
| Computer Vision | Image Processing |
|---|---|
| Extracts meaningful information from images/videos to understand what is shown and possibly predict or decide something. | Processes raw images to enhance them or prepare them for other tasks. |
| Concerned with interpretation and understanding. | Concerned mainly with modifying or improving image data. |
| Examples: object detection, handwriting recognition. | Examples: resizing an image, correcting brightness, changing colour tones. |
| Presented in the textbook as the superset. | Presented in the textbook as a subset of Computer Vision. |
Applications of Computer Vision (PDF pages 3–5)
The textbook notes that computer vision research began in the 1970s and has advanced significantly, making visual-AI applications common across many industries.
1. Facial recognition
Analyses facial features to recognise or verify a person. Uses include smart-home access, guest recognition, visitor logs and school attendance systems.
Example: A school camera compares a student's face with authorised records to mark attendance.
2. Face filters
Apps such as Instagram and Snapchat use computer vision to detect facial landmarks and facial movements, then place selected effects over the face.
3. Search by image
An image-search system analyses visual features of an uploaded picture and compares them with image collections to find visually similar or related results.
4. Retail and customer movement
Retailers can analyse customer movement, navigation routes and walking patterns to understand how people use a store.
5. Inventory management
Security-camera images can help estimate shelf stock, identify empty spaces and analyse shelf layouts so products can be placed more effectively.
6. Self-driving cars
Vehicle cameras and vision algorithms identify pedestrians, vehicles, road signs, lanes and obstacles. This supports navigation and environmental monitoring.
7. Medical imaging
Computer vision helps analyse medical scans and may support the creation or interpretation of 3D models from scan data. It assists medical professionals; it does not replace clinical judgement.
8. Google Translate camera
OCR recognises printed words in a camera image. Translation software converts the recognised text, and augmented reality can display the translated words over the camera view.
5.2 — Computer Vision Tasks
Computer-vision applications perform different tasks to obtain information from an input image. The information may be used directly for prediction or passed to another analysis stage.
| Task | What it does | Example |
|---|---|---|
| Image classification | Assigns one label from a fixed set of categories to the whole image. | Label a photograph as “cat”. |
| Classification + localisation | Identifies the object and locates it in the image. The textbook describes this task for a single object. | Identify a cat and draw one bounding box around it. |
| Object detection | Finds and classifies multiple object instances, usually locating each with a bounding box. | Detect a cat, dog and bicycle in one photograph. |
| Instance segmentation | Detects individual object instances, assigns a category and labels the pixels belonging to each instance. | Give each dog in a photograph its own pixel-level mask. |
Diagram from PDF page 6 — concept comparison
classification
one image label
localisation
one object + location
multiple boxes + labels
pixel mask per instance
Basics of Images — Pixels and Resolution
1. Pixel
A digital photograph is made from many tiny pixels. When an image is enlarged greatly, individual square-like pixels become visible. More pixels generally allow an image to represent finer detail, provided the image quality and capture conditions are good.
2. Image resolution
Megapixels = Total pixels ÷ 1,000,000
Textbook example: A monitor resolution of 1280 × 1024 contains:
Step 2: Total pixels = 1,310,720
Step 3: In megapixels = 1,310,720 ÷ 1,000,000 = 1.31072 MP ≈ 1.31 MP.
A 5-megapixel camera produces an image containing approximately five million pixels.
3. Pixel value and 8-bit images
A pixel value represents brightness in a grayscale image or channel intensity in a colour image. A common byte image stores each channel value as an 8-bit unsigned integer.
Values range from 0 to 255 (inclusive).
For a grayscale channel, 0 represents black and 255 represents white. Intermediate values represent shades of grey. For an RGB channel, 0 means no intensity of that channel and 255 means maximum intensity of that channel.
Grayscale and RGB Images
1. Grayscale images
- Each pixel normally has one intensity value.
- In an 8-bit grayscale image, values range from 0 to 255.
- 0 = black; 255 = white; values in between = grey shades.
- It can be represented as a two-dimensional array with Height × Width entries.
2. RGB images
An RGB image has three channels: R, G and B. Each channel is a two-dimensional plane of intensity values. Combining the three channel values at each pixel produces the displayed colour.
Uncompressed 8-bit RGB storage ≈ Height × Width × 3 bytes
| RGB value | Resulting colour | Reason |
|---|---|---|
| (0, 0, 0) | Black | No red, green or blue light. |
| (255, 255, 255) | White | Maximum intensity of all three channels. |
| (255, 0, 0) | Red | Only red is at maximum intensity. |
| (0, 255, 0) | Green | Only green is at maximum intensity. |
| (0, 0, 255) | Blue | Only blue is at maximum intensity. |
| (255, 255, 0) | Yellow | Red and green combine; blue is absent. |
| (255, 0, 255) | Magenta | Red and blue combine. |
| (0, 255, 255) | Cyan | Green and blue combine. |
| (128, 128, 128) | Medium grey | Equal intermediate intensities. |
RGB colour experiment (PDF pages 9–10)
- Open W3Schools RGB colour tool.
- Set R=G=B=255: output is white.
- Set R=G=B=0: output is black.
- Set one channel to zero and vary the other two: the resulting hue changes according to the two active channels.
- Vary all three channels equally: neutral shades change from black through grey to white.
- Choose a favourite colour and record its RGB triplet from the colour picker.
Grayscale vs RGB
| Grayscale | RGB |
|---|---|
| One intensity value per pixel. | Three intensity values per pixel. |
| Represents brightness from black to white. | Represents colour by red, green and blue intensities. |
| 8-bit grayscale: 256 possible levels. | 8-bit per channel: 256³ = 16,777,216 possible combinations. |
| Approx. H × W bytes uncompressed. | Approx. H × W × 3 bytes uncompressed. |
Pixel-art activity (PDF page 11)
Visit Piskel, create a small pixel-art image and experiment with making a GIF animation. The activity reinforces that a digital image is built from a grid of pixels.
5.3 — No-Code AI Tools for Computer Vision
1. Lobe
- Users organise example images into labelled classes.
- The tool learns visual patterns from the examples.
- The trained model predicts the class of a new image.
2. Teachable Machine
The textbook states that it runs on TensorFlow.js. It provides a beginner-friendly interface for collecting examples, training a model and testing predictions.
Activity — Build a Smart Sorter (PDF pages 11–12)
Purpose: Use computer vision to automate and improve the sorting of recyclable material.
- Form groups of four students.
- Find or capture images of bottles, cans and paper.
- Open a suitable No-Code AI tool such as Teachable Machine.
- Create three classes: Bottles, Cans and Paper.
- Add several varied training examples to each class.
- Train the model.
- Test it using new images that were not used in training.
- Record correct and incorrect predictions and discuss how more varied training examples may improve the model.
Orange Data Mining — Coral Bleaching classification use case
Coral reefs: Large underwater structures formed by the skeletons of marine invertebrates called corals. Corals are an important part of aquatic ecosystems and support marine life.
Coral bleaching: A condition in which corals lose the symbiotic algae that provide much of their colour and energy, often due to environmental stress such as elevated water temperature. Bleaching can threaten reef ecosystems.
The PDF provides the walkthrough resources and dataset folder:
The coral-bleaching infographic on page 13 illustrates healthy and bleached coral appearance. The core learning point is that early detection of bleaching can help researchers and conservation teams respond before damage becomes more severe.
Suggested workflow for coral image classification
- Collect labelled images of healthy and bleached coral.
- Check image quality and remove duplicates or unusable samples.
- Split data into training and testing sets.
- Train a classifier using a No-Code tool or Orange-compatible image workflow.
- Evaluate the model on unseen images.
- Review errors with domain experts before using predictions for conservation decisions.
5.4 — Image Features
Patch-finding activity (PDF pages 14–15)
The textbook shows a building image and six small image patches (A–F). Students are asked to locate each patch in the larger image and decide which is easiest or hardest to identify.
| Patch type | Why it is difficult/easy to locate |
|---|---|
| A and B — flat regions | They contain little distinctive variation and may look similar over a large area. Their exact location is difficult to determine. |
| C and D — edges | An edge is more informative than a flat area, but a similar edge pattern may continue along a line. Exact position along that edge can remain uncertain. |
| E and F — corners | A corner combines changes in more than one direction. It is distinctive and changes noticeably when moved, making its location easier to identify. |
Second patch example (PDF page 15)
- Blue patch: Flat region; looks similar when moved within the same flat area, so it is difficult to track.
- Black patch: Edge; may look similar when moved parallel to the edge.
- Red patch: Corner; looks different when moved, so it is a distinctive feature.
Common feature types
Blob
A region that differs from its surroundings in brightness, colour or texture.
Edge
A boundary where image intensity or colour changes significantly.
Corner
A point where image boundaries or intensity changes occur in multiple directions.
Object feature
A meaningful part or pattern that helps identify an object, such as a wheel, eye or beak.
5.5 — Convolution
Computers store digital images as numerical pixel values. Changing these values changes the appearance of an image. Image-editing applications use mathematical operations to apply effects such as sharpening, blurring and edge enhancement.
The textbook activity on pages 16–18 asks learners to change values in an online convolution matrix and observe the effect on an image.
Interactive image-kernel demonstration
Kernel experimentation activity
- Change all kernel values to positive values and observe the image.
- Change all values to negative values and observe the output.
- Try a mixture of positive and negative values.
- Set four selected positions to negative values and keep the others zero.
- Change one negative value to positive, then change a second one.
- Move the selected positions and test the pattern on another image.
- Discuss which visual effect is produced and why filters are useful.
How convolution works
- Represent the image as a two-dimensional array of pixel values.
- Choose a kernel matrix containing numerical weights.
- Place the kernel over a small region of the image.
- Multiply each image value by the corresponding kernel value.
- Add all the products to obtain one output value.
- Move the kernel across the image and repeat the operation.
- Collect the output values to form a feature map or filtered image.
Small worked example
Image patch:
| 1 | 2 | 0 |
| 0 | 1 | 3 |
| 2 | 1 | 0 |
Kernel:
| 1 | 0 | −1 |
| 1 | 0 | −1 |
| 1 | 0 | −1 |
Notebook calculation: Multiply corresponding cells and add:
+ (0×1) + (1×0) + (3×−1)
+ (2×1) + (1×0) + (0×−1)
= 1 + 0 + 0 + 0 + 0 − 3 + 2 + 0 + 0
= 0.
This kernel compares values on the left and right sides of a patch and can respond to a vertical intensity boundary. Different kernels produce different effects.
Kernel, padding and textbook convolution worksheet
The PDF explains that the kernel is placed over the image and the centre positions are aligned. At the border, a kernel may extend beyond the original image. If no padding is used, the output becomes smaller. To preserve the input dimensions, the textbook describes extending the image boundary with zero-valued pixels; this is called zero padding.
Valid convolution output size
Output width = Input width − Kernel width + 1
For an 8 × 8 image and a 3 × 3 kernel with stride 1 and no padding:
Output width = 8 − 3 + 1 = 6
Output size = 6 × 6.
Completed numerical worksheet from PDF page 21
The textbook provides this 8 × 8 image array and the 3 × 3 kernel. It asks students to fill the output image. Using the element-wise multiply-and-sum method shown in the textbook, the valid 6 × 6 output is calculated below.
Input image array (I)
| 150 | 0 | 255 | 240 | 190 | 25 | 89 | 255 |
| 100 | 179 | 25 | 0 | 200 | 255 | 67 | 100 |
| 155 | 146 | 13 | 20 | 0 | 12 | 45 | 0 |
| 100 | 175 | 0 | 25 | 25 | 15 | 0 | 0 |
| 120 | 156 | 255 | 0 | 78 | 56 | 23 | 0 |
| 115 | 113 | 25 | 90 | 0 | 80 | 56 | 155 |
| 135 | 190 | 115 | 116 | 178 | 0 | 145 | 165 |
| 123 | 255 | 255 | 0 | 255 | 255 | 255 | 0 |
Kernel (K)
| −1 | 0 | −1 |
| 0 | −1 | 0 |
| −1 | 0 | −1 |
Multiply the four corner values and the centre value by −1; all other positions contribute zero.
First output cell — step-by-step
Use the top-left 3 × 3 patch:
| 150 | 0 | 255 |
| 100 | 179 | 25 |
| 155 | 146 | 13 |
+ (100×0) + (179×−1) + (25×0)
+ (155×−1) + (146×0) + (13×−1)
= −150 − 255 − 179 − 155 − 13
= −752.
Completed 6 × 6 output array
| −752 | −431 | −458 | −497 | −579 | −359 |
| −371 | −392 | −270 | −295 | −304 | −415 |
| −718 | −322 | −371 | −113 | −161 | −68 |
| −396 | −658 | −50 | −288 | −137 | −273 |
| −738 | −487 | −716 | −172 | −504 | −277 |
| −708 | −573 | −651 | −603 | −566 | −635 |
Convolution summary (PDF page 21)
- Convolution is commonly used in image editing.
- It multiplies image values and kernel weights element by element, then sums the products.
- In computer vision, it is used in CNNs to extract image features.
5.6 — Convolutional Neural Networks (CNN)
A CNN processes an input image through a sequence of layers. It learns useful features from training examples and produces an output such as a class label or probability for each class.
CNN prediction example (PDF page 22)
The textbook diagram shows a vehicle image entering a Convolutional Neural Network and the output class probabilities:
| Predicted class | Example probability in textbook diagram |
|---|---|
| Car | 70% |
| Truck | 20% |
| Bicycle | 10% |
The highest probability is Car (70%), so the model's predicted label is Car. These numbers are an illustrative example, not a universal model result.
Car 70% • Truck 20% • Bicycle 10%
Four main CNN layers in this unit
5.7 — Layers of a Convolutional Neural Network
5.7.1 Convolution Layer
This is the first layer described in the textbook. It applies multiple kernels to the input image to extract visual features such as edges, colours and gradient directions.
- The first convolution layer commonly detects low-level features such as edges, colour changes and simple orientations.
- Deeper convolution layers can combine simple features to identify more complex patterns and object parts.
- Different kernels produce different feature maps.
- The output is called a feature map or activation map.
The textbook identifies two advantages: reducing the image representation to useful features for efficient processing, and focusing on information relevant to the task. For example, recognising a face may depend strongly on eyes, nose and mouth patterns rather than every pixel equally.
5.7.2 Rectified Linear Unit (ReLU)
| Input x | ReLU(x) |
|---|---|
| −5 | 0 |
| −1 | 0 |
| 0 | 0 |
| 3 | 3 |
| 8 | 8 |
ReLU introduces non-linearity into the network. The graph is horizontal at zero for negative inputs and rises linearly for positive inputs. As described in the textbook, this can make important activations and boundaries more prominent for later layers.
5.7.3 Pooling Layer
The pooling layer reduces the spatial dimensions (height and width) of a feature map while retaining important information. This makes processing more manageable and can make the representation less sensitive to small shifts or distortions.
Max pooling
Returns the largest value in the region covered by the pooling window.
Example: For [2, 8; 3, 5], max = 8.
Average pooling
Returns the arithmetic average of the values in the pooling window.
Example: For [2, 8; 3, 5], average = (2+8+3+5)/4 = 4.5.
Pooling makes feature maps smaller and can make them more resistant to small translations, distortions and transformations. Similar inputs can produce similar pooled representations.
5.7.4 Fully Connected Layer
The fully connected (FC) layer uses the features extracted by convolution and pooling to produce the final classification in a basic image-classification CNN.
- The final feature maps are flattened into a one-dimensional vector.
- The vector is passed to one or more fully connected layers.
- The network combines learned feature information to calculate class scores.
- An output function such as Softmax may convert scores into class probabilities.
- The class with the highest predicted score/probability is selected as the model output.
Example: If the image contains a cat, features associated with whiskers, ears and fur may contribute to a high score for the “Cat” class.
What do early and later CNN layers detect?
| Initial layers | Deeper / later layers |
|---|---|
| Simple edges, lines, colour contrasts, corners and basic textures. | Combinations of simple patterns, object parts, shapes and more complex semantic features. |
| Low-level visual information. | Higher-level patterns useful for recognising objects or classes. |
Whole CNN process — notebook answer (PDF page 27)
- Give a digital image to the CNN as input.
- The convolution layer applies learned filters to detect features and create feature maps.
- The ReLU layer changes negative activations to zero and introduces non-linearity.
- The pooling layer reduces feature-map size while retaining important information.
- These operations may be repeated through multiple convolution and pooling stages to learn increasingly complex features.
- The final feature maps are flattened into a vector.
- The fully connected layer calculates scores or probabilities for possible classes.
- The class with the highest score is selected as the prediction.
Textbook Exercise — Test Yourself (PDF pages 28–29)
Each textbook MCQ is reproduced in meaning and followed by its answer and explanation.
Q1. What is the primary objective of the Convolution Layer in a CNN?
Options: A) Flatten input image; B) Assign importance to various aspects/objects; C) Reduce spatial size; D) Perform element-wise multiplication of image arrays.
Correct answer: B. The convolution layer uses learnable filters to detect and emphasise useful features. Element-wise multiplication and summation are the mathematical operations used by the filter, but the layer's main purpose is feature extraction.
Q2. Which is an example of computer vision?
Options: A) Rescaling an image; B) Correcting brightness; C) Object detection in images/videos; D) Changing image tones.
Correct answer: C. Object detection interprets an image to identify and locate objects. The other options are image-processing operations.
Q3. How is resolution typically expressed?
Options: A) Width and height, such as 1280×1024; B) Brightness 0–255; C) Total pixels such as 5 MP; D) Arrangement in a 2D grid.
Correct answer: A. Width × height is a common resolution notation. Total pixel count or megapixels is another convention, but option A is the expected answer.
Q4. What is the core task of image classification?
Options: A) Identify objects and locations; B) Segment pixels; C) Assign one label from fixed categories; D) Detect object instances.
Correct answer: C. Image classification assigns a class label to the whole image.
Q5. What is the function of the ReLU layer?
Options: A) Reduce image size; B) Assign importance; C) Remove negative values and retain positive values; D) Perform convolution.
Correct answer: C. ReLU(x) = max(0,x); negative values become zero and positive values remain unchanged.
Q6. Object detection and handwriting recognition are examples of tasks associated with:
Options: A) Computer vision; B) Image processing; C) Both; D) Neither.
Correct answer: A. These tasks require interpreting visual content. Image processing may be used as a supporting step, but the tasks themselves are computer-vision applications.
Q7. What does a pixel value represent?
Options: A) Pixel width; B) Brightness or colour; C) Pixel height; D) Image resolution.
Correct answer: B. A pixel value represents intensity/brightness in grayscale or channel intensity in a colour image.
Q8. What is the range of pixel values in a common 8-bit byte image?
Options: A) 0–10; B) 0–100; C) 0–1000; D) 0–255.
Correct answer: D. An 8-bit unsigned value has 2⁸ = 256 possible values, from 0 through 255.
Q9. In a grayscale image, what does the darkest shade represent?
Options: A) Total presence of colour; B) Zero pixel value; C) Lightest grey; D) Maximum pixel value.
Correct answer: B. Zero represents black, the darkest shade.
Q10. In an RGB image, what does an intensity value of 0 in a channel represent?
Options: A) Full presence of colour; B) No presence of that channel's colour; C) Maximum brightness; D) Minimum brightness.
Correct answer: B. A channel value of zero means that channel contributes no intensity. A complete pixel of (0,0,0) is black.
Q11. Assertion–Reason: Object detection is more complex than image classification because it identifies both the presence and location of objects. Reason: It must classify objects and localise their spatial extent.
Correct answer: A. Both statements are true, and the reason correctly explains the assertion. Object detection must determine what objects are present and where they occur.
Q12. Assertion–Reason: Grayscale images contain shades from black to white, each pixel is one byte, and image size is height × width. Reason: Grayscale images use three intensities per pixel, typically 0–255.
Correct answer: C. The assertion is true for an 8-bit grayscale image. The reason is false: three channel values are used in a typical RGB image, not a grayscale image.
Textbook Reflection Time — Complete Solutions (PDF pages 30–31)
Q1. A smartphone camera recognises a dog by analysing edges, shapes and colours. Identify the technology and explain how it works.
Answer: Computer Vision, commonly using an image-classification model.
- The camera captures an image of the dog.
- The software prepares the image, for example by resizing and normalising it.
- The model analyses visual patterns such as edges, shapes, colours and textures.
- A trained machine-learning or deep-learning model compares the learned patterns with patterns associated with known classes.
- The model produces class scores or probabilities.
- The class with the highest suitable score is displayed, such as “Dog”.
The model's accuracy depends on training data, lighting, camera quality, viewpoint and how closely the new image resembles the examples used during training.
Q2. Name two smartphone apps that use computer vision and explain how they improve convenience.
Answer:
- Google Translate: Its camera feature uses OCR to recognise text in a sign and translation technology to show the meaning in another language. This helps travellers understand signs without typing every word.
- Google Lens: It analyses camera images to identify objects, products, plants or text and can provide related information. This saves time compared with manually describing or searching for an item.
Other acceptable examples include Snapchat/Instagram face filters and camera-based QR or document-scanning applications.
Q3. How is an RGB image different from a grayscale image?
A grayscale image stores one intensity value per pixel, representing a shade from black to white. An 8-bit grayscale pixel ranges from 0 to 255. An RGB image stores three values per pixel—Red, Green and Blue—each commonly ranging from 0 to 255. Combining the three channel intensities creates colour. Thus, grayscale has one channel while RGB has three channels.
Q4. Determine the colours for the given RGB values: (i) 0,0,0; (ii) 255,255,255; (iii) 0,0,255; (iv) 0,255,0.
| RGB values (R,G,B) | Colour | Explanation |
|---|---|---|
| (0,0,0) | Black | All channels have zero intensity. |
| (255,255,255) | White | All channels have maximum intensity. |
| (0,0,255) | Blue | Only blue has maximum intensity. |
| (0,255,0) | Green | Only green has maximum intensity. |
Q5. Briefly describe the purpose of the convolution operator in image processing.
Convolution applies a kernel (small matrix of weights) to an image. The kernel slides over local image regions, multiplies corresponding pixel and kernel values and adds the products to create output values. Different kernels can enhance edges, sharpen or blur images. In CNNs, convolution is used to extract useful features such as edges, textures and patterns.
Q6. Name the different CNN layers. What do initial layers detect compared with later layers?
The four layers covered in this unit are:
- Convolution layer
- Rectified Linear Unit (ReLU) layer
- Pooling layer
- Fully Connected layer
Initial convolution layers generally detect low-level features such as edges, colour contrasts, corners and simple textures. Deeper layers combine these features to detect more complex patterns, object parts and shapes. The fully connected layer uses the extracted information to produce class predictions.
Q7–Q8. A researcher wants to improve workplace safety in a manufacturing plant. Explain two computer-vision applications, techniques and their benefits.
Application 1 — Personal protective equipment (PPE) monitoring: Install cameras in designated zones and use an object-detection model to identify workers and safety equipment such as helmets, high-visibility vests and safety shoes. The system can flag a possible missing item for human review and notify the safety supervisor. This can reduce the time required for routine checks. The system should account for occlusion, camera angle, lighting and privacy requirements.
Application 2 — Restricted-zone and machine-safety monitoring: Use object detection and person tracking to detect when a person enters a hazardous machine zone or approaches moving equipment. A defined virtual boundary can trigger an alert to the operator or safety system. For higher-risk use, the vision system must be validated and integrated with certified safety controls; a camera-only prediction should not be treated as the sole emergency protection.
Efficiency benefit: Continuous monitoring can help identify hazards early, reduce manual inspection workload and support incident analysis while keeping human supervisors responsible for safety decisions.
Q9. Distinguish image classification, classification with localisation, object detection and instance segmentation with examples.
| Task | Output | Example |
|---|---|---|
| Image classification | One label for the whole image. | “Dog” for a photograph containing a dog. |
| Classification + localisation | Class label plus location, usually one bounding box for a single object. | “Dog” and one box around the dog. |
| Object detection | Labels and bounding boxes for multiple object instances. | Boxes around two dogs, a person and a car. |
| Instance segmentation | Separate pixel-level mask for each detected instance, with a class label. | Each dog receives its own pixel mask. |
Q10. How do computer-vision drones improve agriculture? What parameters can they analyse for crop health and disease?
Efficiency improvements: Drones can cover large fields quickly, collect repeatable aerial images and monitor areas that are difficult to inspect on foot. Computer-vision algorithms can automatically identify suspicious regions, map variation across a field and direct farmers to areas needing attention. This reduces time-consuming manual inspection and supports more targeted use of water, fertiliser and crop-protection measures.
Indicators/parameters:
- Leaf colour and colour changes such as yellowing or browning.
- Leaf shape, spots, lesions, holes and visible disease patterns.
- Canopy cover, plant density and gaps in crop rows.
- Plant height, size and growth uniformity where depth or multi-view data is available.
- Vegetation indices such as NDVI when multispectral or near-infrared sensors are used.
- Signs of wilting, water stress, pest damage and lodging.
Image-based warnings should be verified through field inspection or expert assessment before treatment decisions are made.
Q11. A self-driving car sometimes classifies pedestrians as cyclists in low light. How would you improve detection and reliability?
Answer: Use a systematic model-improvement and safety-validation process:
- Analyse errors: Collect misclassified examples and determine whether the issue is caused by darkness, motion blur, occlusion, camera exposure or similar body silhouettes.
- Improve training data: Add diverse, correctly labelled pedestrian and cyclist images captured at night, dusk, in rain, under streetlights and from different camera angles.
- Balance classes: Ensure that the training set contains enough examples of pedestrians and cyclists in low-light conditions.
- Apply suitable augmentation: Use realistic brightness, contrast, noise, blur and weather augmentation without creating unrealistic examples.
- Improve sensing: Use better low-light cameras, suitable exposure settings and, where appropriate, combine camera data with radar or LiDAR.
- Review model design: Tune the object detector, resolution, confidence thresholds and class-specific training strategy. Evaluate whether a specialised low-light enhancement step helps without introducing artefacts.
- Evaluate by condition: Measure pedestrian recall, precision, false negatives, false positives and confusion between pedestrian and cyclist classes, with separate night-time results.
- Test safely: Perform simulation, closed-course tests and extensive scenario testing before deployment. Monitor performance after release.
- Fail safely: If confidence is low or sensors disagree, the vehicle should follow its validated fallback behaviour rather than assuming the object is harmless.
The objective is not merely to improve average accuracy; it is to reduce dangerous pedestrian misses and demonstrate reliable performance in difficult conditions.
Additional CBSE Board Examination Practice
These questions are additional teacher-created practice based on the chapter. They supplement, rather than replace, the textbook exercises.
A. MCQs
1. Which task produces a pixel-level mask for every object instance?
2. A 640 × 480 image contains how many pixels?
3. Which RGB value represents yellow?
4. Which feature is generally most distinctive for locating a small image patch?
5. Which CNN layer replaces negative values with zero?
6. Which pooling method returns the average of values in its window?
B. Assertion–Reason
Options: (A) Both true and Reason explains Assertion; (B) Both true but Reason does not explain Assertion; (C) Assertion true, Reason false; (D) Assertion false, Reason true.
1. Assertion: RGB images normally use three channels. Reason: Each pixel is represented by red, green and blue intensity values.
2. Assertion: A 3 × 3 kernel applied to an 8 × 8 image with stride 1 and no padding produces a 6 × 6 output. Reason: Output size is input size minus kernel size plus one.
3. Assertion: Average pooling selects the largest value in a region. Reason: Max pooling selects the largest value in a region.
4. Assertion: Image classification usually gives a label to the whole image. Reason: Instance segmentation assigns labels to individual pixels for each object instance.
C. Short-answer questions (2–3 marks)
1. Define computer vision and give two applications.
2. Differentiate between a pixel and resolution.
3. What is a feature map?
4. Why are corners considered good image features?
5. State two benefits of pooling in a CNN.
D. Long-answer questions (4–5 marks)
1. Explain the difference between image processing and computer vision.
2. Explain the four computer-vision tasks with examples.
3. Explain how a CNN processes an image.
4. Explain the convolution operation and the role of a kernel.
E. Numerical questions with notebook-style solutions
1. Calculate the total pixels and megapixels in an image of 1920 × 1080.
Megapixels = 2,073,600 ÷ 1,000,000 = 2.0736 MP ≈ 2.07 MP.
2. How many possible intensity values are available in an 8-bit channel?
Possible values = 2⁸ = 256.
Range = 0 to 255 inclusive.
3. Find the uncompressed storage for a 100 × 100 8-bit grayscale image.
Each grayscale pixel uses 1 byte.
Storage = 10,000 × 1 = 10,000 bytes (about 9.77 KiB), excluding headers and metadata.
4. Find the uncompressed storage for a 100 × 100 8-bit RGB image.
Each RGB pixel uses 3 bytes.
Storage = 10,000 × 3 = 30,000 bytes (about 29.3 KiB), excluding headers and metadata.
5. Apply ReLU to the values −4, 0, 2, −1, 7.
ReLU(−4)=0; ReLU(0)=0; ReLU(2)=2; ReLU(−1)=0; ReLU(7)=7.
Output: 0, 0, 2, 0, 7.
6. Find max and average pooling for the values 4, 8, 2, 6.
Average = (4+8+2+6) ÷ 4 = 20 ÷ 4 = 5.
Chapter Summary, Definitions and Quick Revision
Important definitions
| Term | Meaning |
|---|---|
| Computer Vision | AI field that interprets visual data. |
| Image Processing | Operations that enhance or modify image data. |
| Pixel | Smallest information unit in a digital image. |
| Resolution | Pixel dimensions or total pixel count of an image. |
| Grayscale | Single-channel image with shades from black to white. |
| RGB | Three-channel colour model: Red, Green and Blue. |
| Feature | Useful visual information such as a point, edge, corner or texture. |
| Convolution | Sliding a kernel over an image and summing element-wise products. |
| Kernel | Small matrix of weights used to filter an image. |
| Feature map | Output produced by applying a filter/kernel. |
| CNN | Deep-learning network that learns image features for visual tasks. |
| ReLU | Activation function that outputs max(0,x). |
| Pooling | Operation that reduces feature-map spatial size. |
| Fully connected layer | Layer that combines extracted features to produce class scores. |
| OCR | Optical Character Recognition; converts text in an image into machine-readable text. |
Formula sheet
Key differences to memorise
| Concept A | Concept B | Core distinction |
|---|---|---|
| Image processing | Computer vision | Modifies/enhances pixels vs interprets visual meaning. |
| Grayscale | RGB | One channel vs three channels. |
| Classification | Object detection | Whole-image label vs labels and locations of object instances. |
| Max pooling | Average pooling | Maximum value vs arithmetic mean. |
| Convolution | Pooling | Extracts features using filters vs downsamples feature maps. |
Exam preparation checklist
- Learn the definitions of computer vision, pixel, resolution, kernel, feature map and CNN.
- Practise RGB colour values and grayscale pixel ranges.
- Be able to compare the four computer-vision tasks.
- Show each multiplication and addition step in convolution numericals.
- Memorise the order and purpose of CNN layers.
- For case studies, identify the problem, input image/data, target class, model task and safety/privacy considerations.
PDF Page-wise Coverage and Verification
The 31-page uploaded PDF was reviewed in sequence. Text was extracted from every page, and rendered page images were inspected to capture diagrams, infographics, array tables, screenshots and visual examples. The page map below records where the content is represented in these notes.
| PDF pages | Original material | Notes location |
|---|---|---|
| 1–2 | Unit title, summary, objectives, outcomes, introduction, Emoji Scavenger Hunt and human/computer vision analogy | Overview and 5.1 Introduction |
| 3–5 | AI relationship, CV vs image processing, application examples and CV task overview | Introduction, applications and tasks |
| 6 | Classification, localisation, object detection and instance segmentation diagrams/text | 5.2 Computer Vision Tasks |
| 7–8 | Pixel concept, magnification visual, resolution, byte values and grayscale definition | Basics of Images |
| 9–10 | Grayscale example, RGB colour wheel/channels, RGB experiment questions and channel illustration | Grayscale and RGB Images |
| 11–13 | Piskel activity, Lobe, Teachable Machine, Smart Sorter, coral reef and bleaching use case/resources | 5.3 No-Code AI Tools |
| 14–15 | Image-patch feature activity, flat areas, edges, corners and patch comparison illustration | 5.4 Image Features |
| 16–18 | Image filter examples, kernel experimentation and discussion prompts | 5.5 Convolution and kernel activity |
| 19–20 | Convolution definition, image/kernel arrays, kernel explanation and zero padding diagram | Convolution, kernel and padding |
| 21 | 8×8 input array, 3×3 kernel, blank output worksheet and convolution summary | Completed numerical worksheet |
| 22–23 | CNN definition, prediction example, CNN architecture diagram and convolution layer | 5.6 CNN and 5.7.1 |
| 24–26 | ReLU graphs, feature-map illustration, pooling diagram, max/average pooling and fully connected layer | 5.7.2–5.7.4 |
| 27 | CNN summary flow diagram and written explanation prompt | Whole CNN process |
| 28–29 | All 10 MCQs and 2 Assertion–Reason questions | Textbook Test Yourself |
| 30–31 | All reflection questions, manufacturing safety, agriculture drones and autonomous vehicle case | Textbook Reflection Time solutions |
- Page 8's 8-bit explanation is corrected mathematically: 8 bits produce 256 possible values (0–255), not 255 possible values.
- Page 25 repeats the Max Pooling description under Average Pooling. The correct Average Pooling operation is the arithmetic mean.
- Page 21's raw convolution sums are negative because the kernel weights are negative. The notes preserve raw sums and explain that image display may require normalisation or clipping.
- The PDF's medical-imaging text appears to have OCR errors (“20 scan”, “30 models”); it is interpreted as 2D scan images and 3D models.
- Some activity prompts are open-ended and have no single textbook answer; suggested model responses are supplied and labelled as such.
Source links retained: Emoji Scavenger Hunt, W3Schools RGB colour tool, Piskel, Teachable Machine/Lobe references as presented in the PDF, Setosa image-kernel demonstration, Orange coral computer-vision project folder.
TEXTBOOK SOLUTION
Step-by-step solved textbook exercises, derivations, and solutions.
Unit 5: Computer Vision
Complete textbook back-exercise solutions in simple, student-friendly language. Long-answer questions are explained in sufficient detail, with examples, comparison tables and worked steps where required.
Test Yourself – Multiple-Choice Questions
Assertion–Reason Questions
Reason: Object detection algorithms need to not only classify the objects present in an image but also accurately localise them by determining their spatial extent.
Correct option: A) Both A and R are true and R is the correct explanation of A.
Explanation: The assertion is true because image classification gives a label to an image, whereas object detection identifies the objects and also locates them, usually with bounding boxes. The reason is also true and correctly explains why object detection involves an additional task compared with simple image classification.
Reason: Grayscale images are represented using three intensities per pixel, typically ranging from 0 to 255.
Correct option: C) A is true but R is false.
Explanation: The assertion is true according to the chapter. A grayscale image uses one intensity value for each pixel, generally stored as one byte with values from 0 to 255. Its dimensions are represented by height × width. The reason is false because three intensity values per pixel are used in an RGB colour image (Red, Green and Blue), not in a grayscale image.
Reflection Time – Detailed Solutions
Answer: The technology used in this scenario is Computer Vision, a branch of Artificial Intelligence (AI). Computer Vision enables computers and machines to understand and interpret visual information such as images and videos.
When the smartphone camera is pointed at a dog, the following steps take place:
- Image capture: The camera captures an image of the dog. The image is represented digitally as a collection of pixels.
- Image processing: The software processes the image and may adjust or prepare it for analysis.
- Feature extraction: The system identifies useful visual features such as edges, shapes, colours, ears, eyes and the outline of the animal.
- Model analysis: A trained machine-learning or deep-learning model analyses these features and compares the patterns with what it learned from labelled training images.
- Prediction: The model predicts the most likely category, such as “dog”, and may provide a confidence score.
- Display of result: The application displays the predicted label to the user.
Thus, Computer Vision allows a smartphone to analyse visual data and recognise objects in a way that performs a task similar to human visual recognition.
Answer: Two smartphone applications that use Computer Vision are:
- Google Lens: Google Lens uses the phone's camera to recognise objects, plants, animals, products and text. It can identify an object, provide information about it, scan text and help search for similar products. It saves time because users can search using an image instead of typing a long description.
- Google Translate: The camera translation feature uses Computer Vision and Optical Character Recognition (OCR) to identify written words in an image. It can then translate the recognised text into the selected language. For example, a traveller can point the phone at a signboard or menu written in another language and understand its meaning quickly.
These applications make everyday tasks easier by reducing manual typing, helping users understand unfamiliar objects and languages, and providing information quickly through a camera.
Answer: An RGB image and a grayscale image differ in the way they represent colours and store pixel information.
| Basis | RGB Image | Grayscale Image |
|---|---|---|
| Meaning | A colour image made using Red, Green and Blue components. | An image containing different shades of gray, from black to white. |
| Channels | Has three channels: Red (R), Green (G) and Blue (B). | Has one intensity channel. |
| Pixel values | Each pixel has three intensity values, one for each channel. | Each pixel has one intensity value. |
| Value range | Each channel generally ranges from 0 to 255. | Pixel intensity generally ranges from 0 to 255. |
| Storage | Usually requires more storage than a comparable 8-bit grayscale image. | Usually requires less storage than an RGB image of the same dimensions. |
| Example | A normal colour photograph taken by a smartphone. | A black-and-white photograph. |
In an RGB image, different combinations of red, green and blue intensities create different colours. In a grayscale image, the single pixel value represents the brightness of that pixel. For example, 0 represents black and 255 represents white.
Answer: In the RGB colour model, each of the Red (R), Green (G) and Blue (B) components can have a value from 0 to 255.
| Part | RGB values | Colour | Reason |
|---|---|---|---|
| (i) | R = 0, G = 0, B = 0 | Black | All three colour components have zero intensity. |
| (ii) | R = 255, G = 255, B = 255 | White | All three colour components have maximum intensity. |
| (iii) | R = 0, G = 255, B = 0 | Green | Only the green component has maximum intensity. |
| (iv) | R = 0, G = 0, B = 255 | Blue | Only the blue component has maximum intensity. |
Therefore, the answers are: (i) Black, (ii) White, (iii) Green and (iv) Blue.
Answer: Convolution is a mathematical operation used in image processing to modify an image or extract useful features from it. It works by applying a small matrix called a kernel or filter to the image.
The kernel moves across the image. At each position, the pixel values covered by the kernel are multiplied by the corresponding kernel values. These products are then added to calculate a new output pixel value. Repeating this operation over the image produces an output image called a feature map or filtered image.
Different kernels produce different effects. For example, some kernels can detect edges, sharpen an image, blur an image or highlight particular patterns. Convolution is also an important operation in the Convolutional Neural Network (CNN), where it helps extract image features for recognition and classification.
Answer: A Convolutional Neural Network (CNN) is a Deep Learning algorithm mainly used for analysing images. It learns visual features from input images and uses them to identify or classify objects.
The chapter describes four main layers of a CNN:
- Convolution Layer: This layer applies filters or kernels to the input image to extract useful features. The initial convolution layers generally identify low-level features such as edges, lines, colours, corners and simple textures. The output is called a feature map or activation map.
- Rectified Linear Unit (ReLU) Layer: This layer removes negative values from the feature map and keeps positive values unchanged. It introduces non-linearity into the network and helps important activations stand out.
- Pooling Layer: This layer reduces the spatial size of the feature map while retaining important information. Max pooling selects the maximum value from a region, while average pooling calculates the average value. Pooling makes processing more manageable and helps the model become less sensitive to small changes in an image.
- Fully Connected Layer: This is the final classification stage described in the chapter. It uses the extracted features to predict the class or label of the input image. For example, it may classify an image as a cat, dog, car or bicycle.
Difference between initial and later layers:
- Initial layers: Detect simple, low-level features such as edges, colour changes, lines, corners and basic textures.
- Middle layers: Combine simple features to identify more meaningful patterns and shapes, such as parts of an object.
- Later layers: Detect complex, high-level features and combinations of patterns that help recognise complete objects, such as a face, animal or vehicle.
Thus, a CNN gradually moves from detecting simple visual details to understanding complex objects and finally predicting the correct class.
Answer: Computer Vision can improve safety in a manufacturing plant by continuously analysing images and video captured by cameras. I would implement the following two applications:
Application 1: Personal Protective Equipment (PPE) Detection
Workers in a manufacturing plant may need to wear safety helmets, gloves, goggles, reflective jackets and safety shoes. If a worker enters a restricted production area without the required equipment, the system should identify the violation.
- Install cameras at entry points and important work areas.
- Use an object-detection model trained with images of workers and protective equipment such as helmets, jackets and gloves.
- The model analyses video frames and detects people and the required safety items. Object detection methods such as YOLO or other trained detection models can be used.
- Compare the detected equipment with the safety requirements for that particular area.
- If required equipment is missing, generate an alert for the safety supervisor or control room.
Contribution to safety: This system helps identify unsafe entry or work practices quickly, encourages employees to follow safety rules and reduces the risk of head, eye or body injuries. It also provides records that can help management review safety compliance.
Application 2: Hazardous-Zone Monitoring and Accident Detection
Machines such as robotic arms, conveyor belts and cutting equipment can create dangerous zones. A worker entering a restricted zone while a machine is operating may face serious injury.
- Install cameras to monitor dangerous machine areas, walkways and restricted zones.
- Use object detection to identify people, vehicles and moving machinery in the video.
- Use image localisation or object tracking to estimate the position and movement of a person across successive frames.
- Define virtual safety boundaries around hazardous machines. If a person enters a restricted area, the system generates an alert.
- For suitable systems, connect the alert to a warning light, alarm or machine-control system. Any automatic machine stop must be designed and validated as part of a certified safety system, not relied upon as an untested camera feature.
- Video analysis can also help identify events such as a person falling or remaining motionless, prompting a supervisor to investigate.
Contribution to safety: The system can warn workers and supervisors about dangerous situations, reduce the chance of accidental contact with machinery and support faster emergency response. It can also help identify unsafe movement patterns and improve the arrangement of work areas.
Conclusion: PPE detection and hazardous-zone monitoring are two useful Computer Vision applications for manufacturing safety. They can improve awareness and help prevent accidents. However, cameras and AI alerts should support, not replace, physical safety barriers, emergency switches, staff training and regular safety inspections.
Answer: Computer Vision performs different tasks to understand the content of an image. The four tasks below differ in whether they identify an object, locate it or mark its individual pixels.
| Task | Meaning | Example |
|---|---|---|
| Image Classification | Assigns one label from a fixed set of categories to an input image. It tells what the image contains but does not identify the exact location of the object. | Given a photograph containing a cat, the model predicts “Cat”. |
| Classification with Localisation | Identifies the object and also determines its location in the image. In the chapter, this task is described for a single object. | The model predicts “Cat” and draws a bounding box around the cat. |
| Object Detection | Finds and classifies multiple object instances in an image or video and identifies the location of each, usually with a bounding box. | In a street image, the model identifies a car, two people and a bicycle and marks each with a separate box. |
| Instance Segmentation | Detects individual object instances, assigns each a category and labels the pixels belonging to each instance. It provides a more detailed outline than a rectangular bounding box. | In an image containing two dogs, the model identifies each dog separately and marks the pixels belonging to each one. |
In simple words: Image classification tells us what is present. Classification with localisation tells us what and where for a single object. Object detection identifies and locates multiple objects. Instance segmentation identifies each object and marks its exact pixel region.
(a) How does the integration of Computer Vision technology with drones improve efficiency in agricultural practices compared to traditional methods?
Answer: Traditional farming methods often depend on farmers manually walking through fields and visually inspecting crops. This process can take a long time, especially on large farms, and some unhealthy plants may be missed. Agricultural drones equipped with cameras and Computer Vision improve efficiency in the following ways:
- Large-area coverage: Drones can capture images of large fields in a comparatively short time, reducing the need for manual inspection of every part of the farm.
- Early disease detection: Computer Vision algorithms can analyse images and identify visible signs of disease, pest damage or stress at an early stage.
- Regular monitoring: Drones can capture images repeatedly, allowing farmers to compare crop conditions over time.
- Targeted treatment: By identifying affected areas, farmers can focus irrigation, fertiliser or pest-control measures where they are needed instead of treating the entire field uniformly.
- Crop growth and yield estimation: Image analysis can help estimate plant coverage, crop density and other indicators related to crop growth and expected yield.
- Reduced labour and time: Automated image collection and analysis can reduce manual effort and help farmers make quicker, data-supported decisions.
Therefore, drones combined with Computer Vision make crop monitoring faster, more systematic and more precise than relying only on manual visual inspection.
(b) What are some key indicators or parameters that Computer Vision algorithms can analyse to assess crop health and detect diseases?
Answer: Computer Vision algorithms can analyse several visual indicators in crop images, including:
- Leaf colour: Yellowing, browning or unusual colour changes may indicate nutrient deficiency, disease or water stress.
- Leaf spots and patterns: Dark spots, patches, lesions, mould-like growth or unusual markings may indicate infection or pest damage.
- Leaf shape and texture: Curling, wilting, holes, roughness or deformation can indicate unhealthy plants.
- Plant size and growth: Plant height, canopy size, leaf area and growth differences can help identify weak or poorly developing crops.
- Plant density and coverage: The amount of ground covered by healthy vegetation can indicate crop development and reveal gaps in the field.
- Colour-based vegetation indicators: Images from suitable cameras or sensors can be used to calculate vegetation indices, such as NDVI, which help assess plant vigour. NDVI generally requires near-infrared and red-band information, not only an ordinary RGB photograph.
- Visible pest or disease damage: The algorithm can look for eaten leaves, damaged stems, discoloured areas and other patterns associated with pests or diseases.
By combining these indicators with field observations, farmers can identify possible problems and take timely corrective action.
Answer: A self-driving car must identify pedestrians, cyclists, vehicles, traffic signs and other road objects correctly. Misclassifying a pedestrian as a cyclist can create a serious safety risk. I would improve the system through the following steps:
- Analyse the errors: First, collect and examine examples in which pedestrians were incorrectly classified as cyclists. Identify whether the errors occur because of darkness, shadows, motion blur, unusual clothing, occlusion or camera angle. This helps determine the actual cause of the problem.
- Improve the training dataset: Add more correctly labelled images and video frames of pedestrians and cyclists captured in different lighting conditions. The dataset should include night scenes, streetlights, headlights, rain, fog, different seasons, different clothing and different pedestrian poses. It should also contain difficult examples in which pedestrians and cyclists look similar.
- Balance the classes: Ensure that the training dataset contains sufficient examples of both pedestrians and cyclists. If one category has far more examples than the other, the model may become biased towards the more common category.
- Improve low-light image quality: Use suitable image-preprocessing methods such as brightness and contrast adjustment, noise reduction and low-light enhancement. These methods can make important features more visible. However, preprocessing must be tested carefully so that it does not create misleading patterns or remove useful details.
- Use suitable object-detection models: Train and compare reliable object-detection models using the improved dataset. The model should learn the visual differences between a pedestrian and a cyclist, including body posture, bicycle structure, wheels and the relationship between a person and a bicycle.
- Use additional sensors where available: Combine camera information with other sensors such as LiDAR or radar. Sensor fusion can provide additional information about an object's distance, position and movement, especially when camera visibility is poor.
- Track objects across video frames: Instead of making a decision from only one frame, use object tracking to follow the same object over time. The system can use changes in movement and position to help distinguish a walking pedestrian from a cyclist. Tracking should support, not replace, reliable object classification.
- Test under real-world conditions: Evaluate the model using separate test data that includes daylight, night, glare, rain, fog, crowded roads and partially hidden pedestrians. Measure class-wise precision, recall and confusion matrices, paying particular attention to pedestrians incorrectly classified as cyclists.
- Reduce dangerous false negatives: Give special attention to cases where a pedestrian is not detected or is assigned the wrong class. The system should be designed conservatively so that uncertain detections trigger safe behaviour rather than an unsafe assumption.
- Monitor performance after deployment: Continuously monitor system performance, collect difficult cases safely, update the dataset and retrain or validate the model when necessary. Updates must pass safety testing before being used on public roads.
Conclusion: Accurate pedestrian detection requires good-quality and diverse training data, suitable image processing, reliable object-detection models, video tracking, sensor fusion and extensive testing. The most important objective is not simply to improve the model's average accuracy, but to ensure that it behaves safely and reliably in difficult real-world road conditions.
Quick Revision – Important Concepts
Important definitions
- Computer Vision: A branch of AI that enables computers to interpret and understand images and videos.
- Image Processing: The process of modifying or enhancing images, for example by changing brightness, resizing or adjusting tones.
- Pixel: The smallest unit of information in a digital image.
- Resolution: The number of pixels in an image, often expressed as width × height.
- Pixel Value: A numerical value representing the brightness or colour intensity of a pixel.
- Grayscale Image: An image represented by one intensity value per pixel, usually from 0 (black) to 255 (white).
- RGB Image: A colour image represented using Red, Green and Blue channels.
- Kernel: A small matrix moved across an image to perform convolution and produce a filtered output.
- Feature Map: The output produced by applying a filter or convolution operation to an image.
- CNN: A deep-learning model designed to learn patterns and features from image data.
Four CNN layers
| Layer | Main function |
|---|---|
| Convolution | Extracts visual features using kernels. |
| ReLU | Removes negative values and introduces non-linearity. |
| Pooling | Reduces feature-map dimensions while retaining important information. |
| Fully Connected | Uses learned features to predict the final class. |
RGB colour combinations to remember
| RGB value | Colour |
|---|---|
| (0, 0, 0) | Black |
| (255, 255, 255) | White |
| (255, 0, 0) | Red |
| (0, 255, 0) | Green |
| (0, 0, 255) | Blue |
| (255, 255, 0) | Yellow |
| (0, 255, 255) | Cyan |
| (255, 0, 255) | Magenta |
Worked convolution practice from page 21
The textbook gives the kernel:
For each output position, multiply the corresponding 3 × 3 image region by the kernel and add the products. Since the input is 8 × 8 and the kernel is 3 × 3, using valid convolution without padding gives a 6 × 6 output.
Raw output values:
These are direct arithmetic sums using the printed pixel values and kernel. If an application clips values to the 8-bit range 0–255, all these negative values become 0. Padding or a different output convention can change the output dimensions.
IMPORTANT QUESTION
High-yield board questions, previous year questions (PYQs), and model answer keys.
Important Questions Being Compiled
Board blueprint and previous years' exam questions for this chapter will be live soon.