fast algorithms for binary morphological operations using

Post on 11-Feb-2022

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Fast algorithms for binary morphologicaloperations using run-length encoding

Gregor Ehrensperger

Universitat Innsbruck :: Datacon Technology

Workshop Bad Herrenalb15 02 13

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 1

1 Examples

2 Definitions

3 ErosionVariant 1Variant 2

4 Dilation

5 Run-time Analysis

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 2

example 1/4 - barcode

image source: Datacon Technologygregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 3

example 1/4 - barcode

image source: Datacon Technologygregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 3

example 2/4 - bump inspection

image source: Datacon Technologygregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 4

example 3/4 - glue

image source: Datacon Technologygregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 5

example 4/4

image source: http://www.imageprocessingplace.com/gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 6

1 Examples

2 Definitions

3 ErosionVariant 1Variant 2

4 Dilation

5 Run-time Analysis

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 7

binary images

raster graphic:{(0, 0), (0, 1), (0, 2), (1, 2), (1, 3), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 1), (4, 2), (4, 3)}

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 8

binary images

raster graphic:{(0, 0), (0, 1), (0, 2), (1, 2), (1, 3), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 1), (4, 2), (4, 3)}

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 8

erosion and dilation

erosion and dilation

εB(X ) ={p ∈ Z2 | Bp ⊆ X

}

B

XεB(X )

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 9

erosion and dilation

erosion and dilation

εB(X ) ={p ∈ Z2 | Bp ⊆ X

}and δB(X ) =

{p ∈ Z2 | (B t)p ∩ X 6= ∅

}

B

X

δB(X )

εB(X )

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 9

binary images

raster graphic: {(0, 0), (0, 1), (0, 2), (1, 2), (1, 3), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 1), (4, 2), (4, 3)}

run-length encoding:〈0, 2, 0〉 ∪ 〈2, 3, 1〉 ∪ 〈0, 1, 3〉 ∪ 〈3, 4, 3〉 ∪ 〈1, 3, 4〉

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 10

binary images

raster graphic: {(0, 0), (0, 1), (0, 2), (1, 2), (1, 3), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 1), (4, 2), (4, 3)}

run-length encoding:〈0, 2, 0〉 ∪ 〈2, 3, 1〉 ∪ 〈0, 1, 3〉 ∪ 〈3, 4, 3〉 ∪ 〈1, 3, 4〉

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 10

binary images

raster graphic: {(0, 0), (0, 1), (0, 2), (1, 2), (1, 3), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 1), (4, 2), (4, 3)}

run-length encoding:〈0, 2, 0〉 ∪ 〈2, 3, 1〉 ∪ 〈0, 1, 3〉 ∪ 〈3, 4, 3〉 ∪ 〈1, 3, 4〉

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 10

binary images

raster graphic: {(0, 0), (0, 1), (0, 2), (1, 2), (1, 3), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 1), (4, 2), (4, 3)}

run-length encoding:〈0, 2, 0〉 ∪ 〈2, 3, 1〉 ∪ 〈0, 1, 3〉 ∪ 〈3, 4, 3〉 ∪ 〈1, 3, 4〉

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 10

1 Examples

2 Definitions

3 ErosionVariant 1Variant 2

4 Dilation

5 Run-time Analysis

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 11

1 Examples

2 Definitions

3 ErosionVariant 1Variant 2

4 Dilation

5 Run-time Analysis

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 12

erosion variant 1 (compare Machado and Hashimoto [2009])

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 13

erosion variant 1 (compare Machado and Hashimoto [2009])

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 13

erosion variant 1 (compare Machado and Hashimoto [2009])

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 13

erosion variant 1 (compare Machado and Hashimoto [2009])

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 13

erosion variant 1 (compare Machado and Hashimoto [2009])

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 13

erosion variant 1 (compare Machado and Hashimoto [2009])

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 13

1 Examples

2 Definitions

3 ErosionVariant 1Variant 2

4 Dilation

5 Run-time Analysis

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 14

erosion variant 2

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 15

erosion variant 2

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 15

erosion variant 2

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 15

erosion variant 2

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 15

erosion variant 2

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 15

erosion variant 2

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 15

erosion variant 2

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 15

1 Examples

2 Definitions

3 ErosionVariant 1Variant 2

4 Dilation

5 Run-time Analysis

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 16

dilation

δB(X ) =(

(εBt (X c))c

B

X

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 17

dilation

δB(X ) =(

(εBt (X c))c

B

X

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 17

dilation

δB(X ) =(

(εBt (X c))c

B

X

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 17

dilation

δB(X ) =(

(εBt (X c))c

B

X

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 17

1 Examples

2 Definitions

3 ErosionVariant 1Variant 2

4 Dilation

5 Run-time Analysis

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 18

run-time analysis (1/5)

image source: http://www.imageprocessingplace.com/gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 19

run-time analysis (2/5) - erosion

0 50 100 150 200 250 300

0

500

1000

1500

size of the square-shaped structuring element

run

-tim

e[m

s]

MachadoOpenCVEhren2

0 50 100 150 200 250 300

0

500

1000

1500

size of the diamond-shaped structuring element

run

-tim

e[m

s]

MachadoOpenCVEhren2

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 20

run-time analysis (2/5) - erosion

0 50 100 150 200 250 300

0

500

1000

1500

size of the square-shaped structuring element

run

-tim

e[m

s]

MachadoOpenCVEhren2

0 50 100 150 200 250 300

0

500

1000

1500

size of the diamond-shaped structuring element

run

-tim

e[m

s]

MachadoOpenCVEhren2

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 20

run-time analysis (3/5) - dilation

0 50 100 150 200 250 300

0

200

400

600

800

size of the square-shaped structuring element

run

-tim

e[m

s]

dOpenCVdEhren

0 50 100 150 200 250 300

0

500

1000

1500

2000

size of the diamond-shaped structuring element

run

-tim

e[m

s]

dOpenCVdEhren

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 21

run-time analysis (3/5) - dilation

0 50 100 150 200 250 300

0

200

400

600

800

size of the square-shaped structuring element

run

-tim

e[m

s]

dOpenCVdEhren

0 50 100 150 200 250 300

0

500

1000

1500

2000

size of the diamond-shaped structuring element

run

-tim

e[m

s]

dOpenCVdEhren

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 21

run-time analysis (4/5) - circle-shaped SE

0 50 100 150 200 250 3000

2000

4000

6000

size of the circle-shaped structuring element

run

-tim

e[m

s]

OpenCVdOpenCVEhren2dEhren

0 100 200 3000

200

400

size of the circle-shaped structuring element

run

-tim

e[m

s]

Ehren2dEhren

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 22

run-time analysis (4/5) - circle-shaped SE

0 50 100 150 200 250 3000

2000

4000

6000

size of the circle-shaped structuring element

run

-tim

e[m

s]

OpenCVdOpenCVEhren2dEhren

0 100 200 3000

200

400

size of the circle-shaped structuring element

run

-tim

e[m

s]Ehren2dEhren

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 22

run-time analysis (5/5) - circle-shaped SE

0 100 200 300

50

100

150

size of the circle-shaped structuring element

run

-tim

e[m

s]

dist. transf.erode v2

0 100 200 300

100

200

300

size of the circle-shaped structuring element

run

-tim

e[m

s]

dist. transf.dilate

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 23

run-time analysis (5/5) - circle-shaped SE

0 100 200 300

50

100

150

size of the circle-shaped structuring element

run

-tim

e[m

s]

dist. transf.erode v2

0 100 200 300

100

200

300

size of the circle-shaped structuring element

run

-tim

e[m

s]

dist. transf.dilate

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 23

Gregor Ehrensperger. Schnelle Algorithmen zur Berechnung von Erosionund Dilatation auf lauflangenkodierten Binarbildern. Master’s thesis,University of Innsbruck, 2012.

Wook-Joong Kim, Seong-Dae Kim, and Kyuheon Kim. Fast algorithmsfor binary dilation and erosion using run-length encoding. Electronicsand Telecommunications Research Institute Journal, 27(6):814–817,2005. URL http://dx.doi.org/10.4218/etrij.05.0205.0013.

Anderson Fraiha Machado and Ronaldo Fumio Hashimoto. Jump-missbinary erosion algorithm. In SIBGRAPI 2009, Proceedings of the XXIIBrazilian Symposium on Computer Graphics and Image Processing,Rio de Janeiro, Brazil, 11-15 October 2009, pages 149–155. IEEEComputer Society, 2009.

gregor.ehrensperger@student.uibk.ac.at G. Ehrensperger Fast algorithms for morphological operations using RLE 24

top related