ColourSample

data class ColourSample(val closestSwatch: PredominantColorProcessor.Swatch, val red: Int, val green: Int, val blue: Int, val hue: Int, val saturation: Int, val value: Int, val luminance: Int, val chrominanceRed: Int, val chrominanceBlue: Int) : VisionData

Data class for storing data related to the return results of a PredominantColorProcessor. This data class will only have one instance affixed to the corresponding ColourSensor.

Since

5.0.0

Constructors

Link copied to clipboard
constructor(closestSwatch: PredominantColorProcessor.Swatch, rgb: IntArray, hsv: IntArray, yCrCb: IntArray)

requirement: rgb, hsv, yCrCb arrays must be three-wide containing equivalent colour components

constructor(closestSwatch: PredominantColorProcessor.Swatch, red: Int, green: Int, blue: Int, hue: Int, saturation: Int, value: Int, luminance: Int, chrominanceRed: Int, chrominanceBlue: Int)

Properties

Link copied to clipboard
val blue: Int

The exact Blue RGB component of the dominant colour within the Region of Interest. (0-255)

Link copied to clipboard

The exact Blue-difference Chroma (Cb) YCrCb component of the dominant colour within the Region of Interest. (0-255, center 128)

Link copied to clipboard

The exact Red-difference Chroma (Cr) YCrCb component of the dominant colour within the Region of Interest. (0-255, center 128)

Link copied to clipboard
val closestSwatch: PredominantColorProcessor.Swatch

The "best guess" at the general shade of the dominant colour in the Region of Interest.

Link copied to clipboard
val green: Int

The exact Green RGB component of the dominant colour within the Region of Interest. (0-255)

Link copied to clipboard
val hue: Int

The exact Hue HSV component of the dominant colour within the Region of Interest. (0-180)

Link copied to clipboard

The exact Luminance (Y) YCrCb component of the dominant colour within the Region of Interest. (0-255)

Link copied to clipboard
val red: Int

The exact Red RGB component of the dominant colour within the Region of Interest. (0-255)

Link copied to clipboard

The exact Saturation HSV component of the dominant colour within the Region of Interest. (0-255)

Link copied to clipboard
val value: Int

The exact Value HSV component of the dominant colour within the Region of Interest. (0-255)