chickadee » leptonic » pix-color-fraction

pix-color-fractionprocedure
  • in - PPIX - 32bpp
  • in - DARKTHR: int32
    • Threshold near black. Pixels below aren’t included in stats. Typical: 20
  • in - LIGHTTHR: int32
    • Threshold near white. Pixels above aren’t included in stats. Typical: 244
  • in - DIFFTHR: int32
    • Threshold for max diff between R/G/B values. When diff is less, pixel is considered insufficiently colorful. Typical: 60
  • in - FACTOR: int32 - Subsampling factor, 1, 2, 4. 1 is no subsampling.
  • out - PIXFRAC: ptr to float - optional, use #f to skip.
    • Fraction of pixels considered for color content.
  • out - COLORFRAC: ptr to float - optional, use #f to skip.
    • Fraction of pixels meeting criterion for sufficient color. 0.0 on error.
  • returns: 0 if “OK”, 1 on error.