Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer peopleโ€™s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer peopleโ€™s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 153439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:48:04+00:00 2026-05-11T09:48:04+00:00

I managed to have each character stored in a bitmap and am looking for

  • 0

I managed to have each character stored in a bitmap and am looking for a way to quickly determine which character it is.

Therefore I’m about to store every possible character into an array of 1 and 0, and compare them to an array of the bitmap I just grabbed.

I could do simple checks like compare how many black pixels I got, compare the dimensions and so on, but all these checks are slow (just a guess..).

So what I’m looking for is a method, which goes trough every pixel from bottom to top, or randomly which compares the array to a set of arrays and sorts unmatching out, till only one array remains. But how can I implement that?

Thanks for your help.

Sven

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:48:05+00:00Added an answer on May 11, 2026 at 9:48 am

    In the OCR-world it’s pretty seldom that you run into a ‘perfect match’ between a targetresource and your original comparing resource.

    Actually it’s a huge field of science, but here’s a nice thesis on the subject which should give you some basic knowledge: http://www.discover.uottawa.ca/~qchen/my_papers/master_thesis.pdf

    Note that algorithms like these are very math heavy and in now way optimized for a standard x86 CPU.

    If you are looking for a perfect match (I mean, really perfect, down to byte-to-byte) and you want to implement this fast and easy, I’d suggest doing a ‘skip the obvious mismatches fast’-kinda algorithm – something like:

    1) Compare size of arrays, if different, it’s not what you look for

    2) Compare a hash-value of each bitmaps

    3) Compare each bit / byte one-by-one and as soon as you see a difference, it’s not what you look for

    4) Win, you found a match ๐Ÿ™‚

    This is very slow, depending on what you’re trying to achieve, but easy to implement and it will work. So goes well for a prototype-alike application. As I said, OCR (and all other forms of digital signal processing) are a huge field of research, so it’s not something you can expect people to teach you in a quick forumpost, sadly ๐Ÿ™

    Good luck

    [EDIT] Looking at the comment in your OQ, I’ll say going for a hashtable / dictionary datastructure would be the fastest for you. That, or a binary search tree.. Both very reliant onj your hash-key generator ๐Ÿ™‚

    [EDIT2 (xD)] ‘It’s aliased text generated by a computer. The Background is different, but the text always has the same color.’ Pretty important information there ๐Ÿ˜› Are the size of the text / bitmaps always the same as well? I’d suggest that either implement your own hashing algorithm where you discard the preset background colors, so that the hashing value only depends on the color of the text (and the shape of this too ofc) or simply rewrites all background pixels in your targets to be the same color as your original (or just set the original background to that of your targets? Depends again on which data you are fighting with here – need more information ๐Ÿ™‚ ).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have managed to crunch down a several line code to this For Each
I have managed to create a custom action in C# using MakeSfxCA which is
I have a stored procedure that returns a set of rows for each ActivityUnitId
I have the following character encoding issue, somehow I have managed to save data
I have a solution ASP.NET MVC where I manage materials with CRUD functionalities. Each
I have an application processing network communication with blocking calls. Each thread manages a
I have managed to extract the filename and the extension and passed that to
I have managed to confuse myself whether I should return E_NOTIMPL or E_NOINTERFACE from
I have managed to set up Cassandra + Thrift and the Python wrapper for
I have managed to get a cron job to run a rake task by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.