Create a circular Region of Interest (ROI)¶
plantcv.roi.circle(x, 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
roi_contour, roi_hierarchy = pcv.roi.circle(x=200, y=225, r=75, img=rgb_img)