letters_demo

letters_demo - The Mahalanobis Distance in Character...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
The Mahalanobis Distance in Character Recognition Authored by Dan Frey 31 July 98 This sheet explores the use of the Mahalanobis Distance in character recognition. It defines a letters A, B, C, and D. It creates a population of distorted letters to train a classifier. It creates a test population of letters to test the classifier. It allows you to compete against the Mahalanobis classifier. ORIGIN := 1 Every matrix and vector in this sheet will begin with index number 1. Here are the Canonical letters A B C and D defined as matrices of 1s and 0s 0 0 1 0 0 1 1 1 1 0 0 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 1 1 0 0 0 1 1 0 0 0 1 A := 1 0 0 0 1 B := 1 1 1 1 0 C := 1 0 0 0 0 D := 1 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 1 1 0 0 0 1 Ł 1 0 0 0 1 ł Ł 1 1 1 1 0 ł Ł 0 1 1 1 0 ł Ł 1 1 1 1 0 ł Stretch the letters out into a vector of "features". k := 1 .. 25 Alin k := A k + 5 - 5 ceil k , ceil k Blin k := B k + 5 - 5 ceil k , ceil k Ł 5 ł Ł 5 ł Ł 5 ł Ł 5 ł Clin k := C k + 5 - 5 ceil k , ceil k Dlin k := D k + 5 - 5 ceil k , ceil k Ł 5 ł Ł 5 ł Ł 5 ł Ł 5 ł Reverse the letters. This makes the plots easier to read. Alin k := Alin k = 0 Blin k := Blin k = 0 Clin k := Clin k = 0 Dlin k := Dlin k = 0 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
features as a matrix DISPLAY(Llin) := for i ˛ 1 .. 5 for j ˛ 1 .. 5 L i , j Llin i + 5 ( j - 1) L Here are a couple of plots that show what the Cononical letters look like. DISPLAY Alin
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 8

letters_demo - The Mahalanobis Distance in Character...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online