Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

Explain the Fourier transform application in digital image processing and discuss its different properties (separability, translation, periodicity, symmetry).

Fourier Transform in Digital Image Processing

The Fourier Transform (FT) converts an image from the spatial domain f(x,y)f(x,y) into the frequency domain F(u,v)F(u,v), representing the image as a sum of sinusoids of different frequencies, amplitudes and phases. Low frequencies correspond to slowly varying intensities (smooth regions/background) and high frequencies correspond to rapid changes (edges, noise, fine detail).

The 2-D Discrete Fourier Transform (DFT) of an M×NM \times N image 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 its inverse:

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)}

Applications

  • Frequency-domain filtering: low-pass (smoothing/noise removal), high-pass (sharpening/edge enhancement), band-reject (removing periodic noise).
  • Image restoration via inverse and Wiener filtering of degradation/blur.
  • Image compression (energy compaction into few frequency coefficients, basis of DCT/JPEG).
  • Fast convolution using the convolution theorem (fhFHf*h \Leftrightarrow F\cdot H).
  • Texture and pattern analysis, periodic-noise detection.

Properties of the 2-D DFT

1. Separability. The 2-D transform separates into two 1-D transforms (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 allows computing the 2-D DFT by successive 1-D DFTs, greatly reducing computation (and enables use of the FFT).

2. Translation (shifting). A spatial shift only adds a phase, leaving the magnitude unchanged:

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

Multiplying the image by (1)x+y(-1)^{x+y} shifts the spectrum so that the origin (DC term) moves to the centre (M/2,N/2)(M/2,N/2) — used for display and centering of the spectrum.

3. Periodicity. Both F(u,v)F(u,v) and the implied f(x,y)f(x,y) are periodic with periods MM and NN:

F(u,v)=F(u+M,v)=F(u,v+N)=F(u+M,v+N)F(u,v)=F(u+M,v)=F(u,v+N)=F(u+M,v+N)

Hence the DFT describes one period of an infinite periodic function; this is why centering and proper windowing matter.

4. Symmetry / conjugate symmetry. For a real image f(x,y)f(x,y):

F(u,v)=F(u,v),F(u,v)=F(u,v)F(u,v)=F^{*}(-u,-v),\qquad |F(u,v)|=|F(-u,-v)|

The magnitude spectrum is symmetric about the origin, so only half the spectrum need be stored/computed.

Conclusion

The Fourier transform is fundamental to frequency-domain image processing; its separability makes computation efficient, while translation, periodicity and symmetry properties govern how filters are designed, how the spectrum is centered for display, and how storage is reduced.

fourier
2long10 marks

What is image segmentation? Explain adaptive thresholding and the region split-and-merge technique with examples.

Image Segmentation

Image segmentation is the process of partitioning a digital image into multiple meaningful, non-overlapping regions (sets of pixels) such that pixels within a region are similar with respect to some property (intensity, colour, texture) while adjacent regions differ. It is a key step that bridges low-level processing and high-level analysis (object detection, recognition). Two broad approaches are discontinuity-based (edges) and similarity-based (thresholding, region growing, split-and-merge).

Adaptive (Local) Thresholding

A single global threshold TT classifies a pixel as object or background:

g(x,y)={1f(x,y)>T0f(x,y)Tg(x,y)=\begin{cases}1 & f(x,y)>T\\0 & f(x,y)\le T\end{cases}

Global thresholding fails when illumination is non-uniform, because one TT cannot suit the whole image.

In adaptive thresholding the threshold T(x,y)T(x,y) varies with position, computed from a local neighbourhood around each pixel (e.g. local mean or median minus a constant CC, or Otsu applied per sub-block):

T(x,y)=meanW(x,y)CT(x,y)=\text{mean}_{\,W}(x,y)-C

where WW is a window centred at (x,y)(x,y).

Example. A document scanned with a shadow on one side: a global TT would turn the dark side fully black, but adaptive thresholding using a local mean correctly separates text from background across both bright and shaded areas.

Region Split-and-Merge

This is a region-based technique using a quadtree representation. A predicate P(R)P(R) tests homogeneity of region RR (e.g. variance below a limit, or maxmin\max-\min intensity \le threshold).

Algorithm:

  1. Split: Start with the whole image as one region RR. If P(R)P(R) is FALSE (region not homogeneous), split RR into four equal quadrants. Repeat recursively for each quadrant until every region satisfies PP.
  2. Merge: Merge any two adjacent regions Ri,RjR_i, R_j for which P(RiRj)P(R_i \cup R_j) is TRUE.
  3. Stop when no further split or merge is possible.

Example. For an image with a uniform object on a uniform background, splitting recursively divides mixed blocks straddling the boundary into smaller homogeneous blocks (forming a quadtree); merging then groups all object blocks into one region and all background blocks into another, giving two final segments.

Comparison

  • Adaptive thresholding handles uneven illumination but ignores spatial connectivity.
  • Split-and-merge guarantees connected, homogeneous regions but is sensitive to the homogeneity predicate and can produce blocky boundaries.
segmentation
3long10 marks

Explain the Butterworth high-pass frequency domain filter for image sharpening. Derive its transfer function and discuss its effect.

Butterworth High-Pass Filter (BHPF) for Image Sharpening

Image sharpening highlights fine detail and edges, which correspond to high spatial frequencies. A high-pass filter passes high frequencies and attenuates low frequencies (smooth background). Sharpening in the frequency domain follows:

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

where FF is the DFT of the image and HH the filter transfer function; the result is obtained by inverse DFT.

An ideal HPF has a sharp cutoff and produces ringing artifacts. The Butterworth filter gives a smooth, gradual transition, reducing ringing.

Transfer Function (Derivation)

The Butterworth low-pass filter (BLPF) of order nn with cutoff D0D_0 is:

Hlp(u,v)=11+[D(u,v)D0]2nH_{lp}(u,v)=\frac{1}{1+\left[\dfrac{D(u,v)}{D_0}\right]^{2n}}

where D(u,v)=(uM/2)2+(vN/2)2D(u,v)=\sqrt{(u-M/2)^2+(v-N/2)^2} is the distance from the centre of the (centered) frequency rectangle.

A high-pass filter is the complement of the corresponding low-pass filter:

Hhp=1HlpH_{hp}=1-H_{lp}

Substituting:

Hhp(u,v)=111+[D(u,v)D0]2n=[D(u,v)D0]2n1+[D(u,v)D0]2nH_{hp}(u,v)=1-\frac{1}{1+\left[\frac{D(u,v)}{D_0}\right]^{2n}}=\frac{\left[\frac{D(u,v)}{D_0}\right]^{2n}}{1+\left[\frac{D(u,v)}{D_0}\right]^{2n}}

Multiplying numerator and denominator by [D0/D(u,v)]2n\left[D_0/D(u,v)\right]^{2n} gives the standard BHPF form:

H(u,v)=11+[D0D(u,v)]2n\boxed{\,H(u,v)=\frac{1}{1+\left[\dfrac{D_0}{D(u,v)}\right]^{2n}}\,}

Effect / Behaviour

  • At D(u,v)=D0D(u,v)=D_0, H=0.5H=0.5 (the half-power cutoff), regardless of order nn.
  • For DD0D \ll D_0 (low frequencies, near centre) H0H \to 0 → background/smooth areas are suppressed.
  • For DD0D \gg D_0 (high frequencies) H1H \to 1 → edges and fine detail are passed → sharpening.
  • The order nn controls steepness: small nn gives a gentle transition (smooth result, almost no ringing); large nn approaches the ideal HPF (sharper cutoff, more ringing).
  • Because the DC term is removed/attenuated, the output has near-zero average and edges appear on a dark background; adding a constant (high-frequency-emphasis filtering, H=a+bHH'=a+bH) restores overall brightness while keeping the sharpening.

Conclusion

The BHPF sharpens images by amplifying high-frequency edge content while smoothly attenuating low frequencies, offering a controllable trade-off (via nn) between sharpness and ringing that the ideal HPF cannot provide.

filteringfrequency-domain
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

Define histogram of an image and explain its uses.

Histogram of an Image

The histogram of a digital image is a discrete function that represents the frequency of occurrence of each intensity (gray) level. For an image with intensity levels rkr_k (k=0,1,,L1k=0,1,\dots,L-1):

h(rk)=nkh(r_k)=n_k

where nkn_k is the number of pixels having intensity rkr_k. The normalized histogram p(rk)=nk/MNp(r_k)=n_k/MN (with MNMN = total pixels) gives the probability of each gray level. Plotted as gray level (x-axis) vs. count/probability (y-axis), it summarizes the tonal distribution but contains no spatial information.

Uses

  • Brightness/contrast assessment: a histogram clustered at low values = dark image; at high values = bright image; spread over the full range = high contrast.
  • Histogram equalization / stretching to enhance contrast.
  • Histogram matching (specification) to give an image a desired tonal distribution.
  • Thresholding/segmentation: a bimodal histogram suggests a good threshold between object and background.
  • Image analysis & comparison (texture, exposure correction, content-based retrieval).
histogram
5short5 marks

Explain the different types of filters used in image processing.

Types of Filters in Image Processing

Filters modify pixel values using a neighbourhood (spatial domain) or frequency components (frequency domain). Main types:

By domain

  • Spatial-domain filters – operate directly on pixels via convolution with a mask/kernel.
  • Frequency-domain filters – multiply the image's Fourier transform by a transfer function H(u,v)H(u,v).

By effect / pass-band

  • Low-pass (smoothing) filters – attenuate high frequencies → blur, noise removal. Examples: averaging/mean filter, Gaussian filter, ideal/Butterworth LPF.
  • High-pass (sharpening) filters – attenuate low frequencies, pass high → enhance edges/detail. Examples: Laplacian, ideal/Butterworth HPF, high-boost.
  • Band-pass / band-reject filters – pass or remove a range of frequencies, e.g. notch filter to remove periodic noise.

By linearity

  • Linear filters – output is a weighted (convolution) sum, e.g. mean, Gaussian, Laplacian.
  • Non-linear filters – order/rank based, e.g. median filter (excellent for salt-and-pepper noise), max/min filters.

By purpose

  • Smoothing (noise reduction), sharpening (edge enhancement), edge-detection (Sobel, Prewitt, Laplacian), and restoration (Wiener) filters.
filtering
6short5 marks

What is the difference between smoothing and sharpening?

Smoothing vs. Sharpening

AspectSmoothingSharpening
GoalBlur the image, reduce noise and fine detailEnhance edges and fine detail
Frequency contentLow-pass: attenuates high frequenciesHigh-pass: emphasizes high frequencies
OperationAveraging / integration of neighbouring pixelsDifferentiation of pixel values
Typical masksMean (box), Gaussian, medianLaplacian, Sobel/Prewitt gradient, high-boost
Effect on edgesEdges become blurred/softenedEdges become more pronounced
UseNoise removal, reduce false contoursHighlight detail, improve perceived clarity

Summary: Smoothing is a low-pass / averaging operation that suppresses rapid intensity changes (noise, detail), whereas sharpening is a high-pass / differencing operation that amplifies them to make edges crisper. They are conceptually opposite: smoothing integrates, sharpening differentiates.

filtering
7short5 marks

Explain image negatives and their application.

Image Negatives

An image negative is a point (intensity) transformation that reverses the intensity levels of an image, so that dark areas become light and light areas become dark — like a photographic negative. For an image with intensity range [0,L1][0, L-1], the transformation is:

s=(L1)rs = (L-1) - r

where rr is the input intensity and ss the output. For an 8-bit image (L=256L=256), s=255rs = 255 - r (e.g. 02550\to255, 2550255\to0, 100155100\to155).

It is a linear, reversible transformation with a transformation curve that is a straight line of slope 1-1.

Applications

  • Medical imaging: enhancing white/gray detail embedded in dark regions, e.g. examining tissue in X-rays / mammograms, where small bright structures are easier to see against a dark inverted background.
  • Bringing out detail in the dark regions of an image where the eye perceives differences better after inversion.
  • A pre-processing step in some enhancement and analysis pipelines, and for producing photographic-style negative effects.
enhancement
8short5 marks

What is the Discrete Fourier Transform (DFT)?

Discrete Fourier Transform (DFT)

The Discrete Fourier Transform transforms a finite, discrete (sampled) signal/image from the spatial domain to the frequency domain, expressing it as a sum of complex sinusoids. It is the discrete, computable counterpart of the continuous Fourier transform.

1-D DFT of a sequence f(x)f(x), x=0,,N1x=0,\dots,N-1:

F(u)=x=0N1f(x)ej2πux/N,u=0,1,,N1F(u)=\sum_{x=0}^{N-1} f(x)\,e^{-j2\pi ux/N},\qquad u=0,1,\dots,N-1

Inverse: f(x)=1Nu=0N1F(u)e+j2πux/N\displaystyle f(x)=\frac{1}{N}\sum_{u=0}^{N-1}F(u)\,e^{+j2\pi ux/N}.

2-D DFT of an M×NM\times N image f(x,y)f(x,y):

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)}

F(u,v)F(u,v) is generally complex; its magnitude F(u,v)|F(u,v)| is the frequency spectrum and arctan(Im/Re)\arctan(\text{Im}/\text{Re}) is the phase. F(0,0)F(0,0) (the DC term) equals the average intensity times MNMN. The DFT is the basis of frequency-domain filtering and compression, and is computed efficiently using the Fast Fourier Transform (FFT) in O(NlogN)O(N\log N) instead of O(N2)O(N^2).

fourier
9short5 marks

Define boundary and region in an image.

Boundary and Region in an Image

Region. A region RR is a connected set of pixels that share some common property (similar intensity, colour or texture). Formally, segmentation partitions an image II into regions R1,R2,,RnR_1,R_2,\dots,R_n such that:

  • i=1nRi=I\bigcup_{i=1}^{n} R_i = I (they cover the whole image),
  • each RiR_i is connected,
  • RiRj=R_i \cap R_j = \varnothing for iji\neq j (disjoint),
  • P(Ri)=TRUEP(R_i)=\text{TRUE} (each region is homogeneous), and P(RiRj)=FALSEP(R_i\cup R_j)=\text{FALSE} for adjacent regions (different regions are dissimilar).

A region is described by its interior properties (area, mean intensity, texture).

Boundary (border/contour). The boundary of a region is the set of pixels of that region which have at least one neighbour belonging to a different region (or to the background). It forms a closed curve that separates the region from its surroundings and defines the region's shape/outline.

Relationship: A region is defined by what is inside (interior, similarity-based), while a boundary is defined by the edge between regions (discontinuity-based). Together they are dual ways of describing an object — region-based and boundary-based segmentation.

segmentation
10short5 marks

Explain Huffman coding for image compression.

Huffman Coding for Image Compression

Huffman coding is a lossless, variable-length, entropy coding technique that assigns shorter binary codes to more frequent intensity values and longer codes to rare ones, reducing coding redundancy. It produces an optimal prefix code (no code is a prefix of another, so decoding is unambiguous).

Algorithm

  1. Compute the probability/frequency of each gray level (from the image histogram).
  2. Treat each symbol as a leaf node; place all in a list.
  3. Repeatedly take the two lowest-probability nodes, combine them into a new node whose probability is their sum, and put it back. (Build the binary Huffman tree bottom-up.)
  4. Continue until a single root remains.
  5. Assign 0 to one branch and 1 to the other at each node; read root-to-leaf to obtain each symbol's codeword.

Example

Symbols with probabilities a=0.4,b=0.3,c=0.2,d=0.1a=0.4, b=0.3, c=0.2, d=0.1. Combining smallest pairs yields codes such as a=0a=0, b=10b=10, c=110c=110, d=111d=111. Average length =0.4(1)+0.3(2)+0.2(3)+0.1(3)=1.9=0.4(1)+0.3(2)+0.2(3)+0.1(3)=1.9 bits/symbol, versus 2 bits for fixed-length coding — a saving.

Notes

  • Compression efficiency approaches the entropy H=pilog2piH=-\sum p_i \log_2 p_i.
  • It is lossless (exact reconstruction) and is used in JPEG (after DCT/quantization) and PNG.
  • Requires the symbol probabilities (or a transmitted code table) to be known.
compression
11short5 marks

What is a structuring element in morphological operations?

Structuring Element in Morphological Operations

A structuring element (SE) is a small set / mask of pixels (with a defined shape and a designated origin) that is moved across the image to probe and interact with its features during morphological operations (erosion, dilation, opening, closing, hit-or-miss). It plays the role analogous to the kernel in convolution, but works with set operations rather than weighted sums.

Characteristics

  • Has a shape (square, rectangle, disk, cross/diamond, line) and a size, chosen to match the features being extracted/removed.
  • Has an origin (reference pixel, usually the centre) that is positioned at each image pixel.
  • For binary morphology its elements are 0/1 (foreground positions); some entries may be "don't care".
  • A flat SE has no height values; a non-flat SE (used in grayscale morphology) assigns intensity values.

Role

  • In erosion, a pixel is kept only if the SE fits entirely inside the object → shrinks objects, removes small noise.
  • In dilation, a pixel is set if the SE hits (overlaps) the object → grows objects, fills gaps.
  • The choice of SE shape/size determines which structures are preserved, removed or detected (e.g. a horizontal line SE extracts horizontal features).
morphology
12short5 marks

Write short notes on the Sine transform.

Short Note: Discrete Sine Transform (DST)

The Sine Transform is an orthogonal, real-valued unitary transform that represents a signal/image as a weighted sum of sine basis functions. It is closely related to the Fourier and cosine transforms but uses only sine terms, making it suitable for signals/images that are (approximately) odd-symmetric at the boundaries.

1-D Discrete Sine Transform

For a sequence of length NN:

S(u)=2N+1x=0N1f(x)sin ⁣[π(x+1)(u+1)N+1],u=0,,N1S(u)=\sqrt{\frac{2}{N+1}}\sum_{x=0}^{N-1} f(x)\,\sin\!\left[\frac{\pi(x+1)(u+1)}{N+1}\right],\quad u=0,\dots,N-1

The kernel is separable and symmetric, so the 2-D DST is obtained by applying the 1-D DST along rows then columns.

Properties / Uses

  • Real, orthogonal transform (no complex arithmetic), so it is computationally convenient.
  • Provides good energy compaction for certain signal statistics (low-correlation/first-order Markov sources with small correlation), where it can outperform the DCT.
  • Used in image compression, transform coding, and fast solution of certain PDEs (it diagonalizes specific tridiagonal/Laplacian matrices).
  • Being sine-based, it inherently assumes zero (odd) boundary values, which suits residual/difference images.
transforms

Frequently asked questions

Where can I find the BSc CSIT (TU) Image Processing (BSc CSIT, CSC413) question paper 2078?
The full BSc CSIT (TU) Image Processing (BSc CSIT, CSC413) 2078 (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) 2078 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) 2078 paper?
The BSc CSIT (TU) Image Processing (BSc CSIT, CSC413) 2078 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.