Skip to content

Conversation

@NMiklave
Copy link
Collaborator

@NMiklave NMiklave commented Oct 20, 2025

Describe your changes
This PR introduces support for an alternate style of color card by setting color_chip_size="astro" in the pcv.transform functions detect_color_card, mask_color_card, and auto_correct_color.

Type of update
Is this a:

  • New Feature/Feature Enhancement
  • Update to documentation

Associated issues
Related to an ongoing discussion on evaluating calibration quality, in #1770.

Additional context
This style of color card is commonly used in the astrobotany research community as a low-cost and low-mass alternative to Macbeth ColorChecker style cards. The reference matrix for these cards is set so that an image corrected with either type of card will, on average, have measurement error of RGB channels less than 2.5 (1% of full range).

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

@NMiklave NMiklave added enhancement Enhancements to existing features new feature New feature ideas and solutions ready to review labels Oct 20, 2025
@deepsource-io
Copy link

deepsource-io bot commented Oct 20, 2025

Here's the code health analysis summary for commits 33f8429..993ff03. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ SuccessView 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.

@NMiklave NMiklave changed the base branch from main to v5.0 October 24, 2025 15:03
@joshqsumner joshqsumner added this to the PlantCV v5.0 milestone Oct 24, 2025
@joshqsumner joshqsumner self-requested a review October 27, 2025 12:57
Copy link
Contributor

@joshqsumner joshqsumner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I really like the partial detection option but I did not dig into how well the color correction works given that partial detection. Might be an interesting tangent related to #1770.
Made a few edits docs layout wise and added a function to throw an error if an aruco tag ends up with a mask in it as would happen in:

from plantcv import plantcv as pcv
pcv.params.debug = "plot"
img, _, _ = pcv.readimage("/home/josh/plantcv/tests/testdata/astrocard_img.png")
# function detects corner squares, which could be misleading without helper error function
labeled_mask = pcv.transform.detect_color_card(rgb_img=img)

@NMiklave NMiklave added work in progress Mark work in progress and removed ready to review labels Dec 18, 2025
@nfahlgren nfahlgren added ready to review and removed work in progress Mark work in progress labels Dec 23, 2025
@nfahlgren nfahlgren merged commit 35e8b57 into v5.0 Jan 2, 2026
5 checks passed
@nfahlgren nfahlgren deleted the astrobotany-color-cards branch January 2, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancements to existing features new feature New feature ideas and solutions ready to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants