Conversation
|
|
Overall Grade |
Security Reliability Complexity Hygiene Coverage |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Python | Jun 9, 2026 8:15p.m. | Review ↗ | |
| Code coverage | Jun 9, 2026 8:15p.m. | Review ↗ |
Code Coverage Summary
| Language | Line Coverage (New Code) | Line Coverage (Overall) |
|---|---|---|
| Aggregate | 100% [✓ above threshold] |
99.9% [▼ down 0.1% from main] |
| Python | 100% [✓ above threshold] |
99.9% [▼ down 0.1% from main] |
➟ Additional coverage metrics may have been reported. See full coverage report ↗
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
There was a problem hiding this comment.
Pull request overview
This PR adds Delta E color-difference reporting for detected color cards, exposing a new pcv.transform.deltaE function and integrating automatic Delta E metadata generation into color-card detection.
Changes:
- Adds
_delta_ecalculation logic and exports user-facingdeltaE. - Updates
detect_color_cardto optionally compute Delta E metadata. - Adds tests and documentation for the new Delta E workflow.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
plantcv/plantcv/transform/delta_e.py |
Adds Delta E computation, metadata output, and debug plotting. |
plantcv/plantcv/transform/detect_color_card.py |
Adds deltaE wrapper and automatic Delta E calculation option. |
plantcv/plantcv/transform/__init__.py |
Exports deltaE from the transform namespace. |
tests/plantcv/transform/test_deltaE.py |
Adds tests for Macbeth, Astro, and debug plotting behavior. |
docs/transform_deltaE.md |
Adds documentation page for Delta E usage. |
docs/transform_detect_color_card.md |
Updates color-card detection docs for Delta E metadata. |
docs/updating.md |
Records new/updated transform signatures. |
mkdocs.yml |
Adds Delta E documentation to navigation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Describe your changes
Adds delta E calculation as part of color card detection and as a standalone function in
plantcv.plantcv.transform. The main function is kept as a helper intransformwhich is called by a user-facing function with the intent of being used on calibrated images to show a calibrated difference from the expectation and is called bydetect_color_cardwith the intent of showing the starting difference.Type of update
This is a new feature.
Associated issues
Closes #1770
Additional context
Currently this only compares against expected values for color chips, we could have something where you give it one image, run the correction, then compare the delta E raw vs corrected. I did it this way because I don't think it's as useful to say "the color correction changed the image" to X degree when we don't know if the change is good or bad so to speak. I'd like to hear argument against that if anyone has it. I think we could add that functionality in the piece I already wrote with some logic to handle if
card_typeis an image.this also does not make a bar plot like the one from imageZebra but it could if we wanted that. There is an example in my last comment in #1770 about what that might look like.
For the reviewer
See this page for instructions on how to review the pull request.
plantcv/mkdocs.ymlupdating.md