Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

Explain image enhancement in the spatial domain. Discuss point processing techniques (negative, log, power-law) and histogram processing.

Image Enhancement in the Spatial Domain

Spatial-domain enhancement operates directly on the pixels of an image. A general transformation is written as:

g(x,y)=T[f(x,y)]g(x,y) = T[f(x,y)]

where ff is the input image, gg the output image, and TT an operator defined over a neighbourhood of (x,y)(x,y). When the neighbourhood is a single pixel (1×11\times1), TT becomes an intensity (gray-level) transformation s=T(r)s = T(r), where rr and ss are the input and output intensities.

Point Processing Techniques

1. Image Negative

Reverses the intensity levels, producing a photographic negative. Useful for enhancing white/grey detail embedded in dark regions (e.g. medical X-rays):

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

where LL is the number of gray levels (e.g. L=256L=256 for 8-bit images).

2. Log Transformation

s=clog(1+r)s = c\,\log(1 + r)

It maps a narrow range of low intensities into a wider range and compresses high intensities. It is used to expand dark pixel values and to display data with a large dynamic range (e.g. Fourier spectra). cc is a scaling constant.

3. Power-Law (Gamma) Transformation

s=crγs = c\,r^{\gamma}
  • γ<1\gamma < 1 brightens the image (expands dark levels), similar to the log curve.
  • γ>1\gamma > 1 darkens the image (expands bright levels).

Gamma transformations are used for contrast manipulation and gamma correction of display devices.

Histogram Processing

The histogram of an image plots the frequency h(rk)=nkh(r_k) = n_k of each intensity level rkr_k (or the normalized probability p(rk)=nk/MNp(r_k) = n_k/MN). It describes the global tonal distribution; dark images cluster at low levels, bright images at high levels, and high-contrast images spread across the full range.

Histogram Equalization redistributes intensities so the output histogram is approximately uniform, improving contrast. The transformation is the cumulative distribution function (CDF):

sk=T(rk)=(L1)j=0kpr(rj)s_k = T(r_k) = (L-1)\sum_{j=0}^{k} p_r(r_j)

Histogram Specification (Matching) maps the histogram to a desired target shape rather than a flat one, giving finer control over the result.

Summary

Spatial enhancement improves visual quality directly on pixels. Point operations (negative, log, power-law) remap intensities by a fixed function, while histogram processing uses the image's own statistics to enhance contrast.

enhancementhistogram
2long10 marks

What is the Butterworth filter? Explain Butterworth high-pass and low-pass frequency-domain filters for image sharpening and smoothing.

Butterworth Filter (Frequency-Domain)

Filtering in the frequency domain multiplies the Fourier transform F(u,v)F(u,v) of an image by a filter transfer function H(u,v)H(u,v):

G(u,v)=H(u,v)F(u,v),g(x,y)=F1{G(u,v)}G(u,v) = H(u,v)\,F(u,v), \qquad g(x,y) = \mathcal{F}^{-1}\{G(u,v)\}

The Butterworth filter is a smooth filter whose transfer function provides a gradual transition between passed and attenuated frequencies, controlled by an order nn. Unlike the ideal filter (sharp cut-off, causing ringing) and the Gaussian filter (no ringing), the Butterworth filter is a compromise: low ringing and a tunable sharpness via nn.

Let D(u,v)=(uM/2)2+(vN/2)2D(u,v) = \sqrt{(u-M/2)^2 + (v-N/2)^2} be the distance from the centre of the (centered) frequency rectangle, and D0D_0 the cut-off frequency.

Butterworth Low-Pass Filter (BLPF) — Smoothing

HLP(u,v)=11+[D(u,v)D0]2nH_{LP}(u,v) = \dfrac{1}{1 + \left[\dfrac{D(u,v)}{D_0}\right]^{2n}}
  • Passes low frequencies and attenuates high frequencies.
  • Low frequencies represent smooth, slowly varying intensity; high frequencies represent edges and noise. Removing high frequencies smooths/blurs the image and reduces noise.
  • A larger order nn makes the filter approach the ideal LPF (more ringing); n=1n=1 behaves like a Gaussian (no ringing).

Butterworth High-Pass Filter (BHPF) — Sharpening

HHP(u,v)=11+[D0D(u,v)]2n=1HLP(u,v)H_{HP}(u,v) = \dfrac{1}{1 + \left[\dfrac{D_0}{D(u,v)}\right]^{2n}} = 1 - H_{LP}(u,v)
  • Passes high frequencies and attenuates low frequencies.
  • Since edges and fine detail are high-frequency content, the BHPF sharpens the image by emphasizing edges and boundaries while suppressing the slowly varying background.

Comparison

PropertyLow-pass (BLPF)High-pass (BHPF)
PassesLow frequenciesHigh frequencies
EffectSmoothing / blur / denoiseSharpening / edge emphasis
At D=D0D=D_0H=0.5H = 0.5H=0.5H = 0.5

Summary

The Butterworth filter offers a smoothly controllable transition (order nn) between ideal and Gaussian behaviour: the low-pass version smooths, and the high-pass version sharpens an image.

filteringfrequency-domain
3long10 marks

Explain image segmentation techniques. Discuss edge-based and region-based segmentation in detail.

Image Segmentation

Segmentation partitions an image into meaningful regions (objects and background) so that pixels in each region share some property. Formally the image RR is divided into regions R1,,RnR_1,\dots,R_n such that:

  • i=1nRi=R\bigcup_{i=1}^{n} R_i = R (complete coverage)
  • Each RiR_i is connected, RiRj=R_i \cap R_j = \varnothing for iji \ne j
  • A predicate P(Ri)P(R_i) is TRUE for each region and FALSE for the union of any two adjacent regions.

Segmentation approaches rely on two basic properties of intensity: discontinuity (edge-based) and similarity (region-based, thresholding).

1. Edge-Based Segmentation (Discontinuity)

Detects boundaries where intensity changes abruptly.

  • Gradient (first-derivative) operators detect edges as points of maximum gradient magnitude:
f=[fx, fy],f=fx2+fy2\nabla f = \big[\tfrac{\partial f}{\partial x},\ \tfrac{\partial f}{\partial y}\big], \qquad |\nabla f| = \sqrt{f_x^2 + f_y^2}

Implemented with Sobel, Prewitt, Roberts masks.

  • Laplacian (second-derivative) detects edges at zero-crossings; the Laplacian of Gaussian (LoG / Marr-Hildreth) first smooths to reduce noise sensitivity.
  • Canny edge detector is the optimal multi-stage method: Gaussian smoothing → gradient → non-maximum suppression → hysteresis (double) thresholding.
  • Detected edge pixels are then linked (local processing, Hough transform) into continuous boundaries.

Pros: good for sharp boundaries. Cons: sensitive to noise; edges may be broken/incomplete.

2. Region-Based Segmentation (Similarity)

Groups pixels that satisfy a similarity predicate.

  • Region Growing: start from seed pixels and append neighbouring pixels whose properties (intensity, colour, texture) satisfy PP, until no more pixels can be added.
  • Region Splitting and Merging: start with the whole image; recursively split any region where PP is FALSE (e.g. quadtree), then merge adjacent regions whose union satisfies PP.

Pros: produces connected, closed regions; more robust to noise than pure edge detection. Cons: sensitive to seed selection and predicate; can be computationally expensive.

Comparison

Edge-basedRegion-based
BasisDiscontinuitySimilarity
OutputBoundaries (may be open)Closed connected regions
NoiseSensitiveMore robust

Summary

Edge-based methods locate object boundaries via intensity discontinuities, while region-based methods group similar pixels into homogeneous regions; the two are often combined for reliable segmentation.

segmentation
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

Define a digital image and a pixel.

Digital image: A digital image is a two-dimensional function f(x,y)f(x,y) where x,yx,y are spatial coordinates and the amplitude ff at any point is the intensity (gray level), with both the coordinates and amplitudes being finite, discrete quantities. It is obtained by sampling (discretizing coordinates) and quantization (discretizing intensity), and is represented as an M×NM \times N matrix of numbers.

Pixel: A pixel (picture element) is a single element of that matrix — the smallest addressable unit of a digital image. Each pixel has a location (x,y)(x,y) and an intensity value (e.g. 0–255 for an 8-bit grayscale image, or an (R,G,B) triple for colour).

fundamentals
5short5 marks

What is gamma correction?

Gamma correction is a nonlinear intensity transformation that follows the power-law:

s=crγs = c\,r^{\gamma}

where rr is the input intensity (normalized to [0,1][0,1]), ss the output, cc a constant, and γ\gamma the gamma exponent.

It compensates for the nonlinear response of display devices (CRT/LCD monitors), whose output luminance is approximately a power function of the input voltage. Without correction images appear too dark or too bright.

  • γ<1\gamma < 1 : brightens the image / expands dark tones.
  • γ>1\gamma > 1 : darkens the image / expands bright tones.
  • γ=1\gamma = 1 : linear (no change).

Applying the inverse exponent corrects the display so the perceived brightness matches the intended values; it is also used for general contrast enhancement.

enhancement
6short5 marks

Explain the histogram equalization process briefly.

Histogram Equalization

Histogram equalization is a contrast-enhancement technique that redistributes pixel intensities so that the output histogram is approximately uniform, spreading values across the full available range.

Procedure:

  1. Compute the histogram: count nkn_k pixels at each level rkr_k for k=0,1,,L1k = 0,1,\dots,L-1.
  2. Compute the normalized probability (PDF): p(rk)=nk/MNp(r_k) = n_k / MN, where MNMN is the total number of pixels.
  3. Compute the cumulative distribution function (CDF):   cdf(rk)=j=0kp(rj)\;\text{cdf}(r_k) = \sum_{j=0}^{k} p(r_j).
  4. Map each level using:
sk=T(rk)=(L1)j=0kp(rj)s_k = T(r_k) = (L-1)\sum_{j=0}^{k} p(r_j)
  1. Round sks_k to the nearest integer and replace each pixel's value accordingly.

Result: intensities that were clustered in a narrow band are stretched across the range, increasing global contrast. It is automatic (no parameters) but applies globally and can over-enhance noise; adaptive (local) histogram equalization addresses this.

histogram
7short5 marks

What is image sharpening? Which filters are used?

Image Sharpening

Image sharpening enhances fine detail, edges, and transitions in intensity, making an image appear crisper. It is the opposite of smoothing: smoothing averages (integration), whereas sharpening uses differentiation to emphasize regions of rapid intensity change.

Filters Used

Spatial domain (high-pass / derivative filters):

  • Laplacian (second derivative):
2f=2fx2+2fy2\nabla^2 f = \frac{\partial^2 f}{\partial x^2} + \frac{\partial^2 f}{\partial y^2}

The sharpened image is g=f2fg = f - \nabla^2 f (or f+2ff + \nabla^2 f depending on mask sign). A common 3×33\times3 mask is:

 0  -1   0
-1   5  -1
 0  -1   0
  • Gradient (first derivative): Sobel / Prewitt operators emphasize edges via f|\nabla f|.
  • Unsharp masking & High-boost filtering: subtract a blurred (low-pass) version from the original to obtain a detail mask, then add it back: g=f+k(ffˉ)g = f + k(f - \bar f).

Frequency domain (high-pass filters): Ideal, Butterworth, and Gaussian high-pass filters pass high frequencies (edges) and attenuate low frequencies, sharpening the image.

In all cases, high-frequency / high-pass operators are used because edges correspond to high spatial frequencies.

filtering
8short5 marks

Explain the Haar transform.

Haar Transform

The Haar transform is one of the simplest orthogonal (unitary) image transforms, derived from the Haar functions — the oldest known wavelet basis. It decomposes a signal/image into a low-frequency average (approximation) component and high-frequency difference (detail) components, making it a basic discrete wavelet transform.

Transform form: For an N×NN \times N image FF, the transform is

T=HFHTT = H\,F\,H^{T}

where HH is the N×NN\times N orthogonal Haar matrix (NN a power of 2) whose rows are sampled Haar functions, and H1=HTH^{-1} = H^{T}.

Basic 2×22\times2 Haar matrix:

H2=12[1111]H_2 = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}

The first row computes the sum/average (low-pass) and the second the difference (high-pass).

Properties / Uses:

  • Real, orthogonal, and very fast to compute (only additions/subtractions, no multiplications by irrational numbers beyond scaling).
  • Provides both spatial and frequency (multi-resolution) localization, unlike the Fourier transform.
  • Used in image compression, edge detection, feature extraction, and as the simplest example of wavelet-based processing.
transforms
9short5 marks

What is thresholding in segmentation?

Thresholding in Segmentation

Thresholding is a region-based segmentation technique that separates objects from the background based on intensity. A threshold value TT partitions pixels into classes:

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

Pixels above the threshold become foreground (object), the rest background, producing a binary image.

Types:

  • Global thresholding: a single TT for the whole image (works when object and background have distinct, bimodal intensity peaks).
  • Otsu's method: automatically selects TT by maximizing between-class variance.
  • Adaptive / local thresholding: TT varies across the image to handle non-uniform illumination.
  • Multiple thresholding: several thresholds separate more than two classes.

It is simple and fast but sensitive to noise and uneven lighting.

segmentation
10short5 marks

Differentiate between opening and closing in morphology.

Opening vs Closing (Morphology)

Both are compound morphological operations built from erosion (\ominus) and dilation (\oplus) using a structuring element BB on a binary image AA.

Opening — erosion followed by dilation:

AB=(AB)BA \circ B = (A \ominus B) \oplus B

Closing — dilation followed by erosion:

AB=(AB)BA \bullet B = (A \oplus B) \ominus B
AspectOpeningClosing
OrderErode then dilateDilate then erode
EffectRemoves small objects, thin protrusions, and noise; smooths object contours from outsideFills small holes, narrow gaps, and breaks; smooths contours from inside
RemovesBright small specks / spursSmall dark holes / thin gaps
GeometryBreaks narrow connectionsJoins narrow breaks

Both are idempotent (ABB=ABA \circ B \circ B = A \circ B) and preserve overall object size, unlike plain erosion/dilation. Opening tends to remove foreground noise; closing tends to remove background holes.

morphology
11short5 marks

What is run-length encoding in image compression?

Run-Length Encoding (RLE)

Run-Length Encoding is a simple lossless image-compression technique that exploits spatial (interpixel) redundancy — long runs of identical pixel values. Instead of storing each pixel, it stores each run as a pair: (value, run-length).

Example (a row of pixels):

Original:  W W W W W B B W W W W W W W   (14 pixels)
RLE:       (W,5) (B,2) (W,7)            (3 pairs)

For binary images, only the run lengths need be stored (the value alternates between 0 and 1). It is the basis of compression in formats such as BMP, TIFF, and fax (CCITT) standards, and is used as a stage in JPEG (encoding runs of zero AC coefficients).

Pros: simple, fast, lossless, very effective on images with large uniform areas (binary/graphics). Cons: poor on noisy or highly detailed natural images, where it can even increase size.

compression
12short5 marks

Write short notes on the Walsh transform.

Walsh Transform

The Walsh transform is a non-sinusoidal, orthogonal image transform whose basis functions are Walsh functions — square waves taking only the values +1+1 and 1-1. It is closely related to the Hadamard transform (the Walsh-Hadamard transform), differing only in the ordering of the basis functions (Walsh ordering = sequency order, by number of sign changes).

1-D Walsh transform of a sequence f(x)f(x) of length N=2nN = 2^n:

W(u)=1Nx=0N1f(x)i=0n1(1)bi(x)bn1i(u)W(u) = \frac{1}{N}\sum_{x=0}^{N-1} f(x)\,\prod_{i=0}^{n-1}(-1)^{\,b_i(x)\,b_{n-1-i}(u)}

where bi(x)b_i(x) is the ii-th bit of xx. The kernel values are ±1\pm1.

Properties / Uses:

  • Real, symmetric, orthogonal; the inverse has the same form (separable and easily extended to 2-D as W=HFHW = H F H).
  • Computed using only additions and subtractions (no multiplications), so it is much faster than the Fourier transform.
  • Basis functions are ordered by sequency (analogous to frequency).
  • Applications: image compression, feature extraction, and signal/image coding where computational simplicity matters.
transforms

Frequently asked questions

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