I want to know what size should be the image to use it as a hashset/dictionary key. I’m also thinking about using hash functions for this purpose but i’m afraid of hash collisions. I need to store about million of images.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
A bitmap image as a key? That’s not a very good idea. Hashset keys should be as small as possible, otherwise performance will suffer significantly.
What you can do is calculate a hash value (say a SHA1) from the image, and then use that as the key. It’s only 20 bytes so that should be a good size, much better than a full bitmap image anyway.