Top Banner
Topology Approach to Cell Counting
22

Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Mar 26, 2015

Download

Documents

Jason Napier
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Topology Approach to Cell Counting

Page 2: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Goals

• Algorithm detects and captures objects in an image

• This algorithm computes object’s– Locations– Measurement– Identify set of pixels for extraction from the image

Page 3: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

What is an Object?• What is an object?

– Binary image• Connected cluster of black pixels on a white background• Connected cluster of white pixels on a black background

Page 4: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

What is an Object?• What is an object?

– Gray Scale image• Connected cluster of dark pixels on a light background• Connected cluster of light pixels on a dark background

Page 5: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

What is an Object?• What is an object?

– Color image• Connected cluster of dark color pixels on a light color background• Connected cluster of light color pixels on a dark color background

Page 6: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Gray Scale Images

• Gray Scale images– For a threshold

• A binary image is created– For each level of gray chosen as threshold

• Collection (255) of binary images are created– As threshold grows

• Objects grows and merge

• Dark pixels form dark objects for each threshold• Light pixels form light objects for each threshold• Light objects may turn out holes in dark objects or vice versa.

Page 7: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Gray Scale Image1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

2 7 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7

3 7 6 5 5 5 5 5 5 5 5 5 5 5 5 6 7

4 7 6 5 4 4 4 4 4 4 4 4 4 4 5 6 7

5 7 6 5 4 3 3 3 3 3 3 3 3 4 5 6 7

6 7 6 5 4 3 2 2 2 2 2 2 3 4 5 6 7

7 7 6 5 4 3 2 1 1 1 1 2 3 4 5 6 7

8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7

9 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7

10 7 6 5 4 3 2 1 1 1 1 2 3 4 5 6 7

11 7 6 5 4 3 2 2 2 2 2 2 3 4 5 6 7

12 7 6 5 4 3 3 3 3 3 3 3 3 4 5 6 7

13 7 6 5 4 4 4 4 4 4 4 4 4 4 5 6 7

14 7 6 5 5 5 5 5 5 5 5 5 5 5 5 6 7

15 7 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7

16 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

Image size (WxH) = 16x16 pixels

8 Levels of grayBlack = 0White = 7

Page 8: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Gray Scale ImageVisual

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

2 7 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7

3 7 6 5 5 5 5 5 5 5 5 5 5 5 5 6 7

4 7 6 5 4 4 4 4 4 4 4 4 4 4 5 6 7

5 7 6 5 4 3 3 3 3 3 3 3 3 4 5 6 7

6 7 6 5 4 3 2 2 2 2 2 2 3 4 5 6 7

7 7 6 5 4 3 2 1 1 1 1 2 3 4 5 6 7

8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7

9 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7

10 7 6 5 4 3 2 1 1 1 1 2 3 4 5 6 7

11 7 6 5 4 3 2 2 2 2 2 2 3 4 5 6 7

12 7 6 5 4 3 3 3 3 3 3 3 3 4 5 6 7

13 7 6 5 4 4 4 4 4 4 4 4 4 4 5 6 7

14 7 6 5 5 5 5 5 5 5 5 5 5 5 5 6 7

15 7 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7

16 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

Image size (WxH) = 16x16 pixels

8 Levels of grayBlack = 0White = 7

Page 9: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Binary Image1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

8 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1

9 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1

10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

15 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Image size (WxH) = 16x16 pixels

Threshold = 0

Level Set:If P(i,j) <= 0 B(i,j) = 0 (Black)Else B(i,j) = 1 (White)

Page 10: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Binary Image1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

7 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1

8 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1

9 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1

10 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1

11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

15 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Image size (WxH) = 16x16 pixels

Threshold = 1

Level Set:If P(i,j) <= 1 B(i,j) = 0 (Black)Else B(i,j) = 1 (White)

Page 11: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Binary Image1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

6 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1

7 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1

8 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1

9 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1

10 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1

11 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1

12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

15 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Image size (WxH) = 16x16 pixels

Threshold = 2

Level Set:If P(i,j) <= 2 B(i,j) = 0 (Black)Else B(i,j) = 1 (White)

Page 12: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Binary Image1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

5 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

6 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

7 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

8 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

9 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

10 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

11 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

12 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

15 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Image size (WxH) = 16x16 pixels

Threshold = 3

Level Set:If P(i,j) <= 3 B(i,j) = 0 (Black)Else B(i,j) = 1 (White)

Page 13: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Binary Image1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

4 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1

5 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1

6 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1

7 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1

8 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1

9 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1

10 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1

11 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1

12 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1

13 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1

14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

15 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Image size (WxH) = 16x16 pixels

Threshold = 4

Level Set:If P(i,j) <= 4 B(i,j) = 0 (Black)Else B(i,j) = 1 (White)

Page 14: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Binary Image1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

4 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

5 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

6 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

7 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

8 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

9 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

10 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

11 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

12 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

13 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

14 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

15 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Image size (WxH) = 16x16 pixels

Threshold = 5

Level Set:If P(i,j) <= 5 B(i,j) = 0 (Black)Else B(i,j) = 1 (White)

Page 15: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Binary Image1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

5 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

6 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

7 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

8 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

9 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

10 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

11 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

12 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

13 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

14 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

15 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Image size (WxH) = 16x16 pixels

Threshold = 6

Level Set:If P(i,j) <= 6 B(i,j) = 0 (Black)Else B(i,j) = 1 (White)

Page 16: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Binary Image1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Image size (WxH) = 16x16 pixels

Threshold = 7

Level Set:If P(i,j) <= 7 B(i,j) = 0 (Black)Else B(i,j) = 1 (White)

Page 17: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Characteristics of Objects

• Size = area in pixels• Contrast• Compactness

– Perimeter/(4*Pi*Area)

• Saliency

Page 18: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Loss less Processing

• Nothing is removed or ignored • No iteration, approximation • No floating point arithmetic

Page 19: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Application

• The algorithm will work on the following types of images– That contains certain objects– Blood cells, finger prints, logos, mug shots– Machine vision for industrial inspection

• It will not work on the following images– Images that are light on one side and dark on the

other side

Page 20: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Homology Classes: Betti Numbers

• B1: Number of objects in an image• B2: Number of holes in an object• B3: Number of voids or cavities

B0 (parts) B1 (holes) B2 (voids)

Letter O 1 1 0

Two letters O 2 2 0

Letter B 1 2 0

Donut 1 1 0

Tire 1 2 1

Ball 1 0 1

The tire (torus) has two tunnels represented by these two "cycles". For the donut the blue one does not count because it can be contracted to a point. They are homologous!

On the ball any "cycle" is like that.

Page 21: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Binary Images: Objective

• Identify Objects– Black objects on a white background– White objects on a black background

• Location• Measurement• Identify a set of pixels for extraction from the image

• Later migrate– From: binary to gray to color images– From: 2D to 3D images

Page 22: Topology Approach to Cell Counting. Goals Algorithm detects and captures objects in an image This algorithm computes objects – Locations – Measurement.

Cell Decomposition• Object is represented by

– List of pair of numbers• Pixel is square

– Instead of a point• Definitions

– A vertex is a 0-cell– An edge is a 1-cell

• Boundaries consists of 2 end-points as 0-cells– A pixel is a 2-cell

• Boundaries consists of 4 edges as 1-cell– A voxel is a 3-cell

• Boundaries consists of 6 faces as 2-cells