Add pcv.transform.mask_color_card function #1707
Merged
Merged
Conversation
|
Here's the code health analysis summary for commits Analysis Summary
Code Coverage Report
|
this change is supposed to be in a separate PR
pcv.filters.color_card function pcv.transform.mask_color_card function
utilize the same helper within the same function file rather than across the subpackage
k034b363
approved these changes
Jun 2, 2025
k034b363
left a comment
Contributor
There was a problem hiding this comment.
Tried on a couple of different color card layouts from bellwether and pi chambers, and it works the way I expect on all of them. Looks good to me!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Adds
pcv.filters.color_cardwhich takes an RGB image as input, uses the same algorithm aspcv.transform.detect_color_cardby moving it into a helper function that gets called by bothfilters.color_cardandtransform.detect_color_card. The function returns a binary mask created by taking a bounding box of the detected color card chips. This aims to assist with object mask cleanup when regional filters are not sufficient for filtering out color card chips.Type of update
Is this a:
Associated issues
pcv.filters.color_cardfor mask cleanup #1706Additional context
This function might get used in the tripsacum seed head tutorial. It was used in the analysis of 2024 seedhead images taken at Shaw.
For the reviewer
See this page for instructions on how to review the pull request.
plantcv/mkdocs.ymlupdating.md