-
Notifications
You must be signed in to change notification settings - Fork 271
Add color card detection squareness parameters #1732
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
Add color card detection squareness parameters #1732
Conversation
Here's the code health analysis summary for commits Analysis Summary
Code Coverage Report
|
plus removed some code that i don't think we need, and bring some stuff upstream of the algo split to slightly reduce repetition
add color option to the _draw_color_chips helper function
and auto_correct_color.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern would be whether we should define aspect ratio/solidity for this context someplace in the docs. Change could be as simple as this on lines 19 and 20 of docs/transform_detect_color_card.md
or we could do something prettier. Code wise I'd approve the change as is but could see this being helpful particularly with aspect ratio conventionally defined as width/height when what we're doing has a lower bound of 1 since we take max axis / min axis.
Edit: We could also have an if statement that takes the reciprocal of aspect_ratio if it is <1 which would help some too I think.
- aspect_ratio - Optional aspect ratio (longest side / shortest side) below which objects will get removed (default = 1.27)
- solidity - Optional solidity (area / convex hull area) filter (default = 0.8)
also define calculation of new parameters in doc page
Describe your changes
Add optional kwargs to allow users to modify the
solidity
andaspect_ratio
filters, implemented inpcv.transform.detect_color_card
and withinpcv.transform.auto_correct_color
, which keeps the detected edges that are square-like. Loosening this parameters from their previously hard-coded defaults might help with color card detection in cases where the image is skewed.Also, adds verbose debug images of detected edges in the case where detection fails to find a color card under default settings. This aims to help debug the keyword argument settings.
Type of update
Is this a:
Associated issues
Additional context
For the reviewer
See this page for instructions on how to review the pull request.
plantcv/mkdocs.yml
updating.md