Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何找到distance属于两个不同集合的两个像素之间的值?我认为pdist除了单个对象之外会这样做吗?
distance
pdist
谢谢。
只需计算欧几里得距离:
p1 % a 1x2 vector of the x y position of the first pixel p2 % a 1x2 vector of the x y position of the second pixel d = sqrt( ( p1(1)-p2(1) ).^2 + (p1(2)-p2(2)).^2 );