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.
我想找到我被分割的部分的平均厚度,所以我想找到两个边界之间的平均像素长度(见下文)。这怎么可能?
我会使用 pdist 2 功能:
A = [1,3; 2,3; 3,3]; B = [1,4; 2,5; 3,6]; dist = pdist2(A,B,'Euclidean','Smallest',1) mean(dist)
这会计算两个向量中每个点之间可能的最小距离,然后返回它的平均值。