imagecat.operator.noise module

Operators that generate images containing noise.

imagecat.operator.noise.uniform(graph, name, inputs)[source]

Generate an image containing random values drawn from a uniform distribution.

Parameters
  • graph (Graph, required) – Graph that owns this task.

  • name (hashable object, required) – Name of the task executing this function.

  • inputs (Named Inputs, required) – Inputs for this operator.

Named Inputs
  • high (number, optional) – Highest value in the generated noise. Default: 1.

  • layer (str, optional) – Name of the layer to be created. Default: ‘Y’.

  • low (number, optional) – Lowest value for the generated noise. Default: 0.

  • role (imagecat.data.Role, optional) – Role for the layer to be created. Default: imagecat.data.Role.LUMINANCE.

  • seed (int, optional) – Random seed for the random noise function. Default: 1234.

  • res ((width, height) tuple, optional) – Resolution of the new image along each dimension. Default: [256, 256].

Returns

image – New image with one layer containing uniform noise.

Return type

imagecat.data.Image