Create a circular Region of Interest (ROI), y, r, img)

returns roi_contour, roi_hierarchy

  • Parameters:
    • x - The x-coordinate of the center of the circle.
    • y - The y-coordinate of the center of the circle.
    • r - The radius of the circle.
    • img - An RGB or grayscale image to plot the ROI on in debug mode.
  • Context:
    • Used to define a region of interest in the image.

Reference Image


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 =, y=225, r=75, img=rgb_img)