Filter löschen
Filter löschen

find the distance from one pixel to all the pixel in image

1 Ansicht (letzte 30 Tage)
hello i have the one edge of image and also have centroid pixel, now i want to find the distance from centroid to all the pixel in edge. and want to store in some variable. now next wat i want to do i want to find exactly the another edge which have the distance from first edge is 1. so plz inform me that what is the code for it and plz explain me with example.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 27 Mär. 2014
Eucdistance = sqrt((EdgeX - CentroidX).^2 + (EdgeY - CentroidY).^2);
The edge of "exactly" distance 1 from the first edge is going to depend upon how the first edge is specified, and is going to depend upon whether the edge is certain to be horizontal, or certain to be vertical, or might be slanted. If it might be slanted then defining by a pixel list runs into some problems with definitions of distance.

Weitere Antworten (0)

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by