-
Notifications
You must be signed in to change notification settings - Fork 257
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 helper function to centralize usage of OpenCV findContours #939
Merged
Conversation
This file contains 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
Codecov Report
@@ Coverage Diff @@
## 4.x #939 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 160 161 +1
Lines 6827 6840 +13
=========================================
+ Hits 6827 6840 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
|
HaleySchuhl
approved these changes
Sep 6, 2022
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
We utilize
cv2.findContours
throughout PlantCV and use a mixture of directly using the OpenCV function or use the PlantCV wrapperfind_objects
. In most cases it's simpler to use the OpenCV function rather than using the PlantCV wrapper within the code. Additionally, if OpenCV ever changes the function signature then PlantCV has to be changed in many places. This PR adds a helper function that callscv2.findContours
and replaces direct usage throughout PlantCV to use the helper function.Type of update
Is this a: Code refactoring
For the reviewer
See this page for instructions on how to review the pull request.
plantcv/mkdocs.yml
updating.md