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.

scale_features(obj, mask, points, boundary_line, device, debug=None)

returns device, 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

device = 1

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

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

Screenshot