44
Image Segmentation Zhiqiang wang [email protected] some examples

Image Segmentation Zhiqiang wang [email protected] some examples

Embed Size (px)

Citation preview

Page 1: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Image Segmentation

Zhiqiang wang [email protected]

some examples

Page 2: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

image segmentations

Cell segmentation

Active contour method

Interactive method (graph cut)

Other examples

Page 3: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Cell Segmentation

Page 4: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

1st Step: Image resize

Since original image’s resolution is 3978*3054, its size is very big and may let extracting algorithm be time consuming.

Page 5: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

2nd Step: Image smooth

To simplify image’s content, noise and detail texture should be removed.

Gaussian filter or Nonlinear diffusion method

Page 6: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

3rd Step: interactive segmentation

Using interacting method to select which cell we want to extract.

Level set : initial contour

Water shed : seed point

Graph cut: label foreground and background

Page 7: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

3rd Step: Find centroids of subregion

After segmentation, we can get 59 subregions. For each region, we find centroids for each subregion as a seed point.

Page 8: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

3rd Step: Find centroids of subregion

Page 9: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

How to find center point

In some cases, centroid is outside of the subregion. As a seed point, it would impede further segmentation.

Possible solution: erode the subregion until it become a point. computing the distance between inside pixels and the contour of subregion, take the

point which have max distance value as the seed point.

20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

140

160

180

200

-60

-40

-20

0

20

40

Distance fieldSkeleton of the subregion

Page 10: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Active Contour Model for Image Segmentation

Page 11: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

What’s active contour?

This method can also be understood as a special case of a more general technique of matching a deformable model to an image by energy minimization.

AC = Curve fitted iteratively to an image evolve based on its shape and the image value until it stabile (ideally on an object’s boundary).

Page 12: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Advantages of active contour

Threshold Edge detectionAn image of blood vessel

Nice representation of object boundary: Smooth and closed, good for shape analysis and recognition and other applications.

Page 13: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

parametric geometric

Curve:

polygon = parametric AC continuous = geometric AC

Page 14: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Parametric Model: Gradient vector flow (GVF)• GVF field is a non-irrotational external force field that points toward the

boundaries when in their proximity and varies smoothly over homogeneous image regions all the way to image borders.

||/ ff Gradient vector flow

Page 15: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Example: Gradient vector flow

• GVF field is a non-irrotational external force field that points toward the boundaries when in their proximity and varies smoothly over homogeneous image regions all the way to image borders.

Page 16: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

General Curve evolution• Let a curve moving in time t be denoted by X[x(s,t), y(s,t) ) , where s is curve

parameterization. Let N be the moving curve’s inward normal, and c curvature. And let the curve develop along its normal direction according to the partial differential equation:

Page 17: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Basic deformation equation• Constant Speed Motion (Area decreasing flow)

• Mean curvature motion (Length shortening flow)

• During the evolution process for image segmentation, curvature deformation and/or constant deformation are used and the speed of curve evolution is locally dependent on the image data.

Page 18: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Its main idea of CV model is to minimize the inter class variances

)(

220)(

210

21,,

,,inf121

CoutsideCinside

CCcc

dxdycIdxdycI

dsCccE

CV model

Page 19: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

A basic version of the speed function that combine curvature and constant deformation is CV model(Active contour model without edge) Its main idea is to consider the information inside the regions.

Let be the original image to be segmented and C denote the evolving curve. and are positive weights to control C’s smoothness. is the mean value of inside the C and is the mean outside C.

)(

220)(

210

21,,

,,inf121

CoutsideCinside

CCcc

dxdyuIdxdyuI

dsCuuE

0I 1u

0I 2u

← Smooth term

← data term

Evolution speed control (CV model)

220

210 uIuIN

t

C

To minimize the cost function, Euler-lagrange equation is used:

Page 20: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Evolution speed control (CV model)

Its main idea of CV model is to minimize the inter class variances

220

210 cIcIN

t

C

• Mean curvature motion is the steepest descent

flow (or gradient flow) that minimizes arc length of the contour:

Page 21: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Parametric Deformable Model • The curves can be represented as level sets of higher dimensional functions

yielding seamless treatment of topological changes.

Page 22: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Research Problem-- weakness of region based model

failure

success

Page 23: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Evolution speed control--GAC model

• A basic version of the speed function that combine curvature and constant deformation is GAC model:

Smooth term data term

NN

ggt

C

g is an edge-stopping function defined as follow: 1

g 21 G 0I

0G I The term denotes the gradient of a Gaussian smoothed image, where is a smooth parameter.

• During the evolution process for image segmentation, curvature deformation and/or constant deformation are used and the speed of curve evolution is locally dependent on the image data.

Page 24: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

GAC model

Page 25: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Features of edge based model

failure

success

Page 26: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

3D Case

Page 27: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Interactive segmentation(graph cut and alpha matting)

Reference: Anat Levin, etc. A Closed Form Solution to Natural Image Matting. 2006

Page 28: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Remove complicate background

Page 29: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Over segmentation with meanshift method

Page 30: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Construct graph and perform graph cut agorithm

Source (Label 0)

Sink (Label 1)

Cost to assign to 0

Cost to assign to 1

Cost to split nodes

Page 31: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Construct graph and perform graph cut agorithm

Page 32: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Gaussian Mixture Model and Graph Cut

Gaussian Mixture Model (typically 5-8 components)

Foreground &Background

Background

Foreground

BackgroundG

R

G

RIterated graph cut

Page 33: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

More examples

Page 34: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

The problem of hard segmentation

Page 35: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Alpha matting

+

Page 36: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Alpha matting

iiiii BFI )1(

+ xx=

Matting is ill posed problem

Page 37: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

iiiii BFI )1(

0

1

Scribbles approach

Page 38: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples
Page 39: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Color Line:

Color lines

213 )1( CCCRC iiii

R

B

G

Page 40: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Color lines

Color Line: 213 )1( CCCRC iiii

R

B

G

Page 41: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Matting results

+

Page 42: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Combine hard segmentation

Page 43: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

More examples

Page 44: Image Segmentation Zhiqiang wang zwang22@kent.edu some examples

Thanks