# colour_hdri.sampling Package

## Sub-Modules

- colour_hdri.sampling.grossberg2003 Module
  - Grossberg (2003) Histogram Based Image Sampling
- colour_hdri.sampling.variance_minimization Module
  - Viriyothai (2009) Variance Minimization Light Probe Sampling

## Module Contents

`colour_hdri.sampling.``samples_Grossberg2003`(image_stack, samples=1000, n=256)

  Returns the samples for given image stack intensity histograms using Grossberg (2003) method.

  Parameters: | image_stack (array_like) – Stack of single channel or multi-channel floating point images. samples (int, optional) – Samples count. n (int, optional) – Histograms bins count.
  Returns: | Intensity histograms samples.
  Return type: | ndarray

`colour_hdri.sampling.``light_probe_sampling_variance_minimization_Viriyothai2009`(light_probe, lights_count=16, colourspace=None)

  Sample given light probe to find lights using Viriyothai (2009) variance minimization light probe sampling algorithm.

  Parameters: | light_probe (array_like) – Array to sample for lights. lights_count (int) – Amount of lights to generate. colourspace (colour.RGB_Colourspace, optional) – RGB colourspace used for internal Luminance computation.
  Returns: | list of `Light_Specification` lights.
  Return type: | list