Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
Paper format: National Exams, December 2015 — 04-Bio-B4 Digital Image Processing. Three hours, open book (any paper notes or textbooks permitted, but no calculator or computer). Six questions of equal value (20 marks each); five constitute a complete paper and only the first five appearing in the answer book are marked. All six are solved here, because this set is a study resource rather than an examination script. Every question is essay/descriptive (definitions, algorithm/system design) except the convolution-size and complexity items in Question 2, the median-filter nonlinearity proof in Question 2(d)(ii), and the illustrative numeric examples worked into Questions 4 and 6.
Reference texts (the books a candidate should have reviewed for this subject):
R. C. Gonzalez & R. E. Woods, Digital Image Processing, 4th ed. — chs. on spatial/frequency-domain filtering, colour image processing, restoration, wavelets, morphology, segmentation, and medical/biological imaging.
Given. A colour RGB image $I$ at 0.1 mm/pixel resolution, containing a pigmented, slightly-raised lesion 1–10 mm wide (10–100 px at this resolution).
Find. (a) A segmentation strategy that localizes the lesion boundary. (b) A classification strategy that flags irregular (shape and/or colour) lesions as suspicious.
Approach. Segment using colour, since a pigmented lesion contrasts with surrounding skin in colour more reliably than in intensity alone; classify using the same shape/colour features the ABCDE clinical rule already uses, made quantitative.
Proposed melanoma-assessment pipeline: segment the lesion by colour, extract independent shape and colour irregularity features, then classify.
(a) Segmentation
Convert to a perceptual colour space. Convert $I$ from RGB to CIELab or HSV (Question 1(c)) so that pigmentation-based thresholding is far more robust to illumination variation across the image than thresholding raw RGB would be.
Colour threshold + morphological clean-up. Threshold on chroma/saturation and the $a^*/b^*$ (or hue) channels to separate pigmented lesion pixels from normal skin, then apply a small morphological opening/closing (Question 1(g)) to remove speckle false-positives and fill small gaps, leaving one connected foreground region.
Refine the boundary. Use the thresholded mask to initialize an active-contour (snake) or level-set boundary refinement, which locks onto the true lesion edge (including its irregularities) far more accurately than the coarse threshold boundary alone, since a snake explicitly balances an edge-attraction term against a smoothness prior rather than making a hard per-pixel decision.
(b) Classification
Two independent feature families are extracted from the segmented lesion mask and its enclosed colour pixels, directly quantifying the clinical "irregular shape, irregular colour" indicator stated in the question:
Shape irregularity: compactness. Compute the isoperimetric ratio $C=\dfrac{P^2}{4\pi A}$ from the segmented boundary's perimeter $P$ and enclosed area $A$ ($C=1$ for a perfect circle, growing with every added concavity/protrusion). For illustration, a round (disk-shaped) lesion gives $C\approx1.77$ (the pixel-quantized baseline for a perfectly regular boundary at this resolution), while a multi-lobed, star-shaped test lesion of comparable size gives $C\approx10.7$ — a threshold of $C>5$ cleanly separates the two.
Colour irregularity: pigment variance. Compute the variance of a representative colour channel (or a cluster count in Lab space) across all pixels inside the segmented mask; a single, fairly uniform pigment gives low variance, while multiple distinct colour zones (tan, dark brown, black, or red — the "multiple colours" ABCDE criterion) give high variance. For illustration, a near-uniform pigmentation gives variance $=2.0$, while a four-toned pigmentation gives variance $=2736.0$ — three orders of magnitude apart, so a threshold of $200$ separates them without any risk of ambiguity at these extremes.
Combine. Flag the lesion as suspicious (refer for clinical/dermoscopic follow-up) if either the shape-compactness threshold or the colour-variance threshold is exceeded, rather than requiring both — consistent with clinical practice, where either an irregular border or irregular colouring alone is enough to warrant referral.
Feature
Regular (benign) example
Irregular (suspicious) example
Threshold
Shape compactness $C=P^2/4\pi A$
≈1.77 (disk)
≈10.7 (star-lobed)
$C>5$
Colour variance
2.0 (near-uniform)
2736.0 (four-toned)
variance $>200$
Check: assumes the lesion has already been correctly separated from surrounding skin (segmentation errors propagate directly into both features); the compactness/variance example numbers above are from synthetic test shapes/colour sets built to be unambiguously regular or irregular, chosen to validate the classifier logic itself rather than to set a clinically-calibrated threshold, which would require a labelled dermoscopic dataset in practice.