Questions tagged [euclidean-distance]

the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, and is given by the Pythagorean formula.

In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, and is given by the Pythagorean formula. By using this formula as distance, Euclidean space (or even any inner product space) becomes a metric space. The associated norm is called the Euclidean norm.

http://en.wikipedia.org/wiki/Euclidean_distance

941 questions
0
votes
1 answer

k-Nearest Neighbour Algorithm in verilog

Im planning to do KNN's verilog implementation. But the problem is the euclidean distance measurement term associated with KNN,since it needs Subtraction,squaring,adding. I think,the code will become complex when i code knn with euclidean…
Viz
  • 11
  • 3
0
votes
0 answers

Measuring Euclidean Distance on pixel level with PIL / Image.Point()

I am using Python Image Library to get a sort of brightness value for each pixel, based on its Euclidean Distance measured from white. From what I can discern from PIL's documentation, Image.point() manipulates each pixel according to a color table.…
0
votes
1 answer

euclidean distance C#

I'm working on a C# project to find the euclidean distance between 2 points. Right now I have 2 for loops like this: for (int i = 0; i < pregcount; i ++) { double dist_minima = double.MaxValue; for (int j = 0; j <…
Matimont
  • 739
  • 3
  • 14
  • 33
0
votes
1 answer

MatLab - Euclidean Distance Plot 3D

Im new in matlab programming and I have small issue. I want to draw a plot 3d of Euclidean distance function for 2 coordinates, like in this picture below: Could you help me with the source code? How I can draw this plot? My first thoughts was…
user3146344
  • 207
  • 1
  • 3
  • 16
0
votes
2 answers

What is the package to be installed in R version 2.15.2 to compute euclidean distance?

I want to find out the euclidean distance of two matrices using the rdist() function. It requires the fields package to be imported first. I am using R version 2.15.2 and unable to install this package as its giving error that package ‘fields’ is…
user2969490
  • 135
  • 1
  • 1
  • 5
0
votes
1 answer

R: Finding the nearest raster cell within a threshold calculated between two rasters

I have two perfectly overlapping rasters (same extents and cell size). For every cell in one raster (i.e. for every XY), I would like to determine the Euclidean geographical distance to the closest cell within a given threshold difference between…
David Roberts
  • 617
  • 1
  • 11
  • 23
0
votes
1 answer

Closest point based on angle and distance

I have a set of points P1,P2 and P3. I am trying to find the closest point to P1 by using the angle and distance informations. As you can See the closest point to P1 is P2 base on the Y coordinates but the angle deviation is greater than the angle…
Hani Goc
  • 2,371
  • 5
  • 45
  • 89
0
votes
2 answers

Measuring distance between vectors

I have a set of 300.000 or so vectors which I would like to compare in some way, and given one vector I want to be able to find the closest vector I have thought of three methods. Simple Euclidian distance Cosine similarity Use a kernel (for…
halfdanr
  • 373
  • 4
  • 11
0
votes
2 answers

euclidean distance between values in a array - result ordered asc in new array

I'm looking for a fast way to compute euclidean distance of all values in a array. The Result should be in a new array ordered ascending with the two used "partners" for calculation. eg: a = [[2,4,5],[3,2,1],[5,7,2]] res = euclidean distance(a)…
Linda
  • 2,375
  • 4
  • 30
  • 33
0
votes
1 answer

Adaptation of nearest neighbour R code to identify locations of ponds within 1 km for each pond

I have a csv file with the pond areas and Latitude and Longitude coordinates for 17,305 ponds. For each pond I would like to identify the coordinates of all the ponds within 1 km of it. I am an R novice so I thought I could adapt some nearest…
0
votes
1 answer

Image similarity by Euclidean distance in hsv color space in MATLAB

The code included below calculates the Euclidean distance between two images in hsv color space and if the result is under a Threshold (here set to 0.5) the two images are similar and it will group them in one cluster. This will be done for a group…
SaraDean
  • 169
  • 1
  • 13
0
votes
1 answer

Detecting a black/blank frame in video using OpenCV

I'm using OpenCV 2.4.2 VideoCapture class to grab frames from multiple videos and my aim is to compare the frames between videos to retrieve similar videos (visually similar). I'm facing two issues. The videos contain blank/black frames. I can…
Uni
  • 45
  • 2
  • 5
0
votes
2 answers

MATLAB Computing distance from a point to a set of points

Consider a matrix A: A = magic(5) 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9 I have to compute the following formula: w_ij = ||I(i) - I(j)|| ^ 2 from point…
blueSurfer
  • 5,651
  • 13
  • 42
  • 63
0
votes
2 answers

Why is this distance formula method giving me NaN?

I have the following code for computing the Euclidean distance: distanceBetween(first:(Double,Double), second:(Double,Double)): Double = { math.sqrt((first._1 - second._1) + (first._2 - second._2)) //distance formula } When I run it in the Scala…
jkeys
  • 3,803
  • 11
  • 39
  • 63
0
votes
0 answers

Calculating Euclidean distance in mysql

I have an exe which return an array of 16elements.I have to pass this array to Mysql using php to calculate the Euclidean distance.My table in MySQL is in the form. id |img_id |…
user1583647
  • 1,227
  • 2
  • 24
  • 48