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

Kmeans grayscale #1570

Merged
merged 35 commits into from
Nov 4, 2024
Merged

Kmeans grayscale #1570

merged 35 commits into from
Nov 4, 2024

Conversation

leafism9
Copy link
Collaborator

@leafism9 leafism9 commented Jul 23, 2024

Describe your changes
A clear and concise description of what changes are made by this pull request.
What was the previous functionality (if relevant) and what can we do now with
these changes.

For any previously RGB specific lines in patch_extract() or predict_kmeans(), the added code checks the number of dimensions and number of channels in the image and chooses the RGB or grayscale vesion of the line accordingly. This is a non-breaking feature enhancement that allows grayscale functionality to the preexisting kmeans functions.

Additional update added 10/24/24 by Keely (k034b363), this PR now includes padding the outside edges of images input to predict_kmeans so that resulting masks can be applied to the original image. We have included this update here so as to avoid merge in order conflicts.

Type of update
Is this a: New feature or feature enhancement

Associated issues
Updated PR now closes: #1552

Additional context
Add any other context about the problem here.
N/A

For the reviewer
See this page for instructions on how to review the pull request.

  • PR functionality reviewed in a Jupyter Notebook
  • All tests pass
  • Test coverage remains 100%
  • Documentation tested
  • New documentation pages added to plantcv/mkdocs.yml
  • Changes to function input/output signatures added to updating.md
  • Code reviewed
  • PR approved

Copy link

deepsource-io bot commented Jul 23, 2024

Here's the code health analysis summary for commits 92aea4c..5c207f3. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ Success
🎯 1 occurence resolved
View Check ↗
DeepSource Test coverage LogoTest coverage✅ SuccessView Check ↗

Code Coverage Report

MetricAggregatePython
Branch Coverage100%100%
Composite Coverage100%100%
Line Coverage100%100%
New Branch Coverage100%100%
New Composite Coverage100%100%
New Line Coverage100%, ✅ Above Threshold100%, ✅ Above Threshold

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@k034b363 k034b363 added enhancement Enhancements to existing features ready to review labels Jul 23, 2024
@k034b363 k034b363 added this to the PlantCV v4.x milestone Jul 23, 2024
@k034b363 k034b363 requested a review from annacasto July 23, 2024 18:05
@k034b363 k034b363 added work in progress Mark work in progress and removed ready to review labels Aug 16, 2024
@k034b363 k034b363 added ready to review and removed work in progress Mark work in progress labels Oct 21, 2024
add masks rather than subtracting portions. otherwise there will be a picture frame type border in the mask
@k034b363 k034b363 added work in progress Mark work in progress and removed ready to review labels Oct 23, 2024
@k034b363 k034b363 added ready to review and removed work in progress Mark work in progress labels Oct 24, 2024
@nfahlgren nfahlgren modified the milestones: PlantCV v4.x, PlantCV v4.6 Nov 4, 2024
@nfahlgren nfahlgren merged commit 2a2d811 into main Nov 4, 2024
5 checks passed
@nfahlgren nfahlgren deleted the kmeans-grayscale branch November 4, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancements to existing features ready to review
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Kmeans function changes image size
5 participants