getNearestNeighborDistances.m
                    Version 1.0.0.1 (3.11 KB) by  
                  Paul Fricker
                    
                
                
                  Compute nearest-neighbor distances for the regions in a Boolean image.
                
                  
              Computes the shortest distance between each region and its nearest neighbor in a Boolean input image. Also returns the pair of closest (x,y)-points for each pair of nearest-neighbor regions.
Cite As
Paul Fricker (2025). getNearestNeighborDistances.m (https://se.mathworks.com/matlabcentral/fileexchange/47964-getnearestneighbordistances-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
              Created with
              R2014a
            
            
              Compatible with any release
            
          Platform Compatibility
Windows macOS LinuxCategories
- AI and Statistics > Statistics and Machine Learning Toolbox > Cluster Analysis and Anomaly Detection > Nearest Neighbors >
 
      Find more on Nearest Neighbors in Help Center and MATLAB Answers
    
  Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
