中文
Node Documentation

Analyze color

VisionConfigured target requiredvision.analyze-color

Count pixels inside one explicit RGB or HSV range.

Example use

Measure the fraction of red pixels in an image region to detect a color indicator.

Node preview

Right-drag to pan and scroll to zoom. Expand inputs and edit parameters to see how ports change. This preview does not run the node; reopening the page restores the example.

Loading node preview…

Data inputs 3

Source imageimageImage

Image to analyze.

RequiredDefault: None
Color rangerangeColor range

Inclusive RGB or HSV channel bounds.

RequiredDefault: None
Value format examples
{"maximum":[255,80,80],"minimum":[220,0,0],"space":"rgb"}
{"maximum":[75,100,100],"minimum":[45,30,60],"space":"hsv"}
Analysis regionregionRegion

Ratio or pixel rectangle to scan.

Default availableDefault: {"height":1,"unit":"ratio","width":1,"x":0,"y":0}
Value format examples
{"height":0.5,"unit":"ratio","width":0.5,"x":0.25,"y":0.25}

Data outputs 3

Pixel countpixel-countInteger

Number of matching pixels.

  • Minimum: -9007199254740991
  • Maximum: 9007199254740991
Value format examples
0
42
FractionfractionNumber

Matching pixels divided by all pixels in the region.

CentroidcentroidPoint

Pixel centroid of matching pixels; zero when none match.

Value format examples
{"unit":"ratio","x":0.5,"y":0.5}
{"unit":"px","x":640,"y":360}
Version and node identity

Version 1.0.0

sha256:e3bfd938867ec9e8cd796ea43f268b92a2b50af99d9009512757d4a526356fb1