Add pre-region color quantization that enforces max_colors before region detection #103
Labels
No labels
blocked:children
blocked:depends-101
blocked:depends-103
blocked:depends-104
blocked:needs-attention
blocked:needs-decision
blocked:no-changes
blocked:preflight
bug
chore
feature-request
in-progress
lint-cleanup
needs-decompose
performance
quality
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/easystitch#103
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add a pre-digitize color quantization step that enforces
max_colorsbefore the region detector/classifier runs. Currently,max_colorsis only honored byPhysicalOptimizer(stage 4), which means the region detector over-segments photographic inputs into 30+ color fragments even whenmax_colors=4is requested.Approach
src/raster/color_quantizer.pyusing k-means or median-cut quantization.src/raster/raster_converter.pyso it runs before region detection.max_colorsparameter (default 8) and reduce the input image to that many colors.Acceptance Criteria
color_quantizer.pywith a quantize(image, max_colors) functionmax_colorscolors before stitchingFiles touched
src/raster/color_quantizer.py(new)src/raster/raster_converter.py(modify)Decomposed from Mark/easystitch#101