title: character matching in grayscale image
body: <p>I made patterns: images with the "A" letter of different sizes (from 12 to 72: 12, 14, .., 72)
  And I tested the method of pattern matching and it gave a good results.
  One way to select text regions from image is to run that algorithm for all small and big letters and digits of different sizes. And fonts!
  I don't like it. Instead of it I want to make something like a universal pattern or
  better to say: scanning image with different window sizes and select those regions where some function (probability of that there is a character at that window) is more than some fixed value.
  Do you know any methods or ideas to make that function?
  It must work with original image (grayscale).</p>