Conversation
Collaborator
AdenAthar
commented
Feb 23, 2026
- Percentage-based threshold algorithm (55% of pixel range)
- Default threshold changed from 172 → 140
- All 17 MSU varieties calibrated in starch_scales.yml
- Result: 15/15 monotonic (was 6/15)
Convert threshold from absolute value to percentage of actual pixel range. User inputs 0-255 (e.g., 172 = 67.45%), applied as: low + (high - low) * percentage. Provides consistent detection across varying lighting conditions.
All 4 varieties have monotonically decreasing ratings and were calibrated from MSU reference images using threshold 172.
Testing on 15 MSU starch reference varieties showed that 55% threshold achieves perfect monotonicity (15/15 varieties) compared to 67.45% which had 8/15 monotonic with 9 violations. The percentage-based threshold adapts to each image's actual pixel range, providing more consistent results across varying lighting conditions.
- Updated 12 MSU varieties with new 55% threshold data achieving 15/15 monotonicity with 0 violations - Added 5 new varieties: HONEYCRISP, BRAEBURN, EVERCRISP, GALA, ROME - All MSU varieties now use consistent integer index scales (1-8) - Kept non-MSU varieties unchanged (HONEY_CRISP, WA38, ALLAN_BROS, CORNELL, PURDUE, DANJOU, MINNEISKA, ROYAL_GALA)
…EY_CRISP StarchArea.py: - extractImage() -> getPixelRange() - adjustImage() -> remapToRange() - gray -> grayscale - Removed unused grayscale_normalized variable starch_scales.yml: - Removed duplicate HONEY_CRISP entry (HONEYCRISP with 55% calibration is kept)
…tarch - Remove getPixelRange nested function and inline its histogram logic - Remove remapToRange function (dead code - was only used for visualization) - Remove unused grayscale_normalized variable - Clean up comments
…hold - CORNELL: Updated ratings from new calibration - PURDUE: Updated ratings from new calibration - DANJOU: Updated ratings, interpolated 1.5 and 3.5 for monotonicity, added 6.0 - WA38: Added new entry with averaged A/B sample ratings
This file contains hidden or 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
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.