I've adjusted things to decrease processing time and increase functionality. Here's a sampling:
Dim $result
While $xwidth <= $width - 1
Select
Case $column[$xwidth] = 3 AND $column[$xwidth+1] = 3 AND $column[$xwidth+2] = 9 AND $column[$xwidth+3] = 3 AND $column[$xwidth+4] = 4
$result &= "$"
$xwidth += 4
.
.
.
Case Else $xwidth += 1
WEnd
;_OCRrow: Handles collisions in the column pixel counting function by evaluating the rectangle that contains the letter by row
; rather than column, increasing detection. To use, just call this function in the above case statements where there are two
; different letters with the same column pixel count.
;Parameters: The width of the CURRENT letter (not the width of the entire segment), the height of the segment, the char array
; that contains the bitmap in hex format, the current color of the numbers/letters you're looking for in hex, and
; the particular case you're dealing with (p v. b; q v. d; etc.)
Func _OCRrow($width, $height, $char, $charColor, $case)
$p = 1
Dim $row[$width]
For $xheight = 0 To $height - 1
For $xwidth = 0 To $width - 1
If $char[$xwidth][$xheight] = $charColor Then
If $p = 1 Then
$div = $xwidth
$p += 2
EndIf
$x = $xwidth - $div
$row[$x] +=1
EndIf
Next
Next
Select
Case $case = 1
;etc.
Case $case = 2
;.
Case $case = 3
EndFunc
Keep in mind that I just wrote this quickly and haven't tested it, but I hope folks get the idea. The Case block will keep the CPU from checking every single If statement, and I also made it skip over areas once it's determined that the space is occupied by a character. The old version would start looking for a new character in the middle of an old character, and it's safe to assume that characters do not start in the middle of other characters.
Thanks a ton for the original code. I hope this helps.