DistBetween2SegmentHP(A1,A2,B1,B2)
This function is designed for high performance computation by avoiding use any loop and judgement statement. It can return N distances between N 2D segments and N 2D segments.
% A1,A2 is the matrix of two points of segment A, N*2
% B1,B2 is the matrix of two points of segment A, N*2
% shortestdistance is the matrix of distances between each two segment N*1
% directionvector indicate the vector of the shortestdistance N*2
% closepointonA and closepointonB is the nearest points on two segments N*2
% by Sky Li All right reserved.
% E-mail: skyliustc@gmail.com
Cite As
Li Ye (2026). DistBetween2SegmentHP(A1,A2,B1,B2) (https://www.mathworks.com/matlabcentral/fileexchange/60279-distbetween2segmenthp-a1-a2-b1-b2), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Image Segmentation >
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
