All Questions
Tagged with euclidean-distance image-processing
32
questions
4
votes
2
answers
13k
views
Optimize performance for calculation of euclidean distance between two images
I implemented the k-nearest-neighbours algorithm in python to classify some randomly picked images from the mnist database. However I found my distance function to be quite slow: An analisys of 10 ...
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
1k
views
Minimal edge-to-edge euclidean distance between labeled components in numpy array
I have a number of distinct forms in large numpy arrays and I want to calculate the edge-to-edge euclidean distance between them using numpy and scipy.
Note: I did a search and this is different ...
3
votes
1
answer
7k
views
calculate Euclidean distance of two image in hsv color space in matlab
i use the code below to calculate the Euclidean distance for two rgb images:
Im1 = imread(filename1);
Im1 = rgb2gray(Im1);
hn1 = imhist(Im1)./numel(Im1);
Im2 = imread(filename2);
Im2 = rgb2gray(Im2);
...
2
votes
1
answer
1k
views
relabeling pixels based on distance between object's centerline and boundary
I've a binary image containing an object as illustrated in the figure below. The centerline of the object is depicted in red. For each pixel belonging to the object, I would like to relabel it with a ...
2
votes
1
answer
56
views
How to Divide Relative Distance into Three Equidistant Regions in MATLAB?
I have two distance maps. One refers to the distance from one point to the outside (starting at 0, ending at a high number reflecting distance from one point). The other is basically equal and ...
2
votes
1
answer
2k
views
Euclidean Distance in Image Comparison
I am trying to compare images based on their Euclidean Distance. I have come across this pseudo code:
sqrt((r1-r2)^2 + (g1-g2)^2 + (b1-b2)^2)
What I am trying to figure out is- in the pseudo code ...
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 ...
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
1
answer
1k
views
Distance transform `bwdist` output is completely black
Why is the bwdist and imhmin image completely black? When I check the the two matrices in the workspace, the values seem fine. You can run this code in Matlab to check it out. The expected result is a ...
1
vote
1
answer
5k
views
Calculate Euclidean distance between RGB vectors in a large matrix
I have this RGB matrix of a set of different pixels. (N pixels => n rows, RGB => 3 columns). I have to calculate the minimum RGB distance between any two pixels from this matrix. I tried the loop ...
1
vote
2
answers
1k
views
Generalized Distance Transform in Python
I'm currently trying to implement the GDT described by Felzenszwalb and Huttenlocher (http://www.cs.cornell.edu/~dph/papers/dt.pdf) inside of Python for an image processing algorithm. However I used ...
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
1
answer
6k
views
Image Pixel Intensity and Measure of Colourfulness in Python
I want to measure the average pixel intensity and measure of colourfulness of a image. For this i'm following this approach (kindly let me know if there's any alternative approach for the same):
a) ...
1
vote
1
answer
640
views
special point distance transform in matlab
I use matlab to calculate the distance transform of a binary image, and I found that bwdist() can calculate distances of all the points of the image, but I just want to know the distance of a special ...
1
vote
1
answer
2k
views
Measuring distance between objects from a photo, Perspective transform
I have two questions which could be related:
1.) I would like to estimate distances between objects which are positioned in one plane from a photo. Geometrical shape of one object in the photo is ...
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
4k
views
Calculate chi-squared distance between two image histograms in Java
I have calculated the histograms of two images in Java (Code modified and shortened):
for (int posX = 0; posX < image.getWidth(); posX++)
{
for (int posY = 0; posY < image.getHeight(); posY+...
0
votes
0
answers
103
views
Can we do the distance transform from one boundary to another?
I have ring-like binary images with varying thicknesses. I want to calculate its thickness by calculating the distance between the inner and outer boundaries.
In many places, people used distance ...
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
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
1
answer
601
views
Total no. of possible new images after shuffling the pixel location , what will be the average Euclidean dist across all these possible new images?
Consider a 1000x1000 image I, where all pixels in the left half (first 500 columns) are white and those in the right half (last 500 columns) are black. A new image (Inew) of the same size is formed ...
0
votes
2
answers
3k
views
Euclidean distance between RGB histogram of two images
I have two pictures with histogram of the R,G,B intensities for each image. I am suppose to find the euclidean distance using the values of histogram to find the similarity.
I know euclidean distance ...
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
250
views
implementation of distance transform of given binary image [duplicate]
I am looking for a python implementation of distance transform of a given binary image. No existing library code is to be used.
This is what I have done so far -
#function to find EUCLIDIAN ...
0
votes
0
answers
51
views
Finding the distance between two images in MATLAB [duplicate]
I would like to find the distance between two images in matlab where each one is represented by (24x32x3) matrix. Any Idea how to apply any distance technique (ex. euclidean distance) to get the ...
0
votes
0
answers
1k
views
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() ...
0
votes
1
answer
2k
views
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 ...
0
votes
2
answers
1k
views
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 ...
0
votes
1
answer
1k
views
How to show 5 images having smallest Euclidean distance with respect to query image
Suppose I have one query image, and a database in matlab that has 10 images. I can read out and show one image which has smallest Euclidean distance with respect to query image. But now, I want to ...
-1
votes
1
answer
47
views
To check Euclidean distance from center to map region in two regions
I have an 450x450 gray image. The neighbourhood of each pixel to be processed is defined by the Euclidean distance based on two radii, R1 and R2. Hence:
All pixels in the neighbourhood of R1 and R2 ...