Measure Tangent Angles of Segments

Measure tangent angles of segments as a way to quantify leaf behavior.

plantcv.morphology.segment_tangent_angle(segmented_img, objects, size, label="default")

returns labeled image

Reference Image: segmented image


from plantcv import plantcv as pcv

# Set global debug behavior to None (default), "print" (to file), 
# or "plot" (Jupyter Notebooks or X11)
pcv.params.debug = "print"

# Adjust line thickness with the global line thickness parameter (default = 5)
pcv.params.line_thickness = 3 

labeled_img = pcv.morphology.segment_tangent_angle(segmented_img=leaves_segment, 
                                                   size=15, label="default")

# Access data stored out from segment_tangent_angle
leaf_tangent_angles = pcv.outputs.observations['default']['segment_tangent_angle']['value']

Labeled Image


Source Code: Here