📚 Chapters

🖼️ Digital Image Processing

Unit 2 — Image Restoration & Color Image Processing

🧹Chapter 1 — Image Restoration
🧹 CHAPTER 1 — IMAGE RESTORATION MIND MAP
Model → g(x,y) = h(x,y) * f(x,y) + η(x,y) ⇒ G(u,v) = H(u,v)F(u,v) + N(u,v)
Noise models → Gaussian, Rayleigh, Erlang, Exponential, Uniform, Salt & Pepper, Periodic
Noise only → Spatial: mean and order-statistic filters | Frequency: band-reject, notch
Degradation → Linear position-invariant → estimate H (observation, experiment, model)
Restoration filters → Inverse → Wiener (MMSE) → Constrained Least Squares

1. Image Restoration — Introduction and Degradation Model

📖 Image restoration: Recovering the original image from a degraded image by using knowledge of how it was degraded (blur and noise). It is an objective process based on mathematical or statistical models.
💡 Analogy: Enhancement is like applying a filter to make a photo look nicer. Restoration is like removing the actual dust and blur from an old photo, using what we know about what damaged it.
f(x,y) original→Degradation h→+ noise η(x,y)→g(x,y) degraded→Restoration filter→f̂(x,y) estimate
📐 Degradation model
Spatial domain: g(x,y) = h(x,y) * f(x,y) + η(x,y) (* = convolution)
Frequency domain: G(u,v) = H(u,v) F(u,v) + N(u,v)
h = degradation function (blur), η = additive noise, f̂ = estimated (restored) image
Objective: Obtain an estimate f̂(x,y) that is as close as possible to the original image f(x,y).
EnhancementRestoration
NatureSubjective (looks better)Objective (closer to the original)
UsesContrast stretching, histogram equalizationDegradation model, noise model
AimBetter visual appearanceUndo the damage

2. Noise Models

📖 Noise is unwanted random variation of pixel values, added during image acquisition (sensor, light, temperature) or transmission. It is described by a probability density function (pdf) of its gray-level values.
GaussianUniformSalt & pepperpeppersaltbell curveflattwo spikes
Shapes of the noise probability density functions (pdf).
NoiseTypical sourceIdea
GaussianElectronic circuit noise, sensor noise in poor light or high temperatureBell-shaped pdf, small changes are most likely
RayleighRange imagingSkewed pdf
Erlang (Gamma)Laser imagingSkewed pdf
ExponentialLaser imagingSpecial case of Erlang
UniformQuantization, random number generatorsAll values in a range are equally likely
Salt & pepper (impulse)Faulty switching, transmission errors, dead pixelsPixels become black or white
PeriodicElectrical or electromagnetic interferenceRepeating pattern, spikes in the spectrum
📐 Two pdfs to remember
Gaussian: p(z) = [1 / (√(2π) σ)] · e−(z−μ)² / (2σ²) (μ = mean, σ² = variance)
Salt & pepper: p(z) = Pa for z = a (pepper, black), Pb for z = b (salt, white), 0 otherwise
Salt-and-pepper noise: only a few pixels are corrupted, but they are replaced completely by the extreme values 0 or L−1. The other pixels stay unchanged.

3. Restoration in the Presence of Noise Only — Spatial Filtering

📖 When only noise is present (no blur), g = f + η. Then we can restore by simply filtering the image with a small window (m × n) of neighbours.
FilterFormula (window S)Good for
Arithmetic mean(1/mn) Σ g(s,t)Gaussian, uniform
Geometric mean[Π g(s,t)]1/mnGaussian (loses less detail)
Harmonic meanmn / Σ [1/g(s,t)]Salt, Gaussian (fails for pepper)
ContraharmonicΣ gQ+1 / Σ gQQ > 0 removes pepper, Q < 0 removes salt
Medianmedian of windowSalt & pepper
Max / Minmax / min of windowPepper / Salt
Midpoint½ (max + min)Gaussian, uniform
Alpha-trimmed meanmean after dropping d/2 lowest and d/2 highestMixed noise
Worked example: 3 × 3 window with one salt pixel
1012255
111312
101112
Arithmetic mean346 ÷ 9 ≈ 38. The salt pixel (255) drags every neighbour up and smears the image.
MedianSorted: 10 10 11 11 12 12 12 13 255 → median = 12. The outlier is removed cleanly.
Adaptive filters change their behaviour with local variance (adaptive local noise reduction) or window size (adaptive median), so they remove noise and keep edges better.

4. Restoration in the Frequency Domain — Periodic Noise

📖 Periodic noise repeats in a pattern (stripes). In the Fourier spectrum it appears as a few bright spikes, so we remove those frequencies.
DCnoise spike(notch it)symmetricpair
Periodic noise shows up as a symmetric pair of bright spikes. A notch reject filter removes them.
FilterWhat it does
Band-reject (ideal, Butterworth, Gaussian)Blocks a ring of frequencies around the origin
Band-passOpposite of band-reject, keeps only that ring (shows the noise itself)
Notch rejectBlocks small areas around chosen spikes (in symmetric pairs)
Notch passKeeps only those areas, to view the noise pattern

5. Linear, Position-Invariant Degradations

📖 Linear: H[a f1 + b f2] = a H[f1] + b H[f2]. Position-invariant: the response at a point depends only on the input value there, not on the position: H[f(x−α, y−β)] = g(x−α, y−β).
Why useful: Such a degradation is a convolution with h(x,y), so g = h * f + η and G = H·F + N. The convolution theorem lets us work in the frequency domain.
💡 Examples: motion blur, out-of-focus blur and atmospheric turbulence are modelled as linear position-invariant degradations.

6. Estimating the Degradation Function

📖 Blind restoration problem: H is usually not known, so it must be estimated. There are three ways.
1. ObservationTake a small part of the degraded image Gs. Estimate its original F̂s by hand. Then Hs(u,v) = Gs(u,v) / F̂s(u,v).
2. ExperimentationPhotograph a bright dot (impulse) with the same equipment. Then H(u,v) = G(u,v) / A (A = strength of the impulse).
3. Mathematical modellingUse a physical model. Atmospheric turbulence: H(u,v) = e−k(u²+v²)5/6. Motion blur: sinc-type model.
Larger k in the turbulence model means stronger blur. Motion blur depends on the exposure time T and the motion direction.

7. Inverse Filtering

📖 Inverse filtering: The simplest restoration method. Divide the degraded spectrum by the degradation function: F̂(u,v) = G(u,v) / H(u,v).
💡 Analogy: If a message was scrambled by a known rule, apply the reverse rule. But if noise was added after scrambling, the reverse rule also magnifies the noise.
G(u,v)→÷ H(u,v)→F̂(u,v)→inverse FFT→f̂(x,y)
📐 Why noise is a problem
F̂ = G / H = (H F + N) / H = F + N / H
Where H(u,v) is very small or zero, N/H becomes huge and noise dominates
Example: |H| = 0.01, N = 0.5 → N/H = 50 (noise amplified 100 times)
Fix: Apply the division only near the origin (inside a cut-off radius), where H is large, or ignore frequencies where |H| is below a small threshold.
Limit: Works well only when noise is very small or absent.

8. Minimum Mean Square Error (Wiener) Filtering

📖 Wiener filter: A statistical filter that restores the image while minimising the mean square error e² = E{(f − f̂)²} between the original and the estimate. It handles both blur and noise.
📐 Wiener filter
F̂(u,v) = [ (1/H) · |H|² / (|H|² + Sη/Sf) ] · G(u,v)
Sη = noise power spectrum, Sf = image power spectrum
If both are unknown: use a constant K, F̂ = [ (1/H) · |H|² / (|H|² + K) ] G
If noise = 0 (Sη = 0), it becomes the inverse filter
Objectives: (1) minimise the mean square error, (2) remove blur and noise together, (3) avoid the noise amplification of the inverse filter, (4) use the statistics of image and noise.
Limit: Needs the power spectra (or a good guess of K), which are often unknown.

9. Constrained Least Squares Filtering

📖 CLS filtering: Restores the image by making it as smooth as possible (minimising the Laplacian) while keeping ‖g − H f̂‖² equal to the noise energy ‖η‖².
📐 CLS filter
F̂(u,v) = [ H*(u,v) / ( |H(u,v)|² + γ |P(u,v)|² ) ] G(u,v)
P(u,v) = Fourier transform of the Laplacian p(x,y) = [0 −1 0; −1 4 −1; 0 −1 0]
γ is a parameter, adjusted until ‖r‖² = ‖η‖², where r = g − H f̂
Advantage over Wiener: Needs only the mean and variance of the noise, not the power spectra.

10. Inverse vs Wiener vs Constrained Least Squares

InverseWiener (MMSE)CLS
NeedsH onlyH + power spectra of noise and image (or K)H + noise mean and variance
NoiseAmplifiedBalanced by K or Sη/SfControlled by γ
CriterionExact divisionMinimum mean square errorSmoothness with a noise constraint
Special case—No noise → inverse filterγ = 0 → inverse filter
🎨Chapter 2 — Color Image Processing, Wavelets & Morphology
🎨 CHAPTER 2 — COLOR, WAVELETS & MORPHOLOGY MIND MAP
Colour → Fundamentals → models RGB, CMY/CMYK, HSI → pseudocolor
Wavelets → Multiresolution: LL approximation + detail subbands, Haar
Morphology → Dilation, erosion → opening, closing → hit-or-miss, structuring element (strel)

1. Color Fundamentals

📖 Colour: Visible light is a narrow band of electromagnetic waves, about 400 to 700 nm. We see colour because cones in the eye respond to red, green and blue light (about 65% red, 33% green, 2% blue sensitive).
RGBYCMW
Additive mixing of light: R+G = Yellow, G+B = Cyan, R+B = Magenta, R+G+B = White.
Primary colours of light (additive)Primary colours of pigments (subtractive)
ColoursRed, Green, BlueCyan, Magenta, Yellow
Mixing allWhiteBlack (in theory)
Used inMonitors, cameras, TVPrinters
Three attributes of colour: Brightness (intensity), Hue (dominant colour, e.g. red), Saturation (purity, how little white is mixed in). Hue and saturation together are called chromaticity.

2. Color Models

📖 Colour model: A way to describe every colour by numbers in a coordinate system.
1. RGB model (additive)
Each colour is a point in a unit cube with R, G, B axes. A pixel with 8 bits per channel uses 24 bits, which gives 224 = 16,777,216 colours (a full-colour image).
Corner(R, G, B)
Black(0, 0, 0)
Red(1, 0, 0)
Green(0, 1, 0)
Blue(0, 0, 1)
Cyan(0, 1, 1)
Magenta(1, 0, 1)
Yellow(1, 1, 0)
White(1, 1, 1)
Corners of the RGB colour cube. The gray levels lie on the line from black (0,0,0) to white (1,1,1).
2. CMY and CMYK model (subtractive)
📐 RGB → CMY (values normalised to 0–1)
C = 1 − R, M = 1 − G, Y = 1 − B
Example (255, 128, 64): C = 255 − 255 = 0, M = 255 − 128 = 127, Y = 255 − 64 = 191 → CMY = (0, 127, 191)
CMYK adds K (black ink), because mixed CMY inks give a muddy dark colour, not a true black
3. HSI model
Separates intensity (I) from the colour information (Hue and Saturation). It is close to how humans describe colour, so it is good for processing.
📐 RGB → HSI
I = (R + G + B) / 3
S = 1 − [3 / (R + G + B)] · min(R, G, B)
θ = cos−1 { ½[(R−G) + (R−B)] / [(R−G)² + (R−B)(G−B)]1/2 }
H = θ if B ≤ G, else H = 360° − θ
Example (255, 128, 64): I = 0.58, S = 0.57, H = 19.2° (orange)
ModelBest for
RGBCapture and display (cameras, monitors)
CMY / CMYKPrinting
HSIProcessing: enhance intensity without changing colour, segment by hue

3. Pseudocolor Image Processing

📖 Pseudocolor (false colour) processing: Assigning colours to gray levels of a grayscale image by a rule. The colours are artificial, they do not show the real colour of the scene.
💡 Why? The human eye can tell only about two dozen shades of gray, but thousands of colours. So colour makes small intensity differences visible.
Gray image levels
Pseudocolor (colour map)
Pseudocolor assigns a colour to every gray level, so small intensity differences become easy to see.
Method 1: Intensity (density) slicing
0–63
64–127
128–191
192–255
Intensity slicing: each range of gray levels gets one colour.
Treat the image as a 3-D surface and cut it with planes at chosen gray levels. Every range between planes gets a colour.
Method 2: Gray level to colour transformation
Apply three independent functions fR, fG, fB to each gray level. The three outputs feed the red, green and blue channels of the result.
Role in medical imaging: X-ray, CT, MRI and PET images are gray. Pseudocolor highlights tumours and lesions, shows bone density, blood flow or hot spots in PET, and separates tissue types, so doctors can see and measure them easily.
Caution: It adds no new information. A badly chosen colour map can mislead the viewer.

4. Wavelets and Multiresolution Processing

📖 Background: Objects in an image appear at different scales (large shapes, fine details). Wavelet analysis looks at the image at many resolutions at the same time (multiresolution).
💡 Analogy: Google Maps. Zoomed out you see the cities (approximation), zoomed in you see streets (details).
Multiresolution expansions
📐 Key ideas
Series expansion: f(x) = Σk αk φk(x)
Scaling function: φj,k(x) = 2j/2 φ(2jx − k), spans the approximation space Vj
Wavelet function: ψj,k(x) = 2j/2 ψ(2jx − k), spans the detail space Wj
Vj+1 = Vj ⊕ Wj (next finer approximation = approximation + details)
Haar: φ(x) = 1 for 0 ≤ x < 1; ψ(x) = +1 for 0 ≤ x < ½, −1 for ½ ≤ x < 1
1-D Haar example: signal [4, 6, 10, 12]
StepWorkingResult
Pairs(4, 6) and (10, 12)average = 5 and 11, detail = −1 and −1
Next levelAverage pair (5, 11)average = 8, detail = −3
Haar output[average, details][8, −3, −1, −1]
Detail = (a − b) / 2, average = (a + b) / 2. The original signal can be rebuilt exactly.
2-D wavelet transform
Level 1LLHLLHHHLevel 2LL2HL2LH2HH2HL1LH1HH1
LL = approximation. LH, HL, HH = details (edges in different directions). Level 2 splits only LL again.
Uses: compression (JPEG 2000), noise removal, edge detection, pyramids.

5. Morphological Image Processing — Dilation and Erosion

📖 Morphology: Image processing based on shapes. A small shape called the structuring element (SE) B is moved over the binary image A and compared with it.
💡 Analogy: B is a stamp. Dilation: stamp every object pixel, the object grows. Erosion: keep a pixel only if the whole stamp fits inside the object, the object shrinks.
Dilation A ⊕ BErosion A ⊖ B
Definition{z | (B̂)z ∩ A ≠ ∅}{z | (B)z ⊆ A}
EffectGrows objects, fills small gaps, bridges breaksShrinks objects, removes small objects and thin lines
DualityDilation of A = complement of erosion of Ac by B̂
Structuring element decomposition
Dilation is associative: A ⊕ (B1 ⊕ B2) = (A ⊕ B1) ⊕ B2. So a large SE can be split into small ones, which saves computation.
💡 Example: a 5 × 5 square = (1 × 5 row) ⊕ (5 × 1 column). Using two passes costs 5 + 5 = 10 operations per pixel, instead of 25.
The strel function (MATLAB)
CallCreates
strel('square', w)Square SE of width w
strel('disk', r)Disk of radius r
strel('diamond', r)Diamond of radius r
strel('line', len, deg)Line of length len at angle deg
strel('arbitrary', nhood)Any shape given as a 0/1 matrix
getsequence(se) returns the decomposed small SEs. Then imdilate / imerode use them for faster output.

6. Combining Dilation and Erosion — Opening and Closing

Opening A ∘ BClosing A • B
Formula(A ⊖ B) ⊕ B (erode, then dilate)(A ⊕ B) ⊖ B (dilate, then erode)
EffectSmooths contours, removes thin protrusions and small objectsFills small holes, joins narrow gaps
KeepsObjects bigger than BOverall object size
Idempotent(A ∘ B) ∘ B = A ∘ B(A • B) • B = A • B
A (block + spur + noise dot)
Erosion A ⊖ B
Dilation A ⊕ B
Opening A ∘ B
B = 3×3 square. Opening removes the spur and the dot, and keeps the block.
A with a hole
Closing A • B
Closing fills the small hole.
Duality: (A • B)c = Ac ∘ B̂. Opening and closing do not change the object size much, unlike plain erosion or dilation.

7. Hit-or-Miss Transformation

📖 Hit-or-miss: A shape detector. It finds places where the object part B1 fits inside A and the background part B2 fits inside the complement of A.
📐 Formula
A ⊛ B = (A ⊖ B1) ∩ (Ac ⊖ B2)
B1 = pixels that must be object, B2 = pixels that must be background
000
010
000
B: isolated pixel pattern
A: finds the lone pixel
Green 1 = must be object, red 0 = must be background. Only the lone pixel matches.
Uses: detecting isolated pixels, corners, specific patterns; the base of thinning and thickening.
📚Self-Study Topic

1. Self-Study — Linear Algebra, Vector Calculus and Probability

ConceptMeaningUsed in DIP for
Vector, matrixOrdered numbers; a table of numbers. An image is a matrixImage representation, transforms
Eigenvalues and eigenvectorsDirections a matrix only stretchesHotelling (KL) transform, PCA
Matrix multiplication and inverseCombining and undoing linear operationsRestoration (inverting H)
Gradient ∇fVector of partial derivatives [∂f/∂x, ∂f/∂y]Edge detection, sharpening
Laplacian ∇²fSum of second derivativesSharpening, CLS filter
Random variable, pdfA value with a probability distributionNoise models
Mean μ, variance σ²Average and spreadNoise parameters, adaptive filters
Gaussian distributionBell-shaped pdfGaussian noise and filters
⚡Ready for Exam?Sab padh liya? Ab Quick Revision karo — definition, example aur diagram ek jagah!Quick Revision Karo →
⚡Quick Revision — Last Minute Exam Prep!
📌 How to use: Har topic mein pehle Definition, phir Example, phir Diagram hai.

🧹 Chapter 1 — Image Restoration

1. Restoration and Degradation Model
📖 Definition: Recovering the original image from a degraded one using a model of blur and noise.
💡 Example: g = h * f + η in space, G = H F + N in frequency.
f(x,y) original→Degradation h→+ noise η(x,y)→g(x,y) degraded→Restoration filter→f̂(x,y) estimate
2. Noise Models
📖 Definition: Noise is described by a pdf. Gaussian: sensor noise. Salt & pepper: black and white spots.
💡 Example: A few pixels become 0 or 255, the rest stay unchanged.
GaussianUniformSalt & pepperpeppersaltbell curveflattwo spikes
Shapes of the noise probability density functions (pdf).
3. Filters for Noise Only
📖 Definition: Mean filters smooth Gaussian noise. Order-statistic filters (median, max, min) handle impulse noise.
💡 Example: Window 10 12 255 / 11 13 12 / 10 11 12: mean ≈ 38, median = 12.
1012255
111312
101112
Arithmetic mean346 ÷ 9 ≈ 38. The salt pixel (255) drags every neighbour up and smears the image.
MedianSorted: 10 10 11 11 12 12 12 13 255 → median = 12. The outlier is removed cleanly.
NoiseFilter
GaussianArithmetic / geometric mean
SaltMin, harmonic, contraharmonic Q < 0
PepperMax, contraharmonic Q > 0
Salt & pepperMedian, alpha-trimmed mean
PeriodicNotch / band-reject (frequency)
4. Periodic Noise
📖 Definition: Repeating noise that shows as bright spikes in the spectrum.
💡 Example: Remove the spike pair with a notch reject filter.
DCnoise spike(notch it)symmetricpair
Periodic noise shows up as a symmetric pair of bright spikes. A notch reject filter removes them.
5. Inverse, Wiener and CLS
📖 Definition: Inverse: F̂ = G/H (amplifies noise). Wiener: minimises mean square error. CLS: smoothest result with a noise constraint.
💡 Example: |H| = 0.01, N = 0.5 → inverse filter noise N/H = 50.
InverseWienerCLS
NeedsHH, Sη, Sf (or K)H, noise mean and variance
NoiseAmplifiedBalancedControlled by γ
📐 Filters
Inverse: F̂ = G / H
Wiener: F̂ = [(1/H) |H|² / (|H|² + K)] G
CLS: F̂ = [H* / (|H|² + γ|P|²)] G

🎨 Chapter 2 — Color, Wavelets and Morphology

1. Colour Models
📖 Definition: RGB (additive, display), CMY/CMYK (subtractive, printing), HSI (hue, saturation, intensity, processing).
💡 Example: RGB (255, 128, 64) → CMY (0, 127, 191); HSI ≈ (H 19°, S 0.57, I 0.58).
RGBYCMW
Additive mixing of light: R+G = Yellow, G+B = Cyan, R+B = Magenta, R+G+B = White.
2. Pseudocolor
📖 Definition: Assigning colours to gray levels to make small differences visible.
💡 Example: PET or MRI gray image shown with a colour map to highlight a tumour.
Gray image levels
Pseudocolor (colour map)
Pseudocolor assigns a colour to every gray level, so small intensity differences become easy to see.
0–63
64–127
128–191
192–255
Intensity slicing: each range of gray levels gets one colour.
3. Wavelets
📖 Definition: Multiresolution analysis: approximation (LL) plus details at every level.
💡 Example: Haar [4, 6, 10, 12] → [8, −3, −1, −1].
Level 1LLHLLHHHLevel 2LL2HL2LH2HH2HL1LH1HH1
LL = approximation. LH, HL, HH = details (edges in different directions). Level 2 splits only LL again.
4. Dilation, Erosion, Opening, Closing
📖 Definition: Dilation grows, erosion shrinks. Opening = erosion then dilation. Closing = dilation then erosion.
💡 Example: Opening removes the spur and the dot, closing fills the hole.
A (block + spur + noise dot)
Erosion A ⊖ B
Dilation A ⊕ B
Opening A ∘ B
B = 3×3 square. Opening removes the spur and the dot, and keeps the block.
A with a hole
Closing A • B
Closing fills the small hole.
5. Hit-or-Miss
📖 Definition: Detects a shape: object part fits A and background part fits Ac.
💡 Example: A 3 × 3 pattern with a centre 1 and eight 0s finds isolated pixels.
000
010
000
B: isolated pixel pattern
A: finds the lone pixel
Green 1 = must be object, red 0 = must be background. Only the lone pixel matches.
📄Previous Year Questions
📝 In Semester Test-2 (2026-27)
Branch: BE(CSE/IT)
Subject: Introduction to Digital Image Processing (24CST-311 / 24ITT-311)
Semester: 5  ·  Time: 1 Hour  ·  Max Marks: 20
Section A: 5 × 2 = 10 marks  ·  Section B: 2 × 5 = 10 marks
Attempt all questions

Section A — 2 Marks Questions

2M2026-27
Q1. Describe RGB model for color image processing. [CO1]▼
Answer:
RGB model: A colour model where every colour is made by adding Red, Green and Blue light. It is an additive model used in monitors, cameras and scanners.
  • Colours are points in a unit cube with R, G, B axes (0 to 1)
  • Black = (0,0,0), White = (1,1,1), the gray levels lie on the diagonal
  • 8 bits per channel = 24-bit colour = 16,777,216 colours
Corner(R, G, B)
Black(0, 0, 0)
Red(1, 0, 0)
Green(0, 1, 0)
Blue(0, 0, 1)
Cyan(0, 1, 1)
Magenta(1, 0, 1)
Yellow(1, 1, 0)
White(1, 1, 1)
Corners of the RGB colour cube. The gray levels lie on the line from black (0,0,0) to white (1,1,1).
RGBYCMW
Additive mixing of light: R+G = Yellow, G+B = Cyan, R+B = Magenta, R+G+B = White.
2M2026-27
Q2. How does inverse filtering work? [CO2]▼
Answer:
Inverse filtering divides the Fourier transform of the degraded image by the degradation function: F̂(u,v) = G(u,v) / H(u,v), then takes the inverse FFT.
G(u,v)→÷ H(u,v)→F̂(u,v)→inverse FFT→f̂(x,y)
  • Since G = HF + N, we get F̂ = F + N/H
  • Where H is very small, N/H is huge, so noise is amplified
  • Fix: use only frequencies near the origin or ignore small |H|
2M2026-27
Q3. What are the objectives of Wiener filtering? [CO2]▼
Answer:
Objectives of Wiener filtering
  • Minimise the mean square error E{(f − f̂)²} between original and restored image
  • Remove blur and noise together
  • Avoid the noise amplification of inverse filtering
  • Use the statistics (power spectra) of the image and noise
📐 Wiener filter
F̂ = [(1/H) |H|² / (|H|² + Sη/Sf)] G
With no noise it becomes the inverse filter
2M2026-27
Q4. State image restoration and mention its objective in digital image processing. [CO1]▼
Answer:
Image restoration is recovering the original image from a degraded image by using a model of the degradation (blur h) and the noise (η).
Objective: Get an estimate f̂(x,y) as close as possible to the original f(x,y). It is an objective process, unlike enhancement.
f(x,y) original→Degradation h→+ noise η(x,y)→g(x,y) degraded→Restoration filter→f̂(x,y) estimate
2M2026-27
Q5. What is the effect of salt-and-pepper noise on image pixels? Justify your answer. [CO3]▼
Answer:
Salt-and-pepper noise (impulse noise) replaces some pixels completely by the extreme values: 0 (pepper, black) or L−1 (salt, white).
  • Effect: black and white dots appear scattered over the image
  • Only a few pixels are corrupted. All other pixels stay unchanged
  • A corrupted pixel is a strong outlier, very different from its neighbours
Justification: Its pdf has two spikes, Pa at a = 0 and Pb at b = L−1, and zero elsewhere. So the new pixel value does not depend on the original value. Sources: faulty switching, transmission errors, dead pixels.
1012255
111312
101112
Arithmetic mean346 ÷ 9 ≈ 38. The salt pixel (255) drags every neighbour up and smears the image.
MedianSorted: 10 10 11 11 12 12 12 13 255 → median = 12. The outlier is removed cleanly.
A median filter removes it. A mean filter only smears it.

Section B — 5 Marks Questions

5M2026-27
Q6. Illustrate the role of pseudocolor image processing in medical imaging. [CO3]▼
Answer:
Pseudocolor processing assigns colours to the gray levels of a grayscale image. The colours are artificial and make small intensity differences easy to see.
Why in medicine? X-ray, CT, MRI and PET images are grayscale. The eye separates only about two dozen gray shades but thousands of colours.
Gray image levels
Pseudocolor (colour map)
Pseudocolor assigns a colour to every gray level, so small intensity differences become easy to see.
0–63
64–127
128–191
192–255
Intensity slicing: each range of gray levels gets one colour.
  • Highlights tumours, lesions and abnormal tissue
  • Shows bone density or tissue types in different colours
  • Shows blood flow or hot spots (for example in PET images)
  • Makes measuring and comparing regions easier, so diagnosis is faster and clearer
Limit: It adds no new information, and a poor colour map can mislead.
5M2026-27
Q7. A color image pixel is represented in RGB space as (255,128,64): (a) Convert it into CMY model. (b) Analyze the significance of color model conversion in image processing applications. [CO4]▼
Answer:
(a) RGB (255, 128, 64) → CMY
  1. Normalise: R = 255/255 = 1, G = 128/255 ≈ 0.50, B = 64/255 ≈ 0.25
  2. Use C = 1 − R, M = 1 − G, Y = 1 − B
  3. C = 1 − 1 = 0, M = 1 − 0.50 ≈ 0.50, Y = 1 − 0.25 ≈ 0.75
  4. In 8-bit form: C = 255 − 255 = 0, M = 255 − 128 = 127, Y = 255 − 64 = 191 → CMY = (0, 127, 191)
Answer: CMY = (0, 127, 191) (or (0, 0.50, 0.75) normalised). The colour is orange.
(b) Significance of colour model conversion
ConversionWhy it matters
RGB → CMY / CMYKPrinters mix cyan, magenta, yellow (and black) inks, not light
RGB → HSIIntensity is separated from colour, so we can enhance brightness without changing the hue, and segment objects by hue
Between models in generalEach device or task uses the model that suits it: RGB for capture and display, CMYK for print, HSI for analysis
Without correct conversion, the printed colours would not match the screen.