Segmentation Basics MCQ
Thresholding (global, Otsu, adaptive) and morphological operations for binary masks and region cleanup.
Image Thresholding MCQ
Thresholding for segmentation
Thresholding partitions pixels into foreground and background (or multiple levels). It is fast but assumes separable intensity distributions.
Otsu’s method
Chooses T by maximizing between-class variance for a bimodal-ish histogram—automatic global threshold when classes are separable.
When to use what
Global
One T for the whole image—simple, fails under uneven illumination.
Adaptive
Local mean/Gaussian-weighted thresholds per neighborhood—handles shading gradients.
Invert & polarity
Know whether objects are dark-on-bright or bright-on-dark; invert maps if needed.
Post-process
Morphology often cleans threshold noise (salt-and-pepper) before contour extraction.
Pipeline snippet
Optional blur → Threshold → Morphology → Contours / features
Morphological Operations MCQ
Mathematical morphology
Morphology processes shapes using a structuring element (SE): erosion shrinks foreground, dilation grows it; openings remove speckles, closings fill gaps.
Duality
Erosion on foreground relates to dilation on background—design SE size/shape for the defect scale you target.
Operators
Erosion
Local minimum over SE support—removes thin protrusions, separates touching objects if SE fits.
Dilation
Local maximum—bridges small gaps, thickens strokes.
Opening
Erosion then dilation—suppresses bright noise smaller than SE.
Closing
Dilation then erosion—fills dark holes smaller than SE.
Post-threshold cleanup
Binary map → Opening/Closing → Connected components