25
CS292 Computational Vision and Language Segmentation and Region Detection

CS292 Computational Vision and Language Segmentation and Region Detection

  • View
    224

  • Download
    0

Embed Size (px)

Citation preview

CS292 Computational Vision and Language

Segmentation and Region Detection

Introduction

• All pixels belong to a region, which can be– an object– part of object– background

• Find region– By finding constituent pixels in a region– By finding boundary pixels

Image Segmentation Task

• 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

– Non-contextual technique: thresholding– Contextual techniques:

• region-based

• connectivity-preserving relaxation methods.

– Other methods: Image primitive based

• Mixture of all these

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.

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

Contextual techniques

• Contextual techniques take into account the fact that pixels belonging to a single object are close to one another.

• Approaches to contextual segmentation are based on the concept of discontinuity or concept of similarity. – detecting abrupt changes- edge detection techniques,

– or to create uniform regions directly,

• Discontinuity and similarity approaches mirror one another, in the sense that completion of boundary is equivalent to breaking one region into two.

Region Growing

• All pixels belong to a region

• Select a pixel

• Grow the surrounding region

(we will practise this in lab class)

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, depending on defined criteria

– similar• similar greyscale/colour properties

• Merge them

Edge Following

• Detection– finds candidate edge pixels

• Following– links candidates to form boundaries

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

Active Contour Method

Case study next week, notes will be given during the lecture

Summary

• Image segmentation

• Region detection– growing– edge following