All Questions
Tagged with euclidean-distance opencv
31
questions
12
votes
3
answers
25k
views
OpenCV euclidean distance between two vectors
I want to calculate the euclidean distance between two vectors (or two Matrx rows, doesn't matter). Is there a good function for that in OpenCV?
4
votes
2
answers
4k
views
How to find the euclidian distance between the centroid of an object in one frame and the adjacent frame
We are doing a project in vehicle counting (using OpenCV). Now we have to find the euclidian distance from the centroid of the object in one frame to the adjacent frame? In our project we have done up ...
4
votes
2
answers
2k
views
Pass coordinates of 2D Numpy pixel array to distance function
I'm working on an image processing program with OpenCV and numpy. For most pixel operations, I'm able to avoid nested for loops by using np.vectorize(), but one of the functions I need to implement ...
4
votes
1
answer
2k
views
Similarity Measurement between Color Image (OpenCV)
I'm working with a CBIR (Content-based Image Retrieval) project which will draw RGB histogram of images and also calculate the distance between other images with query image.
I'm using VS 2008 - MFC ...
3
votes
1
answer
7k
views
Calculate distance between two descriptors
I'm trying to calculate the distance (Euclidean or hamming) between two descriptors already calculated. The problem is I don't want to use a matcher, I just want to calculate the distance between two ...
2
votes
1
answer
2k
views
Substitute function of bwdist in C++
I am implementing a code of Matlab in C++. In Matlab they have used bwdist to calculate the euclidean distance.
I am using the function distanceTransform to get the same result as in Matlab, but the ...
2
votes
1
answer
2k
views
How to calculate distance between two person using python opencv?
I am working on a project where I have to calculate the distance between the detected persons in live video feed. To do this I am following the below pipeline:
1. Detect person using MobilenetSSD ...
2
votes
0
answers
631
views
Find top five similar image using cosine similarity
I have a feature list of images with length n.
feature_list -> [array[img1], array[img2]....n]
I can find top 5 using sklearn.neighbors.NearestNeighbors. by following
neighbors = NearestNeighbors(...
2
votes
2
answers
2k
views
comparing two Binary images in opencv
I have two binary images of hand which are almost same.How should I compare them to know whether they represent almost same shape or not.I have tried finding euclidean distance between two images but ...
2
votes
1
answer
1k
views
image retrieval from its values(euclidean distance) in python opencv
I'm looking for a bit of assistance. I have calculated the euclidean distance and sorted too. Now I have to fetch the images having least euclidean distance! And I have no idea how it can be done.
...
1
vote
1
answer
274
views
The distance from center of the binary image to the furthest point of the contour [closed]
The main idea is to find the furthest point coordinates of the contour from the center of the image in Python.
Normally it is possible to find the extreme points of the contour using findcontours and ...
1
vote
1
answer
2k
views
Finding distance between skeleton and boundary using openCV python
I am trying to find maximum width of a curve using openCV in python. I used canny edge detector to get the boundaries of the curve. I have then managed to create a skeleton between them as shown by ...
1
vote
0
answers
178
views
Distance chessboard / camera
I'm estimating the distance using a chessboard and solvePnP function from openCV.
I heard that to have the more accurate distance, I shouldn't have the chessboard parallel to the image plan because ...
1
vote
2
answers
903
views
Issue with OpenCV Warp perspective and euclidean distance
My program uses a C# port of OpenCV to find the largest rectangle in the scene and warps the perspective. It almost works, but has one very annoying bug that I just can't figure out.
Using it on a ...
1
vote
0
answers
222
views
calculating euclidean distance for Luv values between 2 pixels
In opencv c++ I'm trying to figure out how to calculate the euclidean distance between point i,j and all points within a 3x3 kernel. This is to create a contrast map of saliency from the Luv color ...
0
votes
2
answers
996
views
How to calculate the Euclidean distance in a canny image
I have a black line and purple lines. I want to calculate the distance between each purple pixel points in the canny image and the closest black line in the most efficient and fastest way. How can I ...
0
votes
1
answer
2k
views
How to find the distance(physical in m and pixels) between two object(points) in image in OpenCV and C+++?
Im using OpenCV and C++. I have already done the code where can find the center of the object. I also have the prior information about the distance between the camera and object(s) in the image.
I ...
0
votes
1
answer
2k
views
How to calculate euclidean distance between two ndarrays in Python OpenCV
I am trying to calculate the euclidean distance between two images. For this I am first getting the 128d array of the image and then using cv2.norm() to get the distance. Below is the code:
embedder =...
0
votes
1
answer
3k
views
How to do face recognition using euclidean distance in python
I have a project where I need to include face recognition in it. I am referring to this article. This article is using open-face to get the face embeddings and its saving all the embeddings in a ...
0
votes
1
answer
1k
views
why 'module' object is not callable in python opencv?
I have two modules, and I'm importing 1 elements/objects from each module(program), and i am assigning it to some other variables, but still i am getting this error.
my code is:
from CBIR import ...
0
votes
0
answers
57
views
finding distance between two object of an image with euclidean distance and opencv
here i have a code from pyimagesearch
with result like
the question is, how to finding the distance from only one countur point to other tl,tr,bl,br in other objects
i'm try to edit from the code to ...
0
votes
0
answers
70
views
i want to calculate euclidean distance to generate the seedmaps for watershed of neural cells but got ValueError: XA must be a 2-dimensional array
while finding the euclidean distance to generate the seeds for watershed, I got an error XA must be a two dimensional array. I applied many things suggested on stack overflow but couldn't solved this ...
0
votes
1
answer
1k
views
Is it possible to calculate real-time distance of an object in a image w/o reference objects?
I have a picture of human eye taken roughly 10cm away using a mobile phone(no specifications regarding the camera). After some detection and contouring, I got 113px as the Euclidean distance between ...
0
votes
0
answers
107
views
Normalize euclidean distance eigenfaces recognition method
I'm training a model with the following function and the following recognition method
resized_test_img = 'a.jpg'
label, confidence = eigenfaces_recognizer.predict(resized_test_img)
the output of the ...
0
votes
0
answers
113
views
how to find the nearest coordinate between two lines on canny image
come from this post
How to calculate the Euclidean distance in a canny image
I wonder how to find coordinate of the nearest black pixel?
0
votes
0
answers
198
views
Estimate displacement of the template in an image
Basically I'm trying to measure the displacemtent of the template along of the next image. I extract the roi of the image at t0, then I apply matchTemplate function on the image at t1 and finally use ...
0
votes
1
answer
452
views
Measuring color difference from an ROI within the image using DeltaE color difference?
I have to read one RGB image
then I need to select an ROI
After that, I need to measure the colour difference of the ROI from the entire image using simple
colour segmentation ( not using HSV image, ...
0
votes
0
answers
60
views
Question about SURF descriptor euclid distance
I use c++ opencv(3.4.1) SURF(xfeatures2d) to get keypoints and descriptor.
Ptr<SURF> detector1 = SURF::create(800.0);
detector1->detect(img1, keypoints_1);
detector1->detect(img2, ...
0
votes
1
answer
822
views
Calculating distance between SURF features in OpenCV
I want to be able to get a distance between SURF features in OpenCV. I'm using HDBSCAN to match multiple instance of an object in the image by clustering the features which requires calculating ...
0
votes
1
answer
3k
views
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. ...
-1
votes
2
answers
438
views
Python - Find the first white pixel and last one in each column
how can i find first and last white pixel in a column of binary image . To i calculate distance between points in image
I did but everything is still not resolved , please help me . I have consulted ...