Two functions for working with the Feret diameter of labelized particles in images.
The function imFeretDiameter computes the Feret diameter for each one of the specified directions. The maximal diameter can be obtained by computing the max of the result.
The function imOrientedBox computes Feret diameter for several directions, and keep the direction that produces the minimal-area enclosing rectangle. The function drawOrientedBox can be used for visualising result.
Both functions could easily be adapted to a set of points.
David Legland (2021). Feret diameter and oriented box (https://www.mathworks.com/matlabcentral/fileexchange/30402-feret-diameter-and-oriented-box), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
David,
Thanks for your reply. It's very useful and these codes are concise and beautiful.
Hi di,
you can download y other contribution "imHistogram", also on the FileExchange (https://fr.mathworks.com/matlabcentral/fileexchange/28681-imhistogram).
You can also grab it from the GitHub page of the MatImage toolbox, that gather image processing tools I have written. https://github.com/mattools/matImage
How to find this function "imHistogram" that exists in function of "demoImMaxFeretDiameter"?
GOOD
Many thanks for this code
Works as desired! Good documentation too.