Computer Vision (CV): Pixels, Channels & Convolution Formulas & Cheat Sheet
Complete chapter-wise reference, step-by-step formula explanations, structured table, and board exam trap warnings.
Core Concepts & Theoretical Foundations
- Image as Matrix: A digital image is an 2D/3D numerical matrix of pixels, where each pixel has an intensity value ranging from 0 (black) to 255 (white).
- Color Channels: Grayscale (1 channel matrix, 8-bit depth); RGB (3 channels: Red, Green, Blue matrices, 24-bit total depth).
- Computer Vision Tasks: (1) Image Classification (What is in the image?), (2) Object Localization (Where is it with bounding box?), (3) Object Detection (Locating multiple objects), (4) Semantic Segmentation (Pixel-level categorization).
- Convolutional Filter (Kernel): A small matrix (e.g., 3x3) slid over the input image to compute dot products, performing blurring, sharpening, or edge detection.
Chapter Formulas & Equations (2 entries)
| # | Topic / Formula Name | Mathematical Form & Equation | Conditions, Meaning & Board Tips |
|---|---|---|---|
| 1 | RGB Image Memory Size Formula |
|
Uncompressed raw memory occupied by a digital bitmap image matrix. |
| 2 | Convolution Feature Map Dimension Formula |
|
Where W is input width, F is filter size, P is padding, and S is stride length. |
CBSE Board Exam Tips & Frequent Pitfalls
- State pixel values explicitly: 0 represents pure black, 255 represents pure white, 128 represents neutral gray.
- Note that in OpenCV, the default color ordering is BGR (Blue-Green-Red) rather than RGB.
Step-by-Step Worked Board Exam Examples
Example 1: Calculate the total number of pixel intensity values stored for an uncompressed RGB image with resolution 1920 x 1080.
Step 1: Total pixels = 1920 * 1080 = 2,073,600 pixels.
Step 2: Each pixel has 3 color channels (Red, Green, Blue).
Step 3: Total intensity values = 2,073,600 * 3 = 6,220,800 values.
Common Mistakes to Avoid in Exam
- Thinking an RGB image can be stored in a single 2D matrix; it requires a 3D array (Height x Width x 3).
- Confusing Object Detection with Image Classification.
Target Practice Questions
Q1. What is 'Stride' in a Convolutional Neural Network?
Correct Answer: Stride is the number of pixels by which the convolution kernel/filter slides across the input image matrix at each step.
Frequently Asked Questions
Q. Which OpenCV function is used to convert an RGB image to Grayscale?
cv2.cvtColor(image, cv2.COLOR_BGR2GRAY).