n3ss3s
2012-05-28 03:20:38

<n3ss3s> Oh fuck
<n3ss3s> came up with a system for making ocr super fast
<n3ss3s> as if it was slow but anyways
<n3ss3s> I'm assuming simba does ocr by checking for the letter's array of points sort of like it was a dtm (didnt check sauce, cbf)
<n3ss3s> instead of looping through every single point and checking it
<n3ss3s> we should load these weird arrays that's indices lead you to the right letter
<n3ss3s> like let's say for some font the letter l's point array was (0, 1) (0, 2) (0, 3) (0, 4)
<n3ss3s> there would be a string array with 8 dimensions
<n3ss3s> where
<n3ss3s> arr[0][1][0][2][0][3][0][4] = 'l'
<n3ss3s> —> winning
So to get the letter for a point array, you'd do loadedLetterMatrix[px1][py1][px2]…etc, and if it was a valid array of points, it'd take you to a letter.