<commit_before>## Find Objects within a Region of Interest

Find objects within a region of interest, either cut those objects to the region of interest 
or include objects that overlap with the region of interest.

**plantcv.roi_objects**(*img, roi_contour, roi_hierarchy, object_contour, obj_hierarchy, roi_type*)

**returns** kept objects, object hierarchy, object mask, object area

**Important Note:** If your ROI object detection does not perform first check that the ROI is 
completely within the image.

- **Parameters:**
    - img = RGB or grayscale image data to display kept objects on
    - roi_contour = contour of roi, output from one of the pcv.roi subpackage functions
    - roi_hierarchy = contour of roi, output from one of the pcv.roi subpackage functions
    - object_contour = contours of objects, output from "find_objects" function 
    - obj_hierarchy = hierarchy of objects, output from "find_objects" function
    - roi_type = 'cutto', 'partial' (for partially inside, default), or 'largest' (keep only the largest contour)
    
- **Context:**
    - Used to find objects within a region of interest and decide which ones to keep.
- **Warning:** <commit_msg>update roi_objects.md<commit_after>## Find Objects within a Region of Interest

Find objects within a region of interest, either cut those objects to the region of interest 
or include objects that overlap with the region of interest.

**plantcv.roi_objects**(*img, roi_contour, roi_hierarchy, object_contour, obj_hierarchy, roi_type='partial'*)

**returns** kept objects, object hierarchy, object mask, object area

**Important Note:** If your ROI object detection does not perform first check that the ROI is 
completely within the image.

- **Parameters:**
    - img = RGB or grayscale image data to display kept objects on
    - roi_contour = contour of roi, output from one of the pcv.roi subpackage functions
    - roi_hierarchy = contour of roi, output from one of the pcv.roi subpackage functions
    - object_contour = contours of objects, output from "find_objects" function 
    - obj_hierarchy = hierarchy of objects, output from "find_objects" function
    - roi_type = 'partial' (for partially inside, default), 'cutto', or 'largest' (keep only the largest contour)
    
- **Context:**
    - Used to find objects within a region of interest and decide which ones to keep.
- **Warning:** 
{'fraction_non_alphanumeric': 0.07634228187919463, 'fraction_numerical': 0.0, 'mean_word_length': 4.264900662251655, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5131131', 'n_tokens_mistral': 656, 'n_tokens_neox': 646, 'n_words': 305}