The Mid-level Vision Toolbox (MLVToolbox) was created by the BWLab at the University of Toronto as a tool for researchers to extract structural properties of contours such as orientation, length, curvature and junctions present in images. 

For details about the toolbox see this paper:

Dirk B. Walther, Delaram Farzanfar, Seohee Han, and Morteza Rezanejad (2023). The mid-level vision toolbox for computing structural properties of real-world images. Frontiers in Computer Science, 5. https://doi.org/10.3389/fcomp.2023.1140723

The MLV Toolbox is available for:

Matlab
Python

(coming soon)