Flag Dominant Hue Average Extractor
Extract weighted circular mean from caller annotated flag/image hue samples, excluding achromatic evidence while retaining its area share; not image decoding, dominant-cluster inference or a hue for white/black areas.
Description
A weighted circular hue mean excludes achromatic observations while preserving their share of area.
A weighted circular hue mean excludes achromatic observations while preserving their share of area. Opposing hues may cancel.1
Enter aligned nonempty hues bounded±10^9 degrees, nonnegative weights with positive total and binary chromatic evidence. Normalize hues; return mean if chromatic weight>0 and R>1 e−12, otherwise hue 0 with false. Also return chromatic share and resultant length.
When to use Flag Dominant Hue Average Extractor
Use Flag Dominant Hue Average Extractor when you need to evaluate the supplied records under the calculation and evidence rules below. No image decoding, dominant-cluster detection or hue for black/white areas is inferred.
Prepare colors in the stated color space and scale. Use encoded RGB fractions, linear RGB, Lab, xy, byte values or ink percentages exactly as requested; supply caller tolerances and reference conditions.
How to use Flag Dominant Hue Average Extractor and understand its results
- Prepare colors in the stated color space and scale. Use encoded RGB fractions, linear RGB, Lab, xy, byte values or ink percentages exactly as requested; supply caller tolerances and reference conditions.
- Enter observedHueDegrees, observedPixelOrAreaWeights, chromaticEvidenceFlags using the field table and calculation rules, then run the tool.
- Read weightedCircularHueDegrees, meanChromaticHueAvailable, chromaticWeightFraction, weightedResultantLength. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| observedHueDegrees | Observed hue degrees | list of number | Required |
| observedPixelOrAreaWeights | Observed pixel or area weights | list of number | Required |
| chromaticEvidenceFlags | Chromatic evidence flags | list of number | Required |
Enter aligned nonempty hues bounded±10^9 degrees, nonnegative weights with positive total and binary chromatic evidence. Normalize hues; return mean if chromatic weight>0 and R>1 e−12, otherwise hue 0 with false. Also return chromatic share and resultant length.
x/y=sum(chromaticWeight×cos/sin hue)/chromaticWeight; R=hypot(x,y) Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| weightedCircularHueDegrees | Weighted circular hue degrees | number |
| meanChromaticHueAvailable | Mean chromatic hue available | boolean |
| chromaticWeightFraction | Chromatic weight fraction | number |
| weightedResultantLength | Weighted resultant length | number |
{
"input": {
"observedHueDegrees": [
350,
10
],
"observedPixelOrAreaWeights": [
1,
1
],
"chromaticEvidenceFlags": [
1,
1
]
},
"output": {
"weightedCircularHueDegrees": 0,
"meanChromaticHueAvailable": true,
"chromaticWeightFraction": 1,
"weightedResultantLength": 0.9848077530122079
}
} Limitations and assumptions
No image decoding, dominant-cluster detection or hue for black/white areas is inferred.
Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Numeric lists are limited to 10,000 entries; string lists to 128 strings of at most 128 characters each. The rules above may impose smaller limits. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.
Alternative or Complementary methods
Use Brand Hue Variance Degrees Across Assets: Brand hue deviations should use circular offsets around an explicit reference. Opposing observations can leave the circular mean unavailable. For a complementary task, use Categorical Minimum Delta-E Pairwise: Categorical color separation can be audited across every palette pair. CIE 76 uses Euclidean distance in one Lab reference frame.
References
-
Flag Dominant Hue Average Extractor — tool.io
Similar or alternative tools
- Brand Hue Variance Degrees Across Assets
Brand hue deviations should use circular offsets around an explicit reference. Opposing observations can leave the circular mean unavailable.
- Categorical Minimum Delta-E Pairwise
Categorical color separation can be audited across every palette pair. CIE 76 uses Euclidean distance in one Lab reference frame.