BSc CSIT (TU) Science Image Processing (BSc CSIT, CSC413) Question Paper 2082 Nepal
This is the official BSc CSIT (TU) (Science stream) Image Processing (BSc CSIT, CSC413) question paper for 2082, as set in the annual (regular) examination. It carries 60 full marks and a time allowance of 180 minutes, across 12 questions. On Kekkei you can attempt this Image Processing (BSc CSIT, CSC413) past paper online with a timer, get instant AI feedback and step-by-step solutions, and track the topics where you lose marks — completely free. Whether you are revising for your BSc CSIT (TU) Image Processing (BSc CSIT, CSC413) exam or solving previous years' question papers, this 2082 paper is a great way to practise under real exam conditions.
| Level | BSc CSIT (TU) |
|---|---|
| Stream | Science |
| Subject | Image Processing (BSc CSIT, CSC413) |
| Year | 2082 BS |
| Exam session | Regular (annual) |
| Full marks | 60 |
| Time allowed | 180 minutes |
| Questions | 12, all with step-by-step solutions |
Section A: Long Answer Questions
Attempt any TWO questions.
Distinguish between high frequency emphasis filter and Laplacian filter. Find the output of the following image using histogram equalization, where number of possible gray levels is 8.
3 3 3 3 3
2 3 4 3 2
2 4 4 4 2
2 3 4 3 2
3 3 3 3 3
High-Frequency Emphasis Filter vs Laplacian Filter
| Aspect | High-Frequency Emphasis Filter | Laplacian Filter |
|---|---|---|
| Domain | Mainly frequency domain | Mainly spatial domain (a mask) |
| Definition | where is a high-pass filter, , | , a second-order derivative |
| Idea | Adds back a fraction of the original so low frequencies (background) are not lost while high frequencies (edges) are boosted | Produces only the edge/detail map; must be added to the original for sharpening: |
| Effect | Sharpens and preserves overall tonality/brightness | Strongly highlights edges but darkens flat regions if used alone |
| Order | Built on a high-pass response | Pure second-derivative operator |
| Output | Enhanced image with detail emphasized | Edge image (zero in flat areas) |
In short, the high-frequency emphasis filter is essentially a high-pass filter with an added offset so the result is not a bare edge map, whereas the Laplacian is an isotropic second-derivative operator whose raw output is an edge map that is normally combined with the original for sharpening.
Histogram Equalization ()
Input image ():
3 3 3 3 3
2 3 4 3 2
2 4 4 4 2
2 3 4 3 2
3 3 3 3 3
Total pixels , levels so the scaling factor is .
Step 1 – Histogram (count of each gray level):
| 2 | 6 |
| 3 | 14 |
| 4 | 5 |
(All other levels 0, 1, 5, 6, 7 have count 0.)
Step 2 – PDF, CDF and transformation :
| CDF | CDF | ||||
|---|---|---|---|---|---|
| 2 | 6 | 0.24 | 0.24 | 1.68 | 2 |
| 3 | 14 | 0.56 | 0.80 | 5.60 | 6 |
| 4 | 5 | 0.20 | 1.00 | 7.00 | 7 |
Step 3 – Mapping: .
Output (equalized) image:
6 6 6 6 6
2 6 7 6 2
2 7 7 7 2
2 6 7 6 2
6 6 6 6 6
The original values were clustered in ; after equalization they are spread across , increasing the global contrast.
Define noise. Explain the models for image degradation and restoration process.
Definition of Noise
Noise in an image is any unwanted random variation in pixel intensity that is not part of the true scene. It is introduced during acquisition (sensor thermal noise, low light), digitization (quantization), or transmission (channel errors). Noise degrades quality and is usually modelled as a random process described by its probability density function (PDF).
Common noise models include Gaussian, Rayleigh, Erlang (gamma), exponential, uniform, and salt-and-pepper (impulse) noise.
Image Degradation / Restoration Model
The goal of restoration is to recover an estimate of the original image from a degraded observation , using knowledge of the degradation process. (Restoration is objective, based on a model, unlike enhancement which is subjective.)
Degradation Model
Degradation is modelled as a degradation function acting on the input image , followed by the addition of noise :
f(x,y) ---->[ H ]----> (+) ----> g(x,y) ----->[ Restoration ]----> f^(x,y)
degradation ^ filter(s)
function |
noise η(x,y)
Spatial domain (H is linear and position-invariant ⇒ convolution):
Frequency domain (convolution becomes multiplication):
Restoration Process
Given , an estimate of , and statistics of , restoration applies an inverse/restoration filter to obtain . Typical filters:
- Inverse filtering: — simple but amplifies noise where is small.
- Wiener (minimum mean-square error) filter: balances inverse filtering against noise using the signal/noise power ratio:
- Mean / order-statistic (median) filters when only noise (no blur, ) is present.
Summary
The more that is known about and , the better the restoration. When is identity, the problem reduces to noise removal; when noise is negligible, it reduces to deblurring.
What are the differences between spatial domain and frequency domain? Compute the 2D DFT of the following image.
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
Spatial Domain vs Frequency Domain
| Aspect | Spatial Domain | Frequency Domain |
|---|---|---|
| Works on | Image pixels directly | Fourier coefficients |
| Operation | Convolution with a mask/kernel | Point-wise multiplication with |
| Basis | Spatial coordinates | Sinusoidal frequency components |
| Interpretation | Direct manipulation of intensities/neighbourhoods | Low freq = smooth areas, high freq = edges/detail |
| Cost | Cheap for small kernels | Efficient (via FFT) for large kernels |
| Example operations | Smoothing/sharpening masks, histogram ops | Ideal/Butterworth/Gaussian low- and high-pass filtering |
| Relation | — linked by the Fourier transform |
2-D DFT of the Image
Input image (, all ones):
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
The 2-D DFT is
DC term (): the exponential is 1, so
All other terms ( or ): since is constant, each is the sum of a full period of a complex exponential, which is zero:
so for every .
Result:
F = 16 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
Interpretation: a constant (uniform) image has no variation, so all its energy lies in the DC (zero-frequency) component (equal to total intensity = average ), with no higher-frequency content.
Section B: Short Answer Questions
Attempt any EIGHT questions.
Discuss about chain code. Write the shape number of the object having chain code {0, 7, 5, 4, 3, 1}.
Chain Code
A chain code is a boundary (contour) representation that encodes a connected sequence of straight-line segments of specified length and direction. Starting from a chosen boundary pixel and tracing the boundary, each move to the next pixel is recorded as a direction number.
- 4-directional code uses directions 0–3 (E, N, W, S).
- 8-directional code uses directions 0–7 (counter-clockwise, with diagonals):
3 2 1
\ | /
4 -- P -- 0
/ | \
5 6 7
Advantages: compact boundary description; disadvantages: depends on the starting point and is not rotation-invariant, which is fixed by the difference code and shape number.
Shape Number of {0, 7, 5, 4, 3, 1}
Step 1 – First difference (number of counter-clockwise direction changes between consecutive codes, treating the code as circular, mod 8):
Differences for (also wrapping last→first):
| transition | wait, compute |
|---|---|
| 0→7 | |
| 7→5 | |
| 5→4 | |
| 4→3 | |
| 3→1 | |
| 1→0 (wrap) |
First difference (rotation-invariant): 7 6 7 7 6 7
Step 2 – Shape number = the first difference of smallest magnitude when treated as a circular sequence (rotate to the smallest possible integer):
Rotations of 7 6 7 7 6 7: the smallest starts with the smaller digit 6: 6 7 6 7 7 7 and 6 7 7 7 6 7. The numerically smallest is
Its order (length) is 6.
How logic operation on binary images can be used for masking and feature detection? Explain.
Logic Operations on Binary Images for Masking & Feature Detection
On binary images (pixels are 0 or 1), the basic logic operations AND, OR, NOT (complement), XOR are applied pixel-by-pixel between an image and a second image or mask. Because they are functionally complete, they let us select, combine, and isolate regions.
Masking (region selection)
A mask is a binary image whose foreground (1) marks the region of interest (ROI).
- AND with a mask keeps only the pixels where the mask is 1 and forces everything else to 0 — i.e. it extracts/crops the ROI:
- OR is used to insert/merge a region or combine two binary shapes.
- NOT inverts foreground and background (useful to build the complementary mask).
Example: to keep a circular object, AND the image with a circular mask of 1's; pixels outside the circle (mask = 0) become 0.
Feature Detection
- XOR (difference): is 1 only where the two images differ, so XOR between two frames detects change / moving features, and XOR between an object and its eroded version yields the boundary.
- AND with a template highlights where a pattern matches; combined with morphology (hit-or-miss) it detects specific shapes/corners.
- AND/OR of bit-planes or thresholded feature maps isolates pixels satisfying multiple conditions simultaneously.
Summary
| Operation | Use |
|---|---|
| AND | Mask/extract ROI |
| OR | Merge/insert regions |
| NOT | Invert mask/background |
| XOR | Detect differences, boundaries, change |
Thus logic operations provide a simple, fast mechanism for isolating regions (masking) and for detecting features such as boundaries, changes, and template matches.
Define pattern and pattern class. How decision theoretic methods minimize the probability of misclassification?
Pattern and Pattern Class
- A pattern is an arrangement of descriptors (features) that characterise an object. It is usually written as a feature vector in an -dimensional feature space (it may also be a string or a tree for structural recognition).
- A pattern class is a family/category of patterns that share common properties, denoted for classes. Pattern recognition assigns each pattern to its correct class.
Decision-Theoretic Methods and Minimizing Misclassification
Decision-theoretic recognition uses decision (discriminant) functions , one per class. A pattern is assigned to class if
The boundary between classes and is .
Bayes Classifier — minimum-error decision
The probability of misclassification is minimized by the Bayes classifier, which assigns to the class with the largest posterior probability. Using Bayes' rule the decision function becomes
and we choose if for all .
Why it is optimal: at every point in feature space the classifier picks the most probable class, so the conditional error at that point is the smallest possible. Integrating over all , the total average error (Bayes risk) is the minimum achievable by any classifier. Equivalently it places the decision boundary exactly where the posteriors of two classes are equal, allocating each region to the class that is more likely there.
(For Gaussian classes this reduces to comparing Mahalanobis distances; equal covariance gives linear, otherwise quadratic, boundaries.)
Given the following image, detect the edge using magnitude and direction of gradient, using Prewitt operator.
0 30 60
5 32 62
10 38 64
Edge Detection with the Prewitt Operator
Prewitt masks:
( detects vertical edges / horizontal change; detects horizontal edges / vertical change.)
Input image ():
0 30 60
5 32 62
10 38 64
We compute the gradient at the centre pixel (value 32), where the full mask fits.
Horizontal gradient (right column − left column)
Vertical gradient (bottom row − top row)
Gradient Magnitude
Gradient Direction
Interpretation
The large magnitude () indicates a strong edge at the centre pixel. Since , the intensity changes mainly in the horizontal direction (values increase left→right), so the edge is essentially vertical, with the gradient pointing almost horizontally ( above horizontal).
What is image segmentation? How do you detect horizontal and vertical line?
Image Segmentation
Image segmentation is the process of partitioning an image into multiple regions (sets of pixels) that are meaningful for analysis, so that pixels within a region are similar and adjacent regions differ. Formally, segmentation divides image into regions such that:
- (complete),
- each is connected,
- for (disjoint),
- a predicate (each region is homogeneous), and
- for adjacent regions.
Approaches are based on discontinuity (points, lines, edges) or similarity (thresholding, region growing).
Detecting Horizontal and Vertical Lines
Lines are detected by convolving the image with directional line masks that give a strong response when the local pattern matches that orientation.
Horizontal line mask (responds to a row of high values):
-1 -1 -1
2 2 2
-1 -1 -1
Vertical line mask (responds to a column of high values):
-1 2 -1
-1 2 -1
-1 2 -1
Procedure
- Convolve the image with the mask to obtain response .
- The mask coefficients sum to zero, so flat regions give and a matching line gives a large .
- Threshold the response: if , mark the pixel as a line point of that orientation.
Applying the horizontal mask isolates horizontal lines and the vertical mask isolates vertical lines; ±45° masks similarly detect diagonal lines.
Describe the steps in digital image processing.
Steps (Fundamental Stages) in Digital Image Processing
The standard pipeline (Gonzalez & Woods) proceeds as follows, with the knowledge base guiding every stage:
- Image Acquisition — capture the image with a sensor and digitize it (sampling + quantization). May include simple pre-processing like scaling.
- Image Enhancement — improve appearance subjectively (e.g. contrast stretch, histogram equalization, sharpening) to highlight features of interest.
- Image Restoration — objectively recover a degraded image using a mathematical model of the degradation and noise (e.g. inverse, Wiener filtering).
- Colour Image Processing — handle colour models (RGB, HSI, CMYK) and colour-based operations; important for web and multimedia.
- Wavelets and Multiresolution Processing — represent the image at multiple resolutions; basis for compression and pyramidal analysis.
- Compression — reduce storage/bandwidth by removing redundancy (e.g. JPEG, run-length, Huffman coding).
- Morphological Processing — extract structure/shape using set operations (dilation, erosion, opening, closing); bridges processing and analysis.
- Segmentation — partition the image into objects/regions (thresholding, edge/region methods). A critical and difficult step.
- Representation and Description — represent segmented regions by boundary (chain code) or region (texture) and compute descriptors/features.
- Object Recognition — assign a label to an object based on its descriptors (decision-theoretic or structural recognition).
Throughout, the Knowledge Base stores prior information that controls and coordinates the interaction between the modules.
Acquisition -> Enhancement -> Restoration -> Colour -> Wavelets
-> Compression -> Morphology -> Segmentation
-> Representation/Description -> Recognition
(all guided by the Knowledge Base)
How do you measure distance between pixels? Discuss about region oriented segmentation.
Measuring Distance Between Pixels
For pixels at and at , the common distance measures are:
- Euclidean distance :
Points within form a disk of radius .
- City-block / Manhattan distance (moves along 4-neighbours):
Equidistant points form a diamond.
- Chessboard distance (moves along 8-neighbours):
Equidistant points form a square.
A valid distance metric satisfies (=0 iff ), , and the triangle inequality .
Region-Oriented Segmentation
Region-based methods group pixels directly into regions using a similarity (homogeneity) predicate , rather than detecting edges.
1. Region Growing
Start from one or more seed pixels and iteratively append neighbouring pixels that satisfy the predicate (e.g. intensity difference below a threshold). Growth stops when no neighbour qualifies. Pros: produces connected regions; cons: result depends on seed and threshold choice, sensitive to noise.
2. Region Splitting and Merging
Uses a quadtree:
- Split: if a region is not homogeneous (), divide it into four quadrants; repeat recursively.
- Merge: combine adjacent regions whose union is homogeneous ().
The process stops when no region can be split or merged, yielding a final segmentation. Region methods guarantee connected, closed regions but can be computationally heavy.
Define clipping and contrast stretching. Compute Hadamard transform of the data sequence {1, 2, 0, 3}.
Clipping and Contrast Stretching
-
Clipping is a point operation that forces all intensities outside a chosen range to fixed limits — values below become (or ) and values above become (or ). It is a special case of contrast stretching with the slope set to 0 outside the band, used to suppress unwanted background/noise levels and isolate a feature band.
-
Contrast stretching expands a narrow range of input intensities to span the full available range , increasing contrast. Using control points and , the piecewise-linear transform stretches the mid-range while compressing the dark and bright ends. With it maps :
Hadamard Transform of {1, 2, 0, 3}
The order-4 (natural-ordered) Hadamard matrix is :
With input vector , the transform is :
If the normalized form (with ) is required:
Distinguish between forward and inverse transform. Define pixel coding, run length and bit plane.
Forward vs Inverse Transform
| Aspect | Forward Transform | Inverse Transform |
|---|---|---|
| Direction | Spatial domain transform domain | Transform domain spatial domain |
| Purpose | Analysis — decompose image into frequency/basis coefficients | Synthesis — reconstruct the image from coefficients |
| Example (DFT) | ||
| Kernel | Forward kernel | Conjugate kernel (with scaling) |
| Used in | Filtering/compression: get coefficients to modify | Recover processed image after modification |
In processing we apply the forward transform, modify coefficients (filter/quantize), then apply the inverse transform to obtain the result.
Pixel Coding, Run Length, Bit Plane
-
Pixel (PCM) coding: the basic representation where each pixel's intensity is coded independently using a fixed number of bits (e.g. 8 bits/pixel). It removes coding redundancy by assigning shorter codes to more frequent gray levels (variable-length / Huffman coding) instead of equal-length codes.
-
Run-length encoding (RLE): a lossless method that replaces sequences (runs) of identical pixels with a (value, run-length) pair. Highly effective for images with long uniform stretches (binary/fax images). Example:
0 0 0 0 1 1 → (0,4)(1,2). -
Bit plane (slicing): an -bit image is decomposed into binary planes, one per bit position. The most significant bit-plane holds the major structure, while lower planes hold fine detail/noise. Coding only the high-order planes (often with RLE) achieves compression; bit-plane slicing also aids analysis and watermarking.
Frequently asked questions
- Where can I find the BSc CSIT (TU) Image Processing (BSc CSIT, CSC413) question paper 2082?
- The full BSc CSIT (TU) Image Processing (BSc CSIT, CSC413) 2082 (Regular (annual)) 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) 2082 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) 2082 paper?
- The BSc CSIT (TU) Image Processing (BSc CSIT, CSC413) 2082 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.