Hi, I need to write a partial ocr for just 2 characters but I don't know where to start. The 2 chars are '8' and 'F'. The 8 is only comprised of two arcs and the F is one vertical stroke and 2 horizontal strokes. I cannot use pytesser for this, at least not to read the chars. How do I go about this? Like: F = ' -, -, |' or something? or should it be an 'if' statement? I use ImageGrab.grab( ) to first get the chars, then .crop(box) to crop it to the two chars. Now what?

I cannot use pytesser for this

Why not? The odds of finding someone who would start from scratch instead of using existing code is pretty small. Look for something that exists (is proven) and can use whatever image format you have, as the code would have to process a given image format first, and convert to characters second. I'm sure there are more articles like this one that list existing options http://groundstate.ca/ocr so convert the image, which can usually be done via the command line/os.system(), and then search for the characters in the converted file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.