1

I am developing software that stores 128D vector with SIFT descriptor of an image. Then I want to get all image similars to a given image, but the similarity between image are the euclidean distance. How can i calculate the euclidean distance between this vectors?

jq170727
  • 13,159
  • 3
  • 46
  • 56
  • The [Euclidean Distance](https://en.wikipedia.org/wiki/Euclidean_distance) page on Wikipedia may be worth reviewing. Not sure what this has to do with [tag:mongodb] – jq170727 Oct 03 '17 at 04:45
  • You cannot (reasonably) do this calculation inside of MongoDB. You'll have to do that in application code. – Thilo Oct 03 '17 at 04:59

1 Answers1

-2

MongoDB supports 2d indexes and geospatial queries. Please first check 2d Indexes to know how to properly structure the index.

After that, you can calculate the Euclidian distance on a 2d plane with queries.

Also check this Stackoverflow post. (But remember not to set spherical to true, since your space is 2D).

abmirayo
  • 173
  • 2
  • 15