การรู้จำตัวอักษรภาษาไทยที่เขียนด้วยลายมือในแบบฟอร์ม...

Preview:

Citation preview

การรจ าตวอกษรภาษาไทยทเขยนดวยลายมอในแบบฟอรม(Thai Character Recognition of Handwritten in Forms)

จดท าโดยน.ส. ศภรตน อภวงศโสภณ

42067030

Introduction

Forms

Database

Reduce Human typing error

Methodology

Load picture

Set database table name

Mark text position and

Set field’s name

Repeat step 3 until complete

Methodology (Cont.)

Keep each mark’s position at top

left (x1,y1) and bottom right (x2,y2)

and field’s name to text file. And

text file name is same as database

table name.

Go to Recognition phase

And put text in to database

Example

(x1,y1)

(x2,y2)

Example

Field name(x1,y1) (x2,y2)

File name = Database table name

Number of mark fields

Recognition Phase

Divide level of line

Edge Detection

Split character in vertical

Use feature extraction

Divide level of line

Top level อ, อ, อ, อ, อ, อ, อ, อ, อ, อ, อ, อ, { โ, ไ, ใ, ช, ซ, ป, ฝ, ฟ, ศ, ส, ฬ }

Middle level ก-ฮ, ะ, า, เ, แ, { โ, ไ, ใ }, {ๆ, ฤ, ฦ }

Bottom level อ, อ, {ๆ, ฤ, ฦ, ญ, ฎ, ฏ, ฐ }

Horizontal histogram graph

1 Max dot = Middle level

2 Max dot = Top + Middle level

or Middle + bottom level

first dot has number of pixel < second dot

second dot has number of pixel > first dot

3 Max dot = Top + Middle

+ bottom level

Divide level of line (Cont.)

Example

Edge Detection

Scan from top left to bottom left and

left to right.

First pixel (not white pixel) is a part

of first character.

And scan in contrary the hands of

timepiece.

Result is the position of xmin, ymin,

xmax and ymax

Example

Split character in vertical

Split character picture in two piece

and have the same height.

2

maxmin yyymid

Example

Split Thai character

Use feature extraction

หวของตวอกษร ตามเขมนาฬกาลง (q)

ตามเขมนาฬกาขน (b)

ทวนเขมนาฬกาลง (p)

ทวนเขมนาฬกาขน (d)

ไมมหว

Use feature extraction

หวของตวอกษร

รอยหยก

ลกษณะการเขยน (ขน ลง ซาย ขวา)

อตราสวนระหวางความกวาง : ความสง

ขนาดความกวาง

Top , Bottom piece = 1, 1

Top , Bottom piece = 1, 2

Top , Bottom piece = 2, 1

Top , Bottom piece = 2, 1 (Cont.)

Top , Bottom piece = 2, 2

Top , Bottom piece = 3, 2

Result from recognition phase

เ ป น ม น ษ ย ส ด ป ร ะ เ ส ร ฐ

Keep data to database

Create table, set all field type are

text and size = 255 Or Append

Put result from recognition phase

to database

Example

Example

Conclusion

Recommended