Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 2.29 KB

File metadata and controls

49 lines (30 loc) · 2.29 KB

Segment Image Series

This function uses watershed segmentation to label individual objects in a series of images.

plantcv.segment_image_series(imgs_paths, masks_paths, rois, save_labels=True, ksize=3)

returns out_labels

  • Parameters:

    • imgs_paths = List of paths to the images in the time series. Ordered by time
    • masks_paths = List of paths to the masks in the time series. Each mask should correspond to the image in imgs_paths for the same index
    • rois = List of roi contours
    • save_labels = Optional, saves the labels of each image independently (default: True)
    • ksize = int, tuple, or numpy.ndarray. Specifies the size of the block in the time dimension to propagate the labels. If a tuple the first element is used, if array then the first dimension is used (default: 3)
  • Context:

    • Used to obtain individual masks for objects, like full plants or leaves, that grow in a time series of images from being separated to touching

Early time point and corresponding mask

Screenshot Screenshot

Later time point and corresponding mask

Screenshot 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"

# Using segment image series
analysis_image = pcv.segment_image_series(imgs_paths=paths_to_imgs_list, masks_paths=paths_to_masks_list, rois=valid_rois, save_labels=True, ksize=3)

Image Series Segmentation

Screenshot

Screenshot

Source Code: Here