Skip to content

Exclude Objects touching/overlapping ROI border #1651

@jksshack

Description

@jksshack

Is your feature request related to a problem? Please describe.
To the best of my knowledge currently the roi.filter only provides the option to either cut objects at the defined border of the roi or include objects that overlap the roi. There is no option to exclude objects that overlap the border of the roi.
In the images I am using, the roi borders are defined as the border of the image. Objects that touch the roi border are not fully in the image.

Describe the solution you'd like
An additional option for the roi_type that would exclude objects touching the roi border.

Describe alternatives you've considered

  • Shrinking the roi, works in some cases, but not all.

  • Taking the image at a greater height to include more objects of interest in the image, (so the roi can be significantly shrunk without sacrificing # of objects) - however the height at which I can take an image above the plants is a constraint.

-auto_grid, however the objects are not spaced consistently across images so roi_filter works much better than auto_grid

Additional context
Attached a photo
If there's a way to do this that I've missed or haven't thought of (I'm pretty new to plantcv, opencv, etc...), would really appreciate your insight! ty!!

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    new featureNew feature ideas and solutions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions