Find Objects¶
Find objects within the image.
find_objects(img, mask, device, debug=None)
returns device, objects, object hierarchy
- Parameters:
- img - image that the objects will be overlayed
- mask - what is used for object detection
- device - Counter for image processing steps
- debug- None, "print", or "plot". Print = save to file, Plot = print to screen. Default = None
- Context:
- Used to identify objects (plant material) in an image.
- Example use:
Original image
Input binary mask
import plantcv as pcv
# Identify objects (plant material) in an image, all objects regardless of hierarchy are filled (e.g. holes between leaves).
device, id_objects, obj_hierarchy = pcv.find_objects(img, mask, device, debug="print")
Image with contours highlighted