Create a rectangular Region of Interest (ROI)

plantcv.roi.rectangle(x, y, h, w, img)

returns roi_contour, roi_hierarchy

Reference Image

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"

roi_contour, roi_hierarchy = pcv.roi.rectangle(x=100, y=100, h=200, w=200, img=rgb_img)

Screenshot