Scale features

This is a function to to transform the coordiantes of landmark points onto a common scale (0-1.0) Scaling is used to remove the influence of size on shape parameters. Returns a list of tuples.

plantcv.scale_features(obj, mask, points, boundary_line)

returns rescaled landmark points, a rescaled centroid point, a rescaled baseline point

Input contour of plant object, an mask that denotes plant outline and landmark points

Screenshot

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"

# Identify acute vertices (tip points) of an object
# Results in set of point values that may indicate tip points
points_rescaled, centroid_rescaled, bottomline_rescaled = pcv.scale_features(obj, mask, landmark_points, boundary_line)

Image of rescaled points in white, centroid is in gold and centroid at pot base is in blue

Screenshot