src.mining.hsv_from_rgb_miner

Classes

HSVFromRGBMiner(**kwargs)

class src.mining.hsv_from_rgb_miner.HSVFromRGBMiner(**kwargs)
Author:

Alberto M. Esmoris Pena

Mine Hue, Saturation and Value (HSV) components representing color from available Red, Green, Blue (RGB) components. See Miner.

Variables:

frenames (list) – Optional attribute to specify how to rename the features representing the HSV components. The first element corresponds to Hue, the second to Saturation, and the third one to Value.

static extract_miner_args(spec)

Extract the arguments to initialize/instantiate a HSVFromRGBMiner from a key-word specification.

Parameters:

spec – The key-word specification containing the arguments.

Returns:

The arguments to initialize/instantiate a HSVFromRGBMiner.

__init__(**kwargs)

Initialize an instance of HSVFromRGBMiner.

Parameters:

kwargs – The attributes for the HSVFromRGBMiner that will also be passed to the parent.

mine(pcloud)

Mine geometric features from the given point cloud.

Parameters:

pcloud (PointCloud) – The point cloud to be miend

Returns:

The point cloud extended with HSV color components as features.

Return type:

PointCloud

static RGB_to_HSV(R, G, B, hue_unit='radians')

Transform the received RGB components in \([0, 1]\) to HSV. If RGB components are given in \([0, 255]\) they will be automatically mapped to \([0, 1]\). Also, if RGB components are given in \([0, 65535]\) they will be automatically mapped to \([0, 1]\).

Parameters:
  • R – The red component for each point.

  • G – The green component for each point.

  • B – The blue component for each point.

Returns:

A tuple of three arrays representing Hue (H), Saturation (S) and Value (V).

Return type:

tuple of np.ndarray