Boundary Line Tool

Set boundary line with boundary tool, this allows the user to find the extent-y ('height') above and below as well as the area above and below the boundary line. This tool functions best if the pot size/position of the plant remains relatively constant.

NOTE: This function will be depricated in the near future, please use the analyze_bound_horizontal function as an equivalent replacement. The analyze_bound function will continue to be functional and is now a wrapper for the analyze_bound_horizontal function.

analyze_bound(img, imgname, obj, mask, line_position, device , debug=None, filename=False)

returns device, boundary headers, boundary data, image with boundary data

Output Data Units: - Y-Position - Height of the bound line used for measurement (height from bottom of image), pixels (units)
- Height-Above-Bound - Extent-y of object above bound line, pixels (units)
- Height-Below-Bound - Extent-y of object below bound line, pixels (units)
- Area-Above-Bound - area of object above bound line, pixels (units)
- Area-Below-Bound - area of object below bound line, pixels (units)
- Percent-Above-Bound - percentage of total area above the bound line
- Percent-Below-Bound - percentage of total area below the bound line

from plantcv import plantcv as pcv

# Set Boundary Line    
device, boundary_header, boundary_data, boundary_img1 = pcv.analyze_bound(img, imgname, obj, mask, 950, device, debug='print', 'setaria_boundary_img.png')

Boundary tool output image (y = 950)

Screenshot

Boundary line set at 950, purple line is boundary line, blue line is extent y above boundary line, green is area above boundary line.

Boundary tool output image (y = 330)

Screenshot

Boundary line set at 330, purple is boundary line, blue line is extent y above boundary line, green line is extent y below boundary line, green is area above boundary line and red is area below boundary line.