Segmentation and Region Detection Defining regions in an image

Preview:

Citation preview

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

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.

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

Image Segmentation• Many techniques including

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

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.

Point based methods – thresholding

• If– regions are different brightness or colour

• Then– can be differentiated using this

Global thresholds

• Compute threshold from whole image

• Incorrect in some regions

Local thresholds

• Divide image into regions

• Compute threshold per region

• Merge thresholds across region boundaries

Region Growing

• All pixels belong to a region

• Select a pixel

• Grow the surrounding region

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

Split and Merge

• Initialise image as a region

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

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

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

}}

Recursive Merging

• If adjacent regions are– weakly split

• weak edge

– similar• similar greyscale/colour properties

• Merge them

Edge Following

• Detection– finds candidate edge pixels

• Following– links candidates to form boundaries

4/8 ConnectivityProblem

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

Representing Regions

• Constituent pixels

• Boundary pixels

Based on both regions and edges

Based on the combination of colour and texture

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

Snakes, Active/Dynamic Contours

• Borders follow outline of object

• Outline obscured?

• Snake provides a solution

Algorithm

• Snake computes smooth, continuous border

• Minimises– length of border– curvature of border

• Against an image property– gradient?

EEEE imagecurvaturelengthtot

Minimisation

• Initialise snake

• Integrate energy along it

• Iteratively move snake to global energy minimum

Summary

• Image segmentation

• Region detection– growing– edge following

Recommended