Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regional filtering #1674

Open
HaleySchuhl opened this issue Feb 19, 2025 · 0 comments
Open

Regional filtering #1674

HaleySchuhl opened this issue Feb 19, 2025 · 0 comments
Labels
new feature New feature ideas and solutions update Updates an existing feature/method
Milestone

Comments

@HaleySchuhl
Copy link
Contributor

HaleySchuhl commented Feb 19, 2025

Is your feature request related to a problem? Please describe.
Treating an entire image with a filter, such as blurring, there is a trade off between cleaning false-positives from a mask and creating false-negatives (missing pixels in the plant mask).

Describe the solution you'd like
Be able to provide a region of interest for morphological functions like fill, fill_holes, closing, dilate, erode, floodfill, gaussian_blur, laplace_filter, median_blur, opening, scharr_filter, sobel_filter, stdev_filter, and possibly a couple others including filters on size/eccentricity pcv.filters.obj_props. For simplicity, the region should be a rectangle. Apply the same logic to pcv.transform.detect_color_card.

Describe alternatives you've considered
Adding a region filter function that takes a rectangular region (x, y, h, w) and the name of the filter function and keyword arguments that get passed to the filter function. Option to apply to only WITHIN or only OUTSIDE of the rectangle.

  • (less favored) adding ROI option (default: None) to all the functions and implementing a helper function to enable the functionality.

Additional context
Some functions are slow, like pcv.theshold.texture it's computationally heavy to calculate so reducing the area it's applied could make workflows faster.

@HaleySchuhl HaleySchuhl added new feature New feature ideas and solutions update Updates an existing feature/method labels Feb 19, 2025
@HaleySchuhl HaleySchuhl added this to the PlantCV v5.0 milestone Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature ideas and solutions update Updates an existing feature/method
Projects
None yet
Development

No branches or pull requests

1 participant