Distance between an image and centroid

0

Description

function distances = distanceEdgeToCentroid(bwImage,centroid)
[row,col] = size(bwImage);
count = 1;
for i = 1:row
for j= 1:col
if bwImage(i,j) == 1
distances(count) = hypot(i-centroid(2),j-centroid(1));
count = count+1;
end
end
end
distances = distances/median(distances);
end

Autoencoders of raw images in TensorFlow

Computing similarity between query image and target database

 

Reviews

There are no reviews yet.

Be the first to review “Distance between an image and centroid”

Your email address will not be published. Required fields are marked *

Category: