Segment Insertion Angles

Measure leaf insertion angles.

plantcv.morphology.segment_insertion_angle(skel_img, segmented_img, leaf_objects, stem_objects, size, label="default")

returns labeled image

  • Parameters:
  • Context:
    • Find "tangent" angles to leaf insertion points in degrees of skeleton segments compared to the stem angle. Use size pixels of the inner portion of each leaf to find a linear regression line, and calculate angle between insertion angle and the stem.
  • Output data stored: Data ('segment_insertion_angle') automatically gets stored to the Outputs class when this function is ran. These data can always get accessed during a workflow (example below). For more detail about data output see Summary of Output Observations

Reference Image: segmented_img


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_insertion_angle(skel_img=skeleton,
                                                     size=20, label="default")

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

Labeled Image


Source Code: Here