Analyze color
VisionConfigured target required
vision.analyze-colorCount 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 image
imageImage Image to analyze.
RequiredDefault:None- Color range
rangeColor range Inclusive RGB or HSV channel bounds.
RequiredDefault:NoneValue format examples
{"maximum":[255,80,80],"minimum":[220,0,0],"space":"rgb"}{"maximum":[75,100,100],"minimum":[45,30,60],"space":"hsv"}- Analysis region
regionRegion 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 count
pixel-countInteger Number of matching pixels.
- Minimum: -9007199254740991
- Maximum: 9007199254740991
Value format examples
042- Fraction
fractionNumber Matching pixels divided by all pixels in the region.
- Centroid
centroidPoint 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