Outline Representation KFUPM KFUPM of Fonts Using Genetic - - PowerPoint PPT Presentation

outline representation
SMART_READER_LITE
LIVE PREVIEW

Outline Representation KFUPM KFUPM of Fonts Using Genetic - - PowerPoint PPT Presentation

Outline Representation KFUPM KFUPM of Fonts Using Genetic Approach M. Sarfraz sarfraz@kfupm.edu.sa Information & Computer Science Department Information & Computer Science Department King Fahd Fahd University of Petroleum &


slide-1
SLIDE 1

KFUPM KFUPM Slide Slide 1 1 WSC7 WSC7

Outline Representation

  • f

Fonts

Using Genetic Approach

  • M. Sarfraz

sarfraz@kfupm.edu.sa Information & Computer Science Department Information & Computer Science Department King King Fahd Fahd University of Petroleum & Minerals University of Petroleum & Minerals Dhahran, Saudi Arabia Dhahran, Saudi Arabia

slide-2
SLIDE 2

KFUPM KFUPM Slide Slide 2 2 WSC7 WSC7

Highlights Highlights

  • Problem

Problem

  • Solution

Solution

  • Conventional Method

Conventional Method

  • Automating Procedure:

Automating Procedure: Various Steps

Various Steps

  • Results

Results

  • Conclusion &

Conclusion & Research Issues Research Issues

slide-3
SLIDE 3

KFUPM KFUPM Slide Slide 3 3 WSC7 WSC7

Outline of Outline of Fonts Fonts

Problem Problem

slide-4
SLIDE 4

KFUPM KFUPM Slide Slide 4 4 WSC7 WSC7

Solutions Solutions

Bitmap

Example: Fonts

Outline

slide-5
SLIDE 5

KFUPM KFUPM Slide Slide 5 5 WSC7 WSC7

Conventional Method Conventional Method

1.

Scan the original character drawn on paper.

2.

Identify Significant Points.

3.

Fit Bezier to Significant Points.

4.

Match with original shape, if undesirable goto step 2.

slide-6
SLIDE 6

KFUPM KFUPM Slide Slide 6 6 WSC7 WSC7

Conventional Method: Conventional Method: Drawbacks

Drawbacks

Identifying Significant Points:

  • Not accurate
  • time consuming
  • Cumbersome

Matching with original character is

difficult.

Human intervention is inevitable. Variation from case to case

slide-7
SLIDE 7

KFUPM KFUPM Slide Slide 7 7 WSC7 WSC7

This Research This Research This Research

1.

Scan the original character.

2.

Identify Significant Points.

3.

Filtering the Contour

4.

Detection of More Significant Points using GAs and NUCS.

5.

Match with original shape, if undesirable goto goto step 4.

slide-8
SLIDE 8

KFUPM KFUPM Slide Slide 8 8 WSC7 WSC7

Automating Procedure: Automating Procedure: Step 1 Step 1: : Get Digitized Image

slide-9
SLIDE 9

KFUPM KFUPM Slide Slide 9 9 WSC7 WSC7

Piece 2 Piece 1

Automating Procedure: Automating Procedure: Step 1 Step 1: : Extract Boundary

Example 1

slide-10
SLIDE 10

KFUPM KFUPM Slide Slide 10 10 WSC7 WSC7

Automating Procedure: Automating Procedure: Step 1 Step 1: : Extract Boundary

Piece 2 Piece 1 Piece 3 Piece 4 Piece 5

Example 2

slide-11
SLIDE 11

KFUPM KFUPM Slide Slide 11 11 WSC7 WSC7

Automating Procedure: Automating Procedure: Step 1 Step 1: : Boundary Data

Each piece consists of points pi=(xi,yi);

i=1,…,N

963+87+87+8 7+87 = 1311 5

Thamar

1522+116 = 1638 2

Lillah

# of Boundary Points # of Pieces

Figure

slide-12
SLIDE 12

KFUPM KFUPM Slide Slide 12 12 WSC7 WSC7

Automating Procedure: Automating Procedure: Step 2 Step 2: : Corner Detection

Corners: High curvature points in planar

curves.

If α is measure of curvature then corners are

characteristics contour points whose α value is less than some predefined threshold value i.e. αmax.

Input: Sequence of points pi =(xi, yi),

i=1,2…,N, on contour.

Candidate Points: testing back and forth of

a point pi, for potential candidacy.

slide-13
SLIDE 13

KFUPM KFUPM Slide Slide 13 13 WSC7 WSC7

Automating Procedure: Automating Procedure: Step 2 Step 2: : Corner Detection

a b c

A

p p- p+

slide-14
SLIDE 14

KFUPM KFUPM Slide Slide 14 14 WSC7 WSC7

Algorithm: Algorithm: Two-Pass

Pass-1: Each candidate point pi may have

multiple associated cornality values…. minimum value is taken as the alpha value

  • f that point pi.

Pass-2: Selecting most suitable Point

among the adjacent candidates

Note: Note: Why not Pass

Why not Pass – –1 algorithm? 1 algorithm?

slide-15
SLIDE 15

KFUPM KFUPM Slide Slide 15 15 WSC7 WSC7

Example: Example:

Pass 1 Pass 2

slide-16
SLIDE 16

KFUPM KFUPM Slide Slide 16 16 WSC7 WSC7

Automating Procedure: Automating Procedure: Step 3 Step 3: : From Contour to Curve

Various Models Various Models

  • Conics

Conics

  • Bezier

Bezier Cubic Cubic

  • UBS

UBS

  • NUBS

NUBS

  • NURBS

NURBS

  • NUCS

NUCS

  • Others

Others

slide-17
SLIDE 17

KFUPM KFUPM Slide Slide 17 17 WSC7 WSC7

Automating Procedure: Automating Procedure: Step 3 Step 3: : From Contour to Curve

NUCS represent Non-uniform Cubic Spline NUCS has ideal geometric properties NUCS is computationally efficient A NUBS is represented as: NUCS represent Non-uniform Cubic Spline NUCS has ideal geometric properties NUCS is computationally efficient A NUBS is represented as:

( ) ( )

( ) ( ) ( )

, F W V F t | P

i i i i i i i i i i t , t

i i

1 3 2 2 3

1 3 1 3 1

1

+

+ − + − + − =

+

θ θ θ θ θ θ ( )

( ) ( )

( )

, h / t t t | t

i i t , t i i

i i

− = = ≡

+1

θ θ θ

where and

, D h F V

i i i i

3 1 + = . D h F W

i i 1 i i 1

3 1

+ + −

=

The NUCS The NUCS The NUCS

slide-18
SLIDE 18

KFUPM KFUPM Slide Slide 18 18 WSC7 WSC7

Genetic Approach: Genetic Approach:

Step 4 Step 4: : From Contour to Automated Curve

Genetic Formulation Genetic Formulation

0 1 0 1 -------------------- 0 1 a b Knots

slide-19
SLIDE 19

KFUPM KFUPM Slide Slide 19 19 WSC7 WSC7

Genetic Approach: Genetic Approach:

Step 4 Step 4: : From Contour to Automated Curve

Control Parameters Control Parameters

Crossover Rate

0.7

Mutation Rate

0.001

  • No. of generations

120

Population size

30

Knot Ratio

0.3

slide-20
SLIDE 20

KFUPM KFUPM Slide Slide 20 20 WSC7 WSC7

Genetic Approach: Genetic Approach:

Step 4 Step 4: : From Contour to Automated Curve

Control Parameters Control Parameters

Population for weights Generations for weights Decimation Gene Length = No. of Points after decimation

slide-21
SLIDE 21

KFUPM KFUPM Slide Slide 21 21 WSC7 WSC7 Algorithm DESIGN Algorithm DESIGN Algorithm DESIGN

Input Control Parameters START Extract the Contour Get Digitized Image Detect Significant Knots Fit NUCS Curve using GA (iterative process) STOP

slide-22
SLIDE 22

KFUPM KFUPM Slide Slide 22 22 WSC7 WSC7

GA Curve Fitting GA GA Curve Fitting

Curve Fitting

Input Data START Initialize Population Calculate Fitness Calculate NUCS Fitting Do Selection Do Crossover & Mutation No Yes Max Generations Exhausted?

slide-23
SLIDE 23

KFUPM KFUPM Slide Slide 23 23 WSC7 WSC7

Pseudo code for Font Design System Pseudo code for Font Design System

Algorithm (Font_design)

Initialize Population While i< = Max_Gen Do For j <= Pop_size Initialize weights For k <= weights_gen For m<=pop_size Calculate NUCS Calculate AIC Selection Crossover Mutation End For Store Best Solution End For Make new Population End For Selection Crossover Mutation i = i + 1 Conserve Corner Points End Do

slide-24
SLIDE 24

KFUPM KFUPM Slide Slide 24 24 WSC7 WSC7

Have Total Generations Exhausted STOP for j<=population size Initialize Weights Population for m<=weights population Calculate NUCS Calculate AIC Do Selection Do Crossover Do Mutation Store Best Result Make New Population Do Selection Do Crossover Do Mutation for k<=weights generations Make New Population i = i + 1

No

k>weights generations

No Yes Yes

while i<=MaxGenerations Initialize Population Conserve CornerPoints in the Population Start

slide-25
SLIDE 25

KFUPM KFUPM Slide Slide 25 25 WSC7 WSC7

Bitmap Image Bitmap Image After Boundary Detection After Boundary Detection

slide-26
SLIDE 26

KFUPM KFUPM Slide Slide 26 26 WSC7 WSC7

After Applying Corner Detection After Applying Corner Detection

slide-27
SLIDE 27

KFUPM KFUPM Slide Slide 27 27 WSC7 WSC7

After NUCS Fitting After NUCS Fitting

slide-28
SLIDE 28

KFUPM KFUPM Slide Slide 28 28 WSC7 WSC7

Bitmap Image Bitmap Image After Boundary Detection After Boundary Detection

slide-29
SLIDE 29

KFUPM KFUPM Slide Slide 29 29 WSC7 WSC7

After Applying Corner Detection After Applying Corner Detection and NUCS Fitting and NUCS Fitting

slide-30
SLIDE 30

KFUPM KFUPM Slide Slide 30 30 WSC7 WSC7

Conclusion Conclusion

  • A Font Design Method

A Font Design Method

  • Equally Applicable for Hand

Equally Applicable for Hand-

  • drawn

drawn Shapes Shapes

  • Efficient and Accurate Solution?

Efficient and Accurate Solution?

  • Better than Conventional Method

Better than Conventional Method

  • Full Automation?

Full Automation?

  • Visually Pleasant Results

Visually Pleasant Results

  • Research Issues

Research Issues

  • Corner Detection

Corner Detection

  • Segmentation

Segmentation

  • Any Other Curve Model?

Any Other Curve Model?

slide-31
SLIDE 31

KFUPM KFUPM Slide Slide 31 31 WSC7 WSC7

Thanks Thanks

slide-32
SLIDE 32

KFUPM KFUPM Slide Slide 32 32 WSC7 WSC7

Any Questions Any Questions? ?