27
Segmentation and Region Detection Defining regions in an image

Segmentation and Region Detection Defining regions in an image

Embed Size (px)

Citation preview

Page 1: Segmentation and Region Detection Defining regions in an image

Segmentation and Region Detection

Defining regions in an image

Page 2: Segmentation and Region Detection Defining regions in an image

Introduction

• All pixels belong to a region– object– part of object– background

• Find region– constituent pixels– boundary

Page 3: Segmentation and Region Detection Defining regions in an image

Image Segmentation

• To distinguish objects from background• To divide the image into regions or segments,

each of which is in some sense homogeneous, but the union of adjacent segments is not homogeneous in the same sense.

• Homogeneity here is characterized by some properties like– smoothly varying intensity, similar statistics,

or colour.

Page 4: Segmentation and Region Detection Defining regions in an image

Region Detection

• A set of pixels P

• An homogeneity predicate H(P)

• Partition P into regions {R}, such that

iR

i1

n

P

H iR True

H iR jR False

Page 5: Segmentation and Region Detection Defining regions in an image

Image Segmentation• Many techniques including

– threshold techniques– edge-based methods– region-based techniques– Image primitive based– connectivity-preserving relaxation methods.

Page 6: Segmentation and Region Detection Defining regions in an image

Threshold techniques

• make decisions based on local pixel information– are effective when the intensity levels of the objects fall

squarely outside the range of levels in the background.

Page 7: Segmentation and Region Detection Defining regions in an image

Point based methods – thresholding

• If– regions are different brightness or colour

• Then– can be differentiated using this

Page 8: Segmentation and Region Detection Defining regions in an image

Global thresholds

• Compute threshold from whole image

• Incorrect in some regions

Page 9: Segmentation and Region Detection Defining regions in an image

Local thresholds

• Divide image into regions

• Compute threshold per region

• Merge thresholds across region boundaries

Page 10: Segmentation and Region Detection Defining regions in an image

Region Growing

• All pixels belong to a region

• Select a pixel

• Grow the surrounding region

Page 11: Segmentation and Region Detection Defining regions in an image

Slow Algorithm

• If a pixel is– not assigned to a region– adjacent to region– has colour properties not different to region’s

• Then– Add to region– Update region properties

Page 12: Segmentation and Region Detection Defining regions in an image

Split and Merge

• Initialise image as a region

• While region is not homogeneous– split into quadrants and examine homogeneity

Page 13: Segmentation and Region Detection Defining regions in an image

Recursive SplittingSplit(P){ If (!H(P)) {

P subregions 1 … 4;Split (subregion 1);Split (subregion 2);Split (subregion 3);Split (subregion 4);

}}

Page 14: Segmentation and Region Detection Defining regions in an image

Recursive Merging

• If adjacent regions are– weakly split

• weak edge

– similar• similar greyscale/colour properties

• Merge them

Page 15: Segmentation and Region Detection Defining regions in an image

Edge Following

• Detection– finds candidate edge pixels

• Following– links candidates to form boundaries

Page 16: Segmentation and Region Detection Defining regions in an image

4/8 ConnectivityProblem

Page 17: Segmentation and Region Detection Defining regions in an image

Contour Tracking

• Scan image to find first edge point

• Track along edge points– spurs?– endpoints?

• Join edge segments

• There would be a record of the edge points constituting each edge segment

Page 18: Segmentation and Region Detection Defining regions in an image
Page 19: Segmentation and Region Detection Defining regions in an image

Representing Regions

• Constituent pixels

• Boundary pixels

Page 20: Segmentation and Region Detection Defining regions in an image

Based on both regions and edges

Page 21: Segmentation and Region Detection Defining regions in an image

Based on the combination of colour and texture

Page 22: Segmentation and Region Detection Defining regions in an image

Active Contour Model- Snake

• A connectivity-preserving relaxation-based segmentation method, - active contour model – snake– The main idea is to start with some initial boundary shape

represented in the form of spline curves, and iteratively modify it by applying various shrink/expansion operations according to some energy function.

• Concepts involved– Image gradient– Smooth operation– Histogram equalization– Energy functions

Page 23: Segmentation and Region Detection Defining regions in an image

Snakes, Active/Dynamic Contours

• Borders follow outline of object

• Outline obscured?

• Snake provides a solution

Page 24: Segmentation and Region Detection Defining regions in an image

Algorithm

• Snake computes smooth, continuous border

• Minimises– length of border– curvature of border

• Against an image property– gradient?

EEEE imagecurvaturelengthtot

Page 25: Segmentation and Region Detection Defining regions in an image

Minimisation

• Initialise snake

• Integrate energy along it

• Iteratively move snake to global energy minimum

Page 26: Segmentation and Region Detection Defining regions in an image
Page 27: Segmentation and Region Detection Defining regions in an image

Summary

• Image segmentation

• Region detection– growing– edge following