Knowledge / Electronics and Communication Engineering / Image and video processing basics

Image and video processing basics

Electronics and Communication Engineering (B.E./B.Tech) · Systems · free study notes for exams, placements and interviews

In short

Image processing treats a picture as a two-dimensional signal f(x, y) of light intensity, and video adds a third dimension — time — so that redundancy between successive frames can be exploited. The subject sits at the meeting point of signals, mathematics and computing: sampling and quantization, filtering, transforms, segmentation, compression and codecs. In Indian universities it is a core or elective paper in the ECE/EEE syllabus, and GATE EC/IN sets questions on 2D convolution, histogram operations, masks and entropy-based compression. Employers hiring for these skills include ISRO and NRSC (satellite imagery), DRDO, Samsung R&D, Qualcomm, Ittiam, Nvidia, Bosch, Tata Elxsi, KLA and L&T Technology Services, plus every camera-ISP, ADAS, medical-imaging and CCTV-analytics team in the country.

Explained

Image formation, sampling and quantization

Colour models and colour processing

Intensity transformations and spatial filtering

Frequency-domain processing and transforms

Segmentation, edges and morphology

Image compression

Video fundamentals and coding

Key points

Formulas and examples

Image model: f(x, y) = i(x, y) · r(x, y) — i = illumination (lux/arbitrary), r = reflectance (0 to 1)
Storage: b = M × N × k bits, with L = 2k grey levels (M, N = rows and columns in pixels)
Histogram equalization: s_k = (L − 1) · Σ_{j=0}^{k} n_j / (MN), rounded to the nearest integer
Spatial convolution: g(x, y) = Σ_s Σ_t w(s, t) · f(x − s, y − t)
Gradient: |∇f| = √(Gx² + Gy²) ≈ |Gx| + |Gy|; direction θ = tan⁻¹(Gy / Gx)
Laplacian (4-neighbour): ∇²f = f(x+1,y) + f(x−1,y) + f(x,y+1) + f(x,y−1) − 4f(x,y)
2D DFT: F(u, v) = Σ_{x=0}^{M−1} Σ_{y=0}^{N−1} f(x, y) · e−j2π(ux/M + vy/N)
2D DCT (JPEG block): F(u,v) = (1/4)·C(u)C(v)·Σ_x Σ_y f(x,y)·cos[(2x+1)uπ/16]·cos[(2y+1)vπ/16], C(0)=1/√2 else 1
Butterworth LPF: H(u, v) = 1 / [1 + (D(u,v)/D₀)2n] — D₀ = cut-off radius, n = order
MSE = (1/MN)·ΣΣ [f(x,y) − f̂(x,y)]²; PSNR = 10·log₁₀(MAX² / MSE) dB, MAX = 255 for 8-bit
Compression ratio CR = original bits / compressed bits; redundancy R = 1 − 1/CR
Entropy H = −Σ p_i · log₂ p_i bits/symbol (lower bound for lossless coding)
Raw video bitrate = width × height × bits per pixel × frame rate (bits/s)
SAD = Σ_i Σ_j |C(i, j) − R(i + dx, j + dy)| over a macroblock
Y = 0.299R + 0.587G + 0.114B (BT.601); Cb = 0.564(B − Y); Cr = 0.713(R − Y)

Example 1 — Storage and compression ratio. A colour image is 1024 × 768 with 8 bits per channel.

Example 2 — Histogram equalization (3-bit image, L = 8, 64 pixels).

r_kn_kp(r_k)CDFs_k = round(7 × CDF)
080.1250.1251
1100.1560.2812
2160.2500.5314
3140.2190.7505
4100.1560.9066
540.0630.9697
620.0311.0007
700.0001.0007

Example 3 — Sobel gradient at a pixel. The 3 × 3 neighbourhood is

101010
101010
909090

with Gx (vertical-edge mask) = [−1 0 1; −2 0 2; −1 0 1] and Gy (horizontal-edge mask) = [−1 −2 −1; 0 0 0; 1 2 1].

Example 4 — PSNR. An 8-bit image is compressed and the mean squared error between original and reconstruction is 25.

Example 5 — Video bitrate and the need for compression. Full HD 1920 × 1080, 4:2:0 at 8 bits, 25 fps.

AspectImage processingVideo processing
Signalf(x, y), two dimensionsf(x, y, t), adds time
Redundancy usedCoding, spatial, psychovisualAll of those plus temporal
Core toolDCT/wavelet transform codingMotion estimation + transform coding
StandardJPEG, JPEG 2000, PNGH.264, HEVC, VVC, AV1
Real-time limitPer-frame latencyFrame rate and buffer/delay budget
FilterTypeBest atWeakness
Averaging (box)Linear LPFGaussian noiseBlurs edges
GaussianLinear LPFSmooth, no ringingBlurs edges
MedianNon-linearSalt-and-pepperSlow for large masks; thins fine lines
LaplacianLinear HPFSharpening detailAmplifies noise
Sobel/PrewittGradientEdge detectionThick edges, needs thresholding

Where it is used

Interview questions

Common mistakes

Related topics

Digital signal processing: filters and FFT · Machine learning and computer vision with CNNs · Embedded systems and DSP processors · Information theory and source coding · Pattern recognition · Multimedia communication and streaming protocols

Open in the Knowledge reader →Find jobs →