-4

I want to develop an app that does the following:

  1. takes a photo
  2. searches the database for a similar photo

now the question .. how can I do the second step with flutter ??

so that means how can I compare of two photos, where the first photo is in the database and the second is just taken from the camera

Joseph
  • 105
  • 6

1 Answers1

1

Let's split your problem into parts

  1. For image comparison, or as I understand your question, finding if an image exists inside another image, OpenCV is your best friend. The first thing is to get comfortable with OpenCV and your favorite language (Python, C#, Java).

Checking images for similarity with OpenCV

I'm not sure if you edited the question while I was writing this answer, or if I just misunderstood.

  1. If you want to make the comparison inside your app, understand how to invoke OpenCV from your Flutter application

https://pub.dev/packages/opencv

  1. If the comparison is not made on the phone but is going to be made after the user uploads the photo to a server, then you need to create a REST endpoint to upload the picture, compare it with other photos stored in the server (using the aforementioned OpenCV) and return the response to the user. To transmit the image to the server you could convert it to base64.
Felipe La Rotta
  • 343
  • 3
  • 13