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

  • Home
  • SEARCH
  • 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 558931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:11:02+00:00 2026-05-13T12:11:02+00:00

I’m currently at the point where I can convert Bitmap into byte arrays. Suppose

  • 0

I’m currently at the point where I can convert Bitmap into byte arrays. Suppose I have 26 images representing a-z with 26 corresponding byte arrays. Given an image I would like to use the byte array to instantly lookup the correct letter rather than performing up to 26 comparisons. Is there some way of hashing the byte arrays to produce a hash code that can be stored in a configuration file?

Alternatively if there is a better (faster) approach than hashing the images (assuming I have no access to the underlying textual representation) I would very much like to know about them. For clarification purposes suppose I have “a.bmp”, “b.bmp” etc. I now have an unknown image on the screen. I would have thought hashing the image and performing a single lookup would be the fastest way for a positive identification. It should be faster than performing up to 26 individual comparisons. If this assumption is incorrect, I would appreciate an outline of the optimal method.

Note: It’s not a classic OCR problem (handwriting recognition etc) because the letters will be rendered identically every time. Therefore the letter “a” will always produce exactly the same hash code

  • 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. Editorial Team
    Editorial Team
    2026-05-13T12:11:02+00:00Added an answer on May 13, 2026 at 12:11 pm

    You can find a C# algorithm to hash an array of bytes here. You can then use a C# hash table datatype to map the hash to the character. However, you would still need to scan every byte of every bitmap, so the operation is O(B * N) where B is the number of bytes in the bitmap and N is the number of characters. Not particularly efficient given the size of typical bitmaps.

    However, if this is OCR (optical character recognition) this hash function will be absolutely useless. The value of the hash changes greatly even if one pixel is different, so typical optical noise from scanners or digital cameras would prevent two pictures of the same character from hashing identically. There are programmatic OCR techniques out there, but that is an extremely deep topic and you’re much better off using a pre-built library if this is an OCR problem.

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

Sidebar

Related Questions

No related questions found

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.