Image Processing Computer Vision Template Matching and Hough

  • Slides: 20
Download presentation
Image Processing & Computer Vision Template Matching and Hough Transform 1

Image Processing & Computer Vision Template Matching and Hough Transform 1

Template Matching l Use for OCR Image Intensity in Binary 0 and 255 Input

Template Matching l Use for OCR Image Intensity in Binary 0 and 255 Input Image Convert to Binary Image using Threshold Segmentation using Blob Coloring 2

Template Matching l Create Template A to Z , a to z, 0 to

Template Matching l Create Template A to Z , a to z, 0 to 9 Using Font Arial 12 ������� � �������� 3

Template Matching 5

Template Matching 5

Template Matching 6

Template Matching 6

Template Matching 7

Template Matching 7

Template Matching l Sum square difference 9

Template Matching l Sum square difference 9

Template Matching l Sum Square Difference Template Target (0 -0)2+(0 -0)2+(0 -0)2+(0 -0)2+ (255

Template Matching l Sum Square Difference Template Target (0 -0)2+(0 -0)2+(0 -0)2+(0 -0)2+ (255 -255)2+(255 -255)2+(0 -0)2+(255 -255)2+ (255 -255)2+(255 -255)2+(0 -0)2+ (255 -255)2+(255 -255)2+ (255 -255)2+(0 -0)2+(255 -255)2+ (255 -255)2+(255 -255)2+ (0 -0)2+(0 -0)2+(0 -0)2+(0 -0)2 = 0 255=white 0=black 10

Template Matching l Sum Square Difference Template Target (0 -0)2+(0 -255)2+(0 -255)2+(0 -0)2+ (255

Template Matching l Sum Square Difference Template Target (0 -0)2+(0 -255)2+(0 -255)2+(0 -0)2+ (255 -255)2+(255 -0)2+(255 -255)2+(0 -0)2+(255 -255)2+(255 -0)2+(255 -255)2+ (0 -0)2+(255 -255)2+(255 -255)2+(0 -0)2+ (255 -255)2+(255 -255)2+ (255 -255)2+(0 -255)2+(255 -0)2+ (255 -255)2+(255 -255)2+ (0 -255)2+(0 -255)2+(0 -0)2+(0 -255)2+(0 -255)2 = 25517 255=white 0=black 11

Template Matching l Idea to get faster matching โดยใช Aspect Ratio l เกบอตราสวน (Aspect

Template Matching l Idea to get faster matching โดยใช Aspect Ratio l เกบอตราสวน (Aspect Ratio) ของ Template แยกตามกลม โดยเกบเปน width / height หรอ width และ height กได 1 12 Ratio = 0. 833 w = 1, h = 12 11 9 12 12 Ratio = 0. 75 w = 9, h = 12 Ratio = 0. 917 w = 11, h = 12 12

Template Matching 14

Template Matching 14

Hough Transform l Technique for Lines Detection 16

Hough Transform l Technique for Lines Detection 16

Hough Transform l Line Equation 17

Hough Transform l Line Equation 17

Hough Transform l Detecting Lines 18

Hough Transform l Detecting Lines 18

Hough Transform l Detecting Lines 19

Hough Transform l Detecting Lines 19

Hough Transform l Detecting Lines 20

Hough Transform l Detecting Lines 20