ELEC5622 Chap.8 Medical Image Segmentation: Edges, Regions and K-means
Medical Image Segmentation: Edges, Regions and K-means
This chapter covers conventional segmentation, the image-processing half of medical image analysis. Edge-based methods use gradient operators, Prewitt, Sobel and Canny, then link edge pixels. Region-based methods grow from seeds or split inhomogeneous areas. Classification-based methods include unsupervised K-means clustering and supervised patch-based labelling, which Lab 2 practises on an MRI slice.
Sobel and Prewitt are applied by hand to one small intensity patch. It closes with how the Lab 2 marking criteria split marks between filter definitions, results and explanation. Hand calculations of Sobel, Prewitt and K-means make the methods concrete before Lab 2 runs them in Python.
What this chapter covers
- 01
Segmentation versus classification
- 02
Image gradient, edge strength and direction
- 03
Prewitt and Sobel operators
- 04
The five steps of Canny edge detection
- 05
Region growing and region splitting
- 06
Unsupervised K-means clustering
- 07
Supervised and patch-based segmentation
Worked example · free
Prewitt response at a horizontal edge
- 1Gx: each row's right minus left value is 0, so Gx = 0.
- 1Gy: bottom row sum 300 minus top row sum 0 gives Gy = 300.
- 1Magnitude = √(0² + 300²) = 300, and the gradient aims straight down, at 90°, so the edge runs horizontally.
Key terms
- Canny edge detector
- The Canny edge detector smooths, differentiates, thresholds, thins and links edges to give one response per edge.
- Region growing
- Region growing is a segmentation method that expands from seed pixels by merging similar neighbours.
- K-means clustering
- K-means clustering is an unsupervised method that alternates nearest-centre assignment and centre averaging.
- Edge linking
- Edge linking joins adjacent edge pixels into continuous contours after edge detection.
- Image segmentation
- Image segmentation is the separation of target objects, such as organs or lesions, from the rest of an image.
Medical Image Segmentation: Edges, Regions and K-means FAQ
Why is Sobel preferred to Prewitt?
Sobel weights the centre row or column twice, which adds a little smoothing to the derivative. The lecture notes Prewitt is more sensitive to noise, and Sobel is the most commonly used operator for emphasising edges.
Why can K-means give different results on repeated runs?
The final partition depends on the initial centroids. Different starts can converge to different local solutions, which is why the lecture stresses initialisation and why Lab 2 asks whether repeated runs change the result.
When are region-based methods better than edge-based ones?
Regions cover more pixels than edges, so they carry more information, can use texture directly and cope better with noise. They need a seed or a homogeneity rule, and region growing results change with the chosen seed.
What is non-maximal suppression in Canny edge detection?
After the gradient is computed, each pixel is kept only if its gradient magnitude is a local maximum across the edge direction. This thins wide gradient ridges to edges one pixel wide before hysteresis links them.
How does patch-based segmentation use neighbouring pixels?
The image is cut into small overlapping patches, features are extracted from each, and each patch is classified. The label goes to the patch's centre pixel, so every decision reflects the surrounding neighbourhood rather than one value.
What must you choose before running K-means?
The lecture lists three presets: the number of clusters, the maximum number of iterations and a convergence threshold. Initial centroids matter as well, because different starting points can lead the algorithm to different final groups.
Exam move
Apply Sobel and Prewitt to small invented patches until the arithmetic is automatic, always stating your sign convention. Run K-means by hand on six to ten numbers, recording centres after each update. List the Canny steps in order and say what each removes, then compare edge and region methods in a short table.
Add a short note on what supervised and unsupervised segmentation each need before they can run, since Lab 2 asks for their advantages and disadvantages. Finally, write the K-means update in two lines, assignment then averaging, and check it on a set where you know the answer.
Working through Medical Image Segmentation: Edges, Regions and K-means in ELEC5622? Sia is AskSia’s AI Electrical Engineering tutor — ask any ELEC5622 Medical Image Segmentation: Edges, Regions and K-means question and get a clear, step-by-step explanation grounded in how ELEC5622 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.