outline representation
play

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 &


  1. 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 & Minerals University of Petroleum & Minerals King Dhahran, Saudi Arabia Dhahran, Saudi Arabia WSC7 WSC7 Slide 1 1 Slide

  2. Highlights Highlights KFUPM KFUPM � Problem Problem � � Solution Solution � � Conventional Method Conventional Method � � Automating Procedure: Automating Procedure: Various Steps � Various Steps � Results Results � � Conclusion & Conclusion & Research Issues Research Issues � WSC7 WSC7 Slide 2 2 Slide

  3. Problem Problem KFUPM KFUPM Outline of Outline of Fonts Fonts WSC7 WSC7 Slide 3 3 Slide

  4. Solutions Solutions KFUPM KFUPM Example: Fonts Bitmap Outline WSC7 WSC7 Slide 4 4 Slide

  5. Conventional Method Conventional Method KFUPM KFUPM Scan the original character drawn on 1. paper. Identify Significant Points. 2. Fit Bezier to Significant Points. 3. Match with original shape, if 4. undesirable goto step 2. WSC7 WSC7 Slide 5 5 Slide

  6. Conventional Method: Drawbacks Conventional Method: Drawbacks KFUPM KFUPM � Identifying Significant Points: Not accurate � time consuming � Cumbersome � � Matching with original character is difficult. � Human intervention is inevitable. � Variation from case to case WSC7 WSC7 Slide 6 6 Slide

  7. This Research This Research This Research KFUPM KFUPM Scan the original character. 1. Identify Significant Points. 2. Filtering the Contour 3. Detection of More Significant 4. Points using GAs and NUCS. Match with original shape, if 5. undesirable goto goto step 4. WSC7 WSC7 Slide 7 7 Slide

  8. Automating Procedure: Automating Procedure: KFUPM KFUPM Step 1: : Get Digitized Image Step 1 WSC7 WSC7 Slide 8 8 Slide

  9. Automating Procedure: Automating Procedure: Step 1: : Extract Boundary Step 1 KFUPM KFUPM Example 1 Piece 1 Piece 2 WSC7 WSC7 Slide 9 9 Slide

  10. Automating Procedure: Automating Procedure: KFUPM KFUPM Step 1: : Extract Boundary Step 1 Piece 5 Piece 4 Piece 3 Example 2 Piece 1 Piece 2 WSC7 WSC7 Slide 10 10 Slide

  11. Automating Procedure: Automating Procedure: KFUPM KFUPM Step 1: : Boundary Data Step 1 � Each piece consists of points p i =(x i ,y i ); i=1,…,N # of Pieces # of Boundary Figure Points 2 1522+116 = Lillah 1638 Thamar 5 963+87+87+8 7+87 = 1311 WSC7 WSC7 Slide 11 11 Slide

  12. Automating Procedure: Automating Procedure: KFUPM KFUPM Step 2: : Corner Detection Step 2 � 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 p i = (x i , y i ) , i =1,2…,N , on contour. � Candidate Points: testing back and forth of a point p i, for potential candidacy. WSC7 WSC7 Slide 12 12 Slide

  13. Automating Procedure: Automating Procedure: KFUPM KFUPM Step 2: : Corner Detection Step 2 p A b a p - p + c WSC7 WSC7 Slide 13 13 Slide

  14. Algorithm: Two-Pass Algorithm: KFUPM KFUPM � Pass-1: Each candidate point p i may have multiple associated cornality values…. minimum value is taken as the alpha value of that point p i . � Pass-2: Selecting most suitable Point among the adjacent candidates Note: Why not Pass Note: Why not Pass – –1 algorithm? 1 algorithm? WSC7 WSC7 Slide 14 14 Slide

  15. Example: Example: KFUPM KFUPM Pass 1 Pass 2 WSC7 WSC7 Slide 15 15 Slide

  16. Automating Procedure: Automating Procedure: Step 3: : From Contour to Curve Step 3 KFUPM KFUPM Various Models Various Models � Conics Conics � � Bezier Bezier Cubic Cubic � � UBS UBS � � NUBS NUBS � � NURBS NURBS � � NUCS NUCS � � Others Others � WSC7 WSC7 Slide 16 16 Slide

  17. Automating Procedure: Automating Procedure: Step 3: : From Contour to Curve Step 3 KFUPM KFUPM The NUCS The NUCS The NUCS � NUCS represent Non-uniform Cubic Spline � NUCS represent Non-uniform Cubic Spline � NUCS has ideal geometric properties � NUCS has ideal geometric properties � NUCS is computationally efficient � NUCS is computationally efficient � A NUBS is represented as: � A NUBS is represented as: ) ( ) ( ) ( ) ( ) 3 2 = − θ + θ − θ + θ − θ + θ 2 3 P | t 1 F 3 1 V 3 1 W F , ( + t , t i i i i i i i i i i 1 + i i 1 ( ) ) ( ) ( ) where θ ≡ θ = θ = − t | t t t / h , ( i i t , t i i + 1 i i 1 1 = + − and = + W F h D . V F h D , + i i i i i i 1 i i 1 3 3 WSC7 WSC7 Slide 17 17 Slide

  18. Genetic Approach: Genetic Approach: Step 4: : From Contour to Automated Curve Step 4 KFUPM KFUPM Genetic Formulation Genetic Formulation Knots a b 0 1 0 1 -------------------- 0 1 WSC7 WSC7 Slide 18 18 Slide

  19. Genetic Approach: Genetic Approach: Step 4: : From Contour to Automated Curve Step 4 KFUPM KFUPM Control Parameters Control Parameters Crossover Rate 0.7 Mutation Rate 0.001 No. of generations 120 Population size 30 Knot Ratio 0.3 WSC7 WSC7 Slide 19 19 Slide

  20. Genetic Approach: Genetic Approach: Step 4: : From Contour to Automated Curve Step 4 KFUPM KFUPM Control Parameters Control Parameters Population for weights Generations for weights Decimation Gene Length = No. of Points after decimation WSC7 WSC7 Slide 20 20 Slide

  21. Algorithm DESIGN Algorithm DESIGN Algorithm DESIGN KFUPM KFUPM Input Control START Parameters Get Digitized Image Extract the Contour Detect Significant Knots Fit NUCS Curve STOP using GA (iterative process) WSC7 WSC7 Slide 21 21 Slide

  22. GA Curve Fitting GA GA Curve Fitting Curve Fitting KFUPM KFUPM Input Data START Initialize Population Calculate NUCS Fitting No Calculate Fitness Do Selection Yes Max Generations Do Crossover & Mutation Exhausted? WSC7 WSC7 Slide 22 22 Slide

  23. Pseudo code for Font Design System Pseudo code for Font Design System Algorithm (Font_design) KFUPM KFUPM 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 WSC7 WSC7 Slide 23 23 Slide

  24. Initialize Population Start Conserve CornerPoints in the while Population i<=MaxGenerations KFUPM KFUPM i = i + 1 for j<=population size Make New Initialize Weights Population Population Do Mutation for k<=weights generations Do Crossover for m<=weights Do Selection population Do Selection Calculate NUCS Do Crossover No No Calculate AIC Do Mutation Have Total Generations Store Best Result Exhausted Yes k>weights generations Yes Make New STOP Population WSC7 WSC7 Slide 24 24 Slide

  25. KFUPM KFUPM Bitmap Image Bitmap Image After Boundary Detection After Boundary Detection WSC7 WSC7 Slide 25 25 Slide

  26. KFUPM KFUPM After Applying Corner Detection After Applying Corner Detection WSC7 WSC7 Slide 26 26 Slide

  27. KFUPM KFUPM After NUCS Fitting After NUCS Fitting WSC7 WSC7 Slide 27 27 Slide

  28. KFUPM KFUPM Bitmap Image Bitmap Image After Boundary Detection After Boundary Detection WSC7 WSC7 Slide 28 28 Slide

  29. KFUPM KFUPM After Applying Corner Detection After Applying Corner Detection and NUCS Fitting and NUCS Fitting WSC7 WSC7 Slide 29 29 Slide

  30. Conclusion Conclusion � A Font Design Method A Font Design Method � KFUPM KFUPM � 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? � � WSC7 WSC7 Slide 30 30 Slide

  31. KFUPM KFUPM Thanks Thanks WSC7 WSC7 Slide 31 31 Slide

  32. Any Questions? ? Any Questions KFUPM KFUPM WSC7 WSC7 Slide 32 32 Slide

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend