Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

Explain the Fourier transform and its application in digital image processing. Discuss its important properties with derivations.

Fourier Transform in Digital Image Processing

Definition

The Fourier Transform (FT) decomposes an image (a spatial-domain signal) into its constituent sinusoidal frequency components. It maps an image from the spatial domain f(x,y)f(x,y) to the frequency domain F(u,v)F(u,v).

For a digital image of size M×NM \times N, the 2-D Discrete Fourier Transform (DFT) is:

F(u,v)=x=0M1y=0N1f(x,y)ej2π(uxM+vyN)F(u,v) = \sum_{x=0}^{M-1}\sum_{y=0}^{N-1} f(x,y)\, e^{-j2\pi\left(\frac{ux}{M}+\frac{vy}{N}\right)}

and the inverse DFT is:

f(x,y)=1MNu=0M1v=0N1F(u,v)e+j2π(uxM+vyN)f(x,y) = \frac{1}{MN}\sum_{u=0}^{M-1}\sum_{v=0}^{N-1} F(u,v)\, e^{+j2\pi\left(\frac{ux}{M}+\frac{vy}{N}\right)}

Each value F(u,v)F(u,v) is complex: F(u,v)=R(u,v)+jI(u,v)F(u,v)=R(u,v)+jI(u,v), giving a magnitude (spectrum) F(u,v)=R2+I2|F(u,v)|=\sqrt{R^2+I^2} and a phase ϕ(u,v)=tan1(I/R)\phi(u,v)=\tan^{-1}(I/R).

Applications in Image Processing

  • Frequency-domain filtering — low-pass (smoothing/blurring), high-pass (sharpening), band-pass and notch filtering.
  • Image enhancement by suppressing/boosting selected frequencies.
  • Image restoration — inverse and Wiener filtering for deblurring.
  • Image compression (basis for transform coding; DCT used in JPEG).
  • Texture analysis and pattern recognition via the spectrum.
  • Fast convolution — convolution in spatial domain becomes multiplication in frequency domain.

Important Properties (with derivations)

1. Separability. The 2-D DFT separates into two successive 1-D DFTs (rows then columns):

F(u,v)=xej2πux/M[yf(x,y)ej2πvy/N]F(u,v)=\sum_{x}e^{-j2\pi ux/M}\Big[\sum_{y}f(x,y)e^{-j2\pi vy/N}\Big]

This reduces computation from O((MN)2)O((MN)^2) to O(MN(M+N))O(MN(M+N)), and allows the FFT.

2. Linearity. F{af1+bf2}=aF1+bF2\mathcal{F}\{af_1+bf_2\}=aF_1+bF_2, directly from the linearity of the summation.

3. Translation (shift). Shifting in space introduces a phase factor:

f(xx0,yy0)    F(u,v)ej2π(ux0/M+vy0/N)f(x-x_0,y-y_0)\;\Longleftrightarrow\; F(u,v)\,e^{-j2\pi(ux_0/M+vy_0/N)}

and multiplying in space by an exponential shifts the spectrum. Setting u0=M/2,v0=N/2u_0=M/2, v_0=N/2 gives f(x,y)(1)x+yF(uM/2,vN/2)f(x,y)(-1)^{x+y}\leftrightarrow F(u-M/2,v-N/2), used to center the spectrum.

4. Periodicity. The DFT and IDFT are periodic with periods MM and NN: F(u,v)=F(u+M,v)=F(u,v+N)F(u,v)=F(u+M,v)=F(u,v+N), since ej2π(u+M)x/M=ej2πux/Me^{-j2\pi(u+M)x/M}=e^{-j2\pi ux/M}.

5. Conjugate symmetry. For real f(x,y)f(x,y): F(u,v)=F(u,v)F(u,v)=F^*(-u,-v), hence F(u,v)|F(u,v)| is symmetric about the origin.

6. Rotation. Rotating the image by an angle θ0\theta_0 rotates its spectrum by the same angle (shown using polar coordinates x=rcosθ,u=ωcosφx=r\cos\theta,\,u=\omega\cos\varphi).

7. Convolution theorem. f(x,y)h(x,y)    F(u,v)H(u,v)f(x,y)*h(x,y)\;\Longleftrightarrow\;F(u,v)H(u,v). Proof sketch: take the DFT of the convolution sum and apply the shift property to obtain the product of transforms. This is the foundation of frequency-domain filtering.

8. Average value. F(0,0)=xyf(x,y)=MNfˉF(0,0)=\sum_x\sum_y f(x,y)=MN\,\bar f, i.e. the DC term equals the average intensity scaled by MNMN.

fourier
2long10 marks

What is spatial filtering? Explain low-pass, high-pass, and band-pass filtering with their masks and effects on the image.

Spatial Filtering

Spatial filtering processes an image directly on its pixels by moving a small mask (kernel/window) over the image and replacing each pixel with a function of its neighbourhood. For a linear filter this is correlation/convolution:

g(x,y)=s=aat=bbw(s,t)f(x+s,y+t)g(x,y)=\sum_{s=-a}^{a}\sum_{t=-b}^{b} w(s,t)\,f(x+s,\,y+t)

where w(s,t)w(s,t) are the mask coefficients. The behaviour depends entirely on the mask.

1. Low-Pass (Smoothing) Filtering

Passes low frequencies, attenuates high frequencies → blurs / smooths the image and reduces noise. All coefficients are positive and the mask sums to 1 (averaging). A 3×33\times3 averaging mask:

19[111111111](weighted/Gaussian: 116[121242121])\frac{1}{9}\begin{bmatrix}1&1&1\\1&1&1\\1&1&1\end{bmatrix}\qquad\text{(weighted/Gaussian: } \tfrac{1}{16}\begin{bmatrix}1&2&1\\2&4&2\\1&2&1\end{bmatrix})

Effect: removes fine detail and noise but blurs edges; useful before downsampling or for noise reduction.

2. High-Pass (Sharpening) Filtering

Passes high frequencies (edges, detail), attenuates low frequencies → sharpens / enhances edges. The mask has a positive centre, negative surround, and coefficients sum to 0:

[111181111]\begin{bmatrix}-1&-1&-1\\-1&8&-1\\-1&-1&-1\end{bmatrix}

Effect: highlights edges and fine detail; flat regions become near zero. Adding the high-pass result back to the original gives high-boost / unsharp masking.

3. Band-Pass Filtering

Passes a range (band) of frequencies between two cut-offs while attenuating both very low and very high frequencies. It is obtained as the difference of two low-pass filters (e.g. Difference of Gaussians):

hbp=hlp,1hlp,2h_{bp}=h_{lp,1}-h_{lp,2}

Effect: retains features of a specific scale/size while removing slowly varying background and high-frequency noise; used in texture analysis and feature/blob detection.

Summary Table

FilterMask sumPassesEffect
Low-pass=1=1low freq.smoothing, noise removal, blur
High-pass=0=0high freq.edge/detail sharpening
Band-pass0\approx 0mid bandselects features of a given scale
filtering
3long10 marks

Explain image compression. Discuss the JPEG compression algorithm step by step.

Image Compression

Image compression reduces the number of bits required to represent an image by removing redundancy, lowering storage and transmission cost.

Types of redundancy: coding redundancy (inefficient code words), spatial/inter-pixel redundancy (neighbouring pixels are correlated), and psychovisual redundancy (information the human eye cannot perceive).

Categories: Lossless (e.g. RLE, Huffman, LZW — exact reconstruction) and Lossy (e.g. JPEG — higher compression with acceptable quality loss).

JPEG Compression Algorithm (step by step)

JPEG is a lossy, transform-based scheme operating on 8×88\times8 blocks.

1. Colour transform & sub-sampling. Convert RGB → YCbCr. Because the eye is less sensitive to colour, the chrominance channels (Cb, Cr) are typically sub-sampled (e.g. 4:2:0).

2. Block partition. Divide each component into non-overlapping 8×88\times8 blocks.

3. Level shift & 2-D DCT. Subtract 128 from each pixel, then apply the Forward Discrete Cosine Transform to each block:

F(u,v)=14C(u)C(v)x=07y=07f(x,y)cos(2x+1)uπ16cos(2y+1)vπ16F(u,v)=\tfrac14 C(u)C(v)\sum_{x=0}^{7}\sum_{y=0}^{7} f(x,y)\cos\tfrac{(2x+1)u\pi}{16}\cos\tfrac{(2y+1)v\pi}{16}

with C(0)=1/2C(0)=1/\sqrt2, otherwise 11. This concentrates energy in low-frequency coefficients (top-left, DC term).

4. Quantization (lossy step). Divide each DCT coefficient by a value from a quantization table QQ and round:

Fq(u,v)=round ⁣(F(u,v)Q(u,v))F_q(u,v)=\operatorname{round}\!\Big(\frac{F(u,v)}{Q(u,v)}\Big)

High-frequency coefficients (large QQ values) become zero — this is where compression and quality loss occur. A quality factor scales QQ.

5. Zig-zag scanning. Read the 8×88\times8 block in a zig-zag order to group the (now mostly zero) high-frequency coefficients into long runs of zeros, producing a 1-D sequence.

6. Entropy coding.

  • DC coefficient: coded as the difference (DPCM) from the previous block's DC.
  • AC coefficients: run-length encoded (run of zeros, value) then Huffman (or arithmetic) coded.

The result is the compressed bit-stream. Decompression reverses these steps: entropy decode → de-zig-zag → de-quantize (FFqQF\approx F_q\cdot Q) → inverse DCT → level shift → YCbCr→RGB.

Diagram (in words)

Input → Color/sub-sample → 8×8 blocks → DCT → Quantize → Zig-zag → RLE + Huffman → Bit-stream.

compressionjpeg
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

What is the relationship between pixels (neighbours and connectivity)?

Relationship Between Pixels: Neighbours and Connectivity

Neighbours of a pixel pp at (x,y)(x,y):

  • 4-neighbours N4(p)N_4(p): the 4 horizontal/vertical pixels (x±1,y),(x,y±1)(x\pm1,y),(x,y\pm1).
  • Diagonal neighbours ND(p)N_D(p): the 4 diagonal pixels (x±1,y±1)(x\pm1,y\pm1).
  • 8-neighbours N8(p)=N4(p)ND(p)N_8(p)=N_4(p)\cup N_D(p): all 8 surrounding pixels.

Connectivity decides whether two pixels belong to the same object. Let VV be the set of intensity values defining connectivity (e.g. V={1}V=\{1\} for a binary image). Two pixels p,qp,q (with values in VV) are:

  • 4-connected: if qN4(p)q\in N_4(p).
  • 8-connected: if qN8(p)q\in N_8(p).
  • m-connected (mixed): if qN4(p)q\in N_4(p), or qND(p)q\in N_D(p) and N4(p)N4(q)N_4(p)\cap N_4(q) contains no pixel from VV. Mixed connectivity removes the ambiguous multiple paths that arise with 8-connectivity.

Connectivity leads to paths, connected components, regions, and boundaries, and is fundamental to labelling and segmentation.

fundamentals
5short5 marks

Explain contrast stretching.

Contrast Stretching

Contrast stretching (normalization) is a point (intensity-transformation) enhancement technique that expands the range of intensity levels in a low-contrast image so that it spans the full available range (e.g. 00255255), making the image clearer.

For an input intensity rr with minimum rminr_{min} and maximum rmaxr_{max}, the linear stretch maps it to [0,L1][0,L-1]:

s=(rrmin)L1rmaxrmins=(r-r_{min})\cdot\frac{L-1}{r_{max}-r_{min}}

A more general piecewise-linear transformation uses two control points (r1,s1)(r_1,s_1) and (r2,s2)(r_2,s_2) to control the slope: a steep slope between r1r_1 and r2r_2 increases contrast in that band, while the ends may be clipped.

Special cases:

  • If r1=r2r_1=r_2, s1=0s_1=0, s2=L1s_2=L-1 at a threshold \Rightarrow thresholding (binary image).
  • A gentle S-shaped curve brightens mid-tones.

Effect: a dull, low-contrast image (histogram concentrated in a narrow band) becomes one whose histogram is spread across the full range, improving visual detail. Unlike histogram equalization, the mapping here is user-specified/linear rather than derived from the histogram.

enhancement
6short5 marks

What is histogram specification (matching)?

Histogram Specification (Matching)

Histogram specification (matching) is an enhancement technique that transforms an input image so that its histogram matches a specified (target) histogram, rather than the uniform histogram produced by histogram equalization. It gives control to emphasise particular intensity ranges.

Procedure

Let rr be input intensities with PDF pr(r)p_r(r) and zz the desired output intensities with target PDF pz(z)p_z(z).

1. Equalize the input image:   s=T(r)=(L1)0rpr(w)dw\;s=T(r)=(L-1)\displaystyle\int_0^r p_r(w)\,dw (CDF of input).

2. Compute the equalizing transform of the target:   G(z)=(L1)0zpz(w)dw\;G(z)=(L-1)\displaystyle\int_0^z p_z(w)\,dw (CDF of target), with G(z)=sG(z)=s.

3. Map:   z=G1(s)=G1 ⁣(T(r))\;z=G^{-1}(s)=G^{-1}\!\big(T(r)\big).

Discrete steps

  1. Compute the CDF sks_k of the input histogram.
  2. Compute the CDF G(zq)G(z_q) of the specified histogram.
  3. For each input level rkr_k, find the level zqz_q whose G(zq)G(z_q) is closest to sks_k, and map rkzqr_k\to z_q.

Use: when histogram equalization over-enhances or when matching one image's tonal distribution to a reference image is required.

histogram
7short5 marks

Differentiate between mean filter and median filter.

Mean Filter vs Median Filter

Both are spatial smoothing filters applied over a neighbourhood (e.g. 3×33\times3), but they differ in operation and behaviour.

AspectMean (Averaging) FilterMedian Filter
TypeLinear filterNon-linear (order-statistic) filter
OperationReplaces pixel with the average of its neighbourhoodReplaces pixel with the median of its neighbourhood
Output valueMay be a value not present in the imageAlways an actual pixel value from the window
EdgesBlurs edgesPreserves edges much better
Best forGaussian / uniform random noiseSalt-and-pepper (impulse) noise
Effect of outliersOutliers strongly affect the averageOutliers are rejected by sorting
CostCheap (sum/divide)Higher (requires sorting each window)

Example (3×3 window, salt-pepper): values {12,15,255,14,16,13,11,0,17}\{12,15,255,14,16,13,11,0,17\} → mean 39.2\approx 39.2 (corrupted), median =14= 14 (correct). This shows the median's robustness to impulse noise.

filtering
8short5 marks

What is the Discrete Cosine Transform (DCT)?

Discrete Cosine Transform (DCT)

The DCT is a real-valued orthogonal transform that expresses a signal/image as a sum of cosine basis functions of different frequencies. Unlike the DFT it uses only cosines (no imaginary part), and it has strong energy compaction — most of the signal energy is packed into a few low-frequency coefficients — which makes it ideal for compression (used in JPEG and MPEG).

1-D DCT

C(u)=α(u)x=0N1f(x)cos ⁣[(2x+1)uπ2N],u=0,,N1C(u)=\alpha(u)\sum_{x=0}^{N-1} f(x)\cos\!\Big[\frac{(2x+1)u\pi}{2N}\Big],\quad u=0,\dots,N-1

where α(0)=1/N\alpha(0)=\sqrt{1/N} and α(u)=2/N\alpha(u)=\sqrt{2/N} for u>0u>0.

2-D DCT (for images)

C(u,v)=α(u)α(v)x=0N1y=0N1f(x,y)cos ⁣[(2x+1)uπ2N]cos ⁣[(2y+1)vπ2N]C(u,v)=\alpha(u)\alpha(v)\sum_{x=0}^{N-1}\sum_{y=0}^{N-1} f(x,y)\cos\!\Big[\frac{(2x+1)u\pi}{2N}\Big]\cos\!\Big[\frac{(2y+1)v\pi}{2N}\Big]

Properties / uses

  • Real and orthogonal, separable, invertible.
  • Energy compaction → excellent for transform coding/compression.
  • The C(0,0)C(0,0) term is the DC (average) coefficient.
  • Reduces blocking and gives near-optimal decorrelation for highly correlated images, approaching the Karhunen–Loève transform.
transforms
9short5 marks

Explain the Laplacian operator for edge detection.

Laplacian Operator for Edge Detection

The Laplacian is a second-order derivative operator used to detect edges. It is isotropic (rotation-invariant) and responds to intensity transitions (edges) as zero-crossings, where the second derivative changes sign.

For an image f(x,y)f(x,y):

2f=2fx2+2fy2\nabla^2 f=\frac{\partial^2 f}{\partial x^2}+\frac{\partial^2 f}{\partial y^2}

Using finite differences the discrete form is:

2f=f(x+1,y)+f(x1,y)+f(x,y+1)+f(x,y1)4f(x,y)\nabla^2 f = f(x+1,y)+f(x-1,y)+f(x,y+1)+f(x,y-1)-4f(x,y)

Common masks

[010141010](including diagonals)[111181111]\begin{bmatrix}0&1&0\\1&-4&1\\0&1&0\end{bmatrix}\qquad\text{(including diagonals)}\quad\begin{bmatrix}1&1&1\\1&-8&1\\1&1&1\end{bmatrix}

Characteristics

  • Produces double edges and detects edges via zero-crossings, giving precise localisation.
  • It is very sensitive to noise (because it differentiates twice), so the image is usually smoothed first, e.g. the Laplacian of Gaussian (LoG / Marr–Hildreth) operator.
  • Gives no edge direction information (unlike gradient operators).
  • For sharpening:   g=f2f  \;g=f-\nabla^2 f\; (subtract when centre coefficient is negative) enhances edges.
edge-detection
10short5 marks

What is the difference between erosion and dilation?

Erosion vs Dilation

Both are fundamental morphological operations using a structuring element (SE) BB on a (usually binary) image set AA.

Dilation ABA\oplus B

Grows / thickens objects:

AB={z(B^)zA}A\oplus B=\{z\mid (\hat B)_z\cap A\neq\varnothing\}

The SE is placed at each pixel; output is 1 if the SE overlaps any foreground pixel. Effects: enlarges objects, fills small holes and gaps, connects nearby components.

Erosion ABA\ominus B

Shrinks / thins objects:

AB={z(B)zA}A\ominus B=\{z\mid (B)_z\subseteq A\}

Output is 1 only if the SE fits completely within the foreground. Effects: shrinks objects, removes small isolated specks and thin protrusions, breaks thin bridges.

Comparison

ErosionDilation
ConditionSE fully inside AASE overlaps AA
Object sizeShrinks / thinsGrows / thickens
Holes/gapsEnlargesShrinks / fills
NoiseRemoves small white specksRemoves small black holes
Duality(AB)c=AcB^(A\ominus B)^c = A^c\oplus \hat B

Note: erosion and dilation are duals with respect to complementation and reflection. Combining them gives opening (erosion then dilation) and closing (dilation then erosion).

morphology
11short5 marks

Define image degradation model.

Image Degradation Model

The image degradation/restoration model describes how an original (true) image f(x,y)f(x,y) is corrupted to produce the observed degraded image g(x,y)g(x,y), so that restoration can recover an estimate f^\hat f.

The degradation is modelled as a degradation function HH (e.g. blur, motion, optical system) acting on ff, followed by additive noise η(x,y)\eta(x,y).

Spatial domain

g(x,y)=h(x,y)f(x,y)+η(x,y)g(x,y)=h(x,y)*f(x,y)+\eta(x,y)

where * is convolution and hh is the point spread function (PSF) of the degradation.

Frequency domain

Using the convolution theorem:

G(u,v)=H(u,v)F(u,v)+N(u,v)G(u,v)=H(u,v)\,F(u,v)+N(u,v)

Restoration applies the inverse/Wiener filter to GG using a knowledge or estimate of HH and the noise statistics to obtain F^(u,v)\hat F(u,v), and hence f^(x,y)\hat f(x,y) via the inverse transform.

Block diagram (in words)

f(x,y) → [Degradation H] →(+ noise η)→ g(x,y) → [Restoration filter] → f̂(x,y)

restoration
12short5 marks

Write short notes on the Hadamard transform.

Hadamard Transform — Short Notes

The Hadamard (Walsh–Hadamard) transform is a real, orthogonal image transform whose basis functions take only values +1 and −1 (rectangular/square waves) instead of sinusoids. This makes it computationally very cheap — it needs only additions and subtractions, no multiplications.

Hadamard matrix

The matrix is built recursively (Sylvester construction). The smallest is

H2=12[1111],H2N=12[HNHNHNHN]H_2=\frac{1}{\sqrt2}\begin{bmatrix}1&1\\1&-1\end{bmatrix},\qquad H_{2N}=\frac{1}{\sqrt2}\begin{bmatrix}H_N & H_N\\ H_N & -H_N\end{bmatrix}

It is symmetric and orthogonal: HNHNT=IH_N H_N^{T}=I, so the inverse equals the (scaled) transpose.

2-D transform

For an N×NN\times N image ff:

T=HNfHN(inverse: f=HNTHN)T = H_N\,f\,H_N \qquad (\text{inverse: } f = H_N\,T\,H_N)

Properties / uses

  • Real, orthogonal, separable, energy-compacting (less than DCT).
  • The number of sign changes per row is the sequency (analogous to frequency).
  • Used in image compression, coding, feature extraction, and fast computation where speed matters more than optimal compaction.
transforms

Frequently asked questions

Where can I find the BSc CSIT (TU) Image Processing (BSc CSIT, CSC413) question paper 2075?
The full BSc CSIT (TU) Image Processing (BSc CSIT, CSC413) 2075 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
Does the Image Processing (BSc CSIT, CSC413) 2075 paper come with solutions?
Yes. Every question on this Image Processing (BSc CSIT, CSC413) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
How many marks is the BSc CSIT (TU) Image Processing (BSc CSIT, CSC413) 2075 paper?
The BSc CSIT (TU) Image Processing (BSc CSIT, CSC413) 2075 paper carries 60 full marks and is meant to be completed in 180 minutes, across 12 questions.
Is practising this Image Processing (BSc CSIT, CSC413) past paper free?
Yes — reading and attempting this Image Processing (BSc CSIT, CSC413) past paper on Kekkei is completely free.