Brightness<T>

Models & Types · AiDotNet.Augmentation.Image

Adjusts the brightness of an image by adding a random offset to all pixel values.

Inheritance: AugmentationBase<T, ImageTensor<T>> → Brightness<T>

For Beginners

Think of this like adjusting the brightness slider on your phone. Making an image brighter adds light to all pixels, making it darker subtracts light. This teaches your model to recognize objects whether they’re in bright sunlight or shade.

How It Works

Brightness adjustment simulates different lighting conditions by uniformly increasing or decreasing all pixel values. This helps models become robust to variations in ambient lighting and exposure settings.

When to use:

  • Outdoor photography where lighting varies by time of day
  • Indoor scenes with different lighting conditions
  • Any task where exposure/lighting might vary between training and deployment

When NOT to use:

  • Tasks where absolute brightness is meaningful (e.g., astronomy)
  • Images already normalized to a specific brightness range
  • Medical imaging where pixel intensity has diagnostic meaning

Constructors

Constructor Summary
Brightness(double minFactor, double maxFactor, double probability) Creates a new brightness augmentation.

Properties

Property Summary
double MaxFactor { get; } Gets the maximum brightness adjustment factor.
double MinFactor { get; } Gets the minimum brightness adjustment factor.

Methods

Method Summary
IDictionary<string, object> GetParameters()