Find the maximum and minimum dimension of a closed loop

Click For Summary
SUMMARY

The discussion focuses on determining the maximum and minimum dimensions of an irregular closed loop, particularly in the context of calculating the full-width at half maximum (FWHM) of an image. User elgen provides a method to find the maximum dimension by calculating the distance between every pair of points on the contour, using a nested loop structure in pseudo code. The approach identifies the largest distance as the maximum dimension, although elgen acknowledges that there may be more efficient methods available.

PREREQUISITES
  • Understanding of contour analysis in image processing
  • Familiarity with distance metrics, specifically Euclidean distance
  • Basic programming skills to implement pseudo code
  • Knowledge of full-width at half maximum (FWHM) concept
NEXT STEPS
  • Research efficient algorithms for calculating distances in point clouds
  • Learn about computational geometry techniques for closed loop analysis
  • Explore image processing libraries such as OpenCV for contour detection
  • Investigate optimization methods for reducing computational complexity in distance calculations
USEFUL FOR

This discussion is beneficial for image processing engineers, data scientists working with contour analysis, and anyone involved in optimizing algorithms for measuring dimensions in irregular shapes.

elgen
Messages
63
Reaction score
5
Dear all,

Is there a method to find the maximum and minimum dimension of an irregular closed loop? This is a problem when we want to define the full-width - half maximum of a image. The level contour of this image at its half maximum can be an irregular closed loop.

Any reference or comment is welcome. Thank you.

elgen
 
Physics news on Phys.org
Ah ... the maximum dimension is needed. Need to calculate the distance between every two points on the contour and the largest distance is the maximum dimension.
Here is the pseudo code, which x is Nx2 vector

Code:
    for i=1:nPoints
        for j=i+1:nPoints
            temp = norm(x(i,:)-x(j,:));
            if (temp > distance)
                distance = temp;
                idx = [i j];
            end
        end
    end

Result of some quick thinking. Perhaps there is a better way.

elgen
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K