OpticalDistortion<T>
Models & Types · AiDotNet.Augmentation.Image
Simulates barrel and pincushion lens distortion.
Inheritance: AugmentationBase<T, ImageTensor<T>> → ImageAugmenterBase<T> → OpticalDistortion<T>
For Beginners
Camera lenses aren’t perfect — they bend straight lines slightly. Wide-angle lenses make edges bulge outward (barrel distortion), while telephoto lenses make edges pinch inward (pincushion). This augmentation simulates these effects.
How It Works
Optical distortion simulates the radial distortion produced by camera lenses. Barrel distortion (positive k) makes straight lines bow outward, while pincushion distortion (negative k) makes them bow inward. This is a common effect in wide-angle and telephoto lenses.
When to use:
- Training models robust to different camera lenses
- Autonomous driving (wide-angle dash cameras)
- Surveillance camera footage processing
Constructors
| Constructor | Summary |
|---|---|
OpticalDistortion(double minDistortionK, double maxDistortionK, double fillValue, double probability) |
Creates a new optical distortion augmentation. |
Properties
| Property | Summary |
|---|---|
double FillValue { get; } |
Gets the fill value for out-of-bounds pixels. |
double MaxDistortionK { get; } |
Gets the maximum distortion coefficient. |
double MinDistortionK { get; } |
Gets the minimum distortion coefficient. |
Methods
| Method | Summary |
|---|---|
IDictionary<string, object> GetParameters() |