2

Here, I want to search am image from MySQL by upload an image. I have tried with hash and rgb and also with hex. But I am not getting the perfect picutres as google. For e.g. If you find Koala.jpg, then you can see only those photos related to Koala.jpg. But I am getting other photos too with above try. Is there any suggestions that I can search image from the database by image upload. Thanks in advance.

11
  • Take a look at perceptual hashing algorithms. You can use this PHP package for example.
    – wazelin
    Sep 12, 2016 at 7:46
  • Yeah I saw. But what will be the criteria to match the database images and selected image that will give me the similar images. I have made a demo but it only gives image which I have selected to search. Thanks.
    – Virb
    Sep 12, 2016 at 8:35
  • Downvoters please give reason for downvote.
    – Virb
    Sep 14, 2016 at 8:38
  • 3
    I do know, but I am waiting for a properly written question
    – user6613600
    Sep 14, 2016 at 10:27
  • 3
    I see people telling @Virb that they can't understand his question, but the question is fairly simple. He wants the same functionality as google image search but for his own website/database. Unless the images are public and crawl-able by Google this is terribly hard to do and a lot of work as well. I suggest you try to find how Google does this. info
    – JordyvD
    Sep 14, 2016 at 13:42

1 Answer 1

6
+50

Introduction

As I understand your question, how can I search for similar image while I am uploading the image?

Before I dig more in details, I would roughly give a little introduction to the topic.

To be able to search or analysis images in computer, we need to go through some processes and convert the image to a numbers representation. This make it possible to do almost every thing.

There are different similarity search Algorithms, and it is a very heat topic a lot researchers working to improve the techniques and developing better ways.

Depending on your requirement, there are a lot of things involved in it, like how big file is, how fast you expecting the results, is it while the person is upload, how many images should be processed at the time etc.

Google has a lot powerful servers and a lot of machine learning that makes it very smooth to compare images almost with no delays.

IMO you need gather some theoretical information that will help you a lot understanding the process around it.

Some links with information regarding my explanation:

I am pretty sure with a bit more google search you can find a lot of theoretical resources.

Now back to your question,

The following lib/class IMO will solve your problem.

I will leave some link that might enlighten you as well, that said you have few steps to reach your goal:

  1. Start test one of these libraries and see which one fits you best
  2. Then try to test by uploading and comparing image

Few more links:

4
  • Thanks for your answer. I will deeply see of your given links. As far as I researched, may be it will work with texture, shape and colors. As I mentioned in question, I have implemented with rgb, hex and hash functionality. But the thing is I am searching similar images from the database that I have to be more specific and perfection about the code. By the way, thanks for your co-operation that will really help me in my project.
    – Virb
    Sep 15, 2016 at 4:54
  • @Virb you are welcome, it is important to say that you have 2 ways to go, using existing lib/class or develop and code an algorithm unique to your requirement. the latter would a project for its own. another solution could be that you use library like opencv, it is available for python, java and c#, then you need to have a web server that support one of those languages, Sep 15, 2016 at 7:30
  • opencv is a powerful tool for image processing, and it can help you reaching such goal with much better performance see this for inspiration stackoverflow.com/questions/11541154/… and stackoverflow.com/questions/4196453/… and much more to be found online. it also need the understanding of image analysis Sep 15, 2016 at 7:30
  • 1
    Thanks dud..I really appreciate with these texts and this is because I can hope for the solutions.
    – Virb
    Sep 15, 2016 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.