An EDataAugmentation object is responsible for storing the data augmentation parameters and generating new transformed images from existing ones. Deep learning algorithms are not invariant to the location, scale, or rotation of the elements of interest in the image. Thus, if the final application requires the deep learning algorithm to be invariant to those characteristics, the dataset must contain images covering the spectrum of those characteristics. More...
#include <eVision/EasyDeepLearning/EDataAugmentation.h>
Public Member Functions | |
| EDataAugmentation () | |
| Creates an EDataAugmentation object. | |
| EDataAugmentation (const eVision::EasyDeepLearning::EDataAugmentation &other) | |
| Creates a copy of the EDataAugmentation object other. | |
| virtual | ~EDataAugmentation () throw () |
| eVision::EasyDeepLearning::EDataAugmentation & | operator= (const eVision::EasyDeepLearning::EDataAugmentation &other) |
| Copies the EDataAugmentation object other to this object. | |
| bool | operator== (const eVision::EasyDeepLearning::EDataAugmentation &other) const |
| Equality operator. | |
| void | CopyTo (eVision::EasyDeepLearning::EDataAugmentation &other) const |
| Copies itself to the EDataAugmentation object other. | |
| void | Load (const std::string &path) |
| Loads an EDataAugmentation object. The given ESerializer must have been created for reading. | |
| void | Load (eVision::ESerializer *serializer) |
| Loads an EDataAugmentation object. The given ESerializer must have been created for reading. | |
| void | Save (const std::string &path) |
| Saves an EDataAugmentation object. The given ESerializer must have been created for writing. | |
| void | Save (eVision::ESerializer *serializer) |
| Saves an EDataAugmentation object. The given ESerializer must have been created for writing. | |
| bool | HasDataAugmentations () const |
| Whether the EDataAugmentation object contains augmentations. | |
| void | SetMaxHorizontalShift (int32_t maxShift) |
| Sets the maximum horizontal shift allowed. | |
| int32_t | GetMaxHorizontalShift () const |
| Return the maximum horizontal shift allowed. | |
| void | SetMaxVerticalShift (int32_t maxShift) |
| Sets the maximum vertical shift allowed. | |
| int32_t | GetMaxVerticalShift () const |
| Return the maximum vertical shift allowed. | |
| void | SetMaxRotationAngle (float maxAngle) |
| Set the maximum rotation angle allowed. Its value must be between 0 and 180 degrees. | |
| float | GetMaxRotationAngle () const |
| Returns the maximum rotation angle allowed. The unit of the returned angle is in the current angle unit (see Easy::SetAngleUnit). | |
| void | SetEnableVerticalFlip (bool enable) |
| Sets whether to use vertically flipped versions of input images. | |
| bool | GetEnableVerticalFlip () const |
| Gets whether to use vertically flipped versions of input images. | |
| void | SetEnableHorizontalFlip (bool enable) |
| Sets whether to use horizontally flipped versions of input images. | |
| bool | GetEnableHorizontalFlip () const |
| Gets whether to use horizontally flipped versions of input images. | |
| void | SetMinScale (float minScale) |
| Sets the minimum scaling allowed. Its value must be strictly positive and below EDataAugmentation::SetMaxScale. | |
| float | GetMinScale () const |
| Gets the minimum scaling allowed. | |
| void | SetMaxScale (float maxScale) |
| Sets the maximum scaling allowed. Its value must be strictly positive and over EDataAugmentation::SetMinScale. | |
| float | GetMaxScale () const |
| Gets the maximum scaling allowed. | |
| void | SetMaxHorizontalShear (float hShear) |
| Sets the maximum absolute horizontal shear, represented as an angle from the vertical direction. Its value must be between 0 and 90 degrees. | |
| float | GetMaxHorizontalShear () const |
| Gets the maximum absolute horizontal shear, represented as an angle from the vertical direction. | |
| void | SetMaxVerticalShear (float vShear) |
| Sets the maximum absolute vertical shear, represented as an angle from the horizontal direction. Its value must be between 0 and 90 degrees. | |
| float | GetMaxVerticalShear () const |
| Gets the maximum absolute vertical shear, represented as an angle from the horizontal direction. | |
| void | SetMaxBrightnessOffset (float offset) |
| Sets the maximum absolute brightness offset. It must be between 0 and 1. | |
| float | GetMaxBrightnessOffset () const |
| Gets the maximum absolute brightness offset. | |
| void | SetMaxContrastGain (float val) |
| Sets the maximum contrast gain. Its value must be strictly positive and over EDataAugmentation::SetMinContrastGain. | |
| float | GetMaxContrastGain () const |
| Gets the maximum contrast gain. | |
| void | SetMinContrastGain (float val) |
| Sets the minimum contrast gain. Its value must be strictly positive and below EDataAugmentation::SetMaxContrastGain. | |
| float | GetMinContrastGain () const |
| Gets the minimum contrast gain. | |
| void | SetMinGamma (float gamma) |
| Sets the minimum gamma for gamma correction. Its value must be strictly positive and below EDataAugmentation::SetMaxGamma. | |
| float | GetMinGamma () const |
| Gets the minimum gamma for gamma correction. | |
| void | SetMaxGamma (float gamma) |
| Sets the maximum gamma for gamma correction. Its value must be higher than EDataAugmentation::SetMinGamma. | |
| float | GetMaxGamma () const |
| Gets the maximum gamma for gamma correction. | |
| void | SetMaxHueOffset (float hueOffset) |
| Sets the maximum absolute hue offset. Its value must be between 0 and 180 degrees. | |
| float | GetMaxHueOffset () const |
| Gets the maximum absolute hue offset. | |
| void | SetMinSaturationGain (float saturationGain) |
| Sets the minimum saturation gain. Its value must be strictly positive. | |
| float | GetMinSaturationGain () const |
| Gets the minimum saturation gain. | |
| void | SetMaxSaturationGain (float saturationGain) |
| Sets the maximum saturation gain. Its value must be over or equal to EDataAugmentation::SetMinSaturationGain. | |
| float | GetMaxSaturationGain () const |
| Gets the maximum saturation gain. | |
| void | SetGaussianNoiseMaximumStandardDeviation (float gaussianMaximumDeviation) |
| The Gaussian noise maximum standard deviation. | |
| float | GetGaussianNoiseMaximumStandardDeviation () const |
| The Gaussian noise maximum standard deviation. | |
| void | SetGaussianNoiseMinimumStandardDeviation (float gaussianMinimumDeviation) |
| The Gaussian noise minimum standard deviation. | |
| float | GetGaussianNoiseMinimumStandardDeviation () const |
| The Gaussian noise minimum standard deviation. | |
| void | SetSpeckleNoiseMaximumStandardDeviation (float speckleNoiseMaximumStandardDeviation) |
| The speckle noise maximum standard deviation. | |
| float | GetSpeckleNoiseMaximumStandardDeviation () const |
| The speckle noise maximum standard deviation. | |
| void | SetSpeckleNoiseMinimumStandardDeviation (float speckleNoiseMinimumStandardDeviation) |
| The speckle noise minimum standard deviation. | |
| float | GetSpeckleNoiseMinimumStandardDeviation () const |
| The speckle noise minimum standard deviation. | |
| void | SetSaltAndPepperNoiseMaximumDensity (float saltAndPepperNoiseMaximumDensity) |
| The maximum density of the salt and pepper noise. | |
| float | GetSaltAndPepperNoiseMaximumDensity () const |
| The maximum density of the salt and pepper noise. | |
| void | SetSaltAndPepperNoiseMinimumDensity (float saltAndPepperNoiseMinimumDensity) |
| The minimum density of the salt and pepper noise. | |
| float | GetSaltAndPepperNoiseMinimumDensity () const |
| The minimum density of the salt and pepper noise. | |
| void | SetStainDisruptionMaxAnchorPoints (uint32_t stainDisruptioMaxAnchorPoints) |
| The maximum number of anchor points to use while disrupting the ellipse. | |
| uint32_t | GetStainDisruptionMaxAnchorPoints () |
| The maximum number of anchor points to use while disrupting the ellipse. | |
| void | SetStainDisruptionMaxIntensity (float stainDisruptionMaxIntensity) |
| The maximum offset applied to the coordinates (x,y) of a pixel from the ellipse contour. | |
| float | GetStainDisruptionMaxIntensity () |
| The maximum offset applied to the coordinates (x,y) of a pixel from the ellipse contour. | |
| void | SetStainEllipseMinRadius (uint32_t stainEllipseMinRadius) |
| The minimum radius of the ellipse used to produce the stain. | |
| uint32_t | GetStainEllipseMinRadius () |
| The minimum radius of the ellipse used to produce the stain. | |
| void | SetStainEllipseMaxRadius (uint32_t stainEllipseMaxRadius) |
| The maximum radius of the ellipse used to produce the stain. | |
| uint32_t | GetStainEllipseMaxRadius () |
| The maximum radius of the ellipse used to produce the stain. | |
| void | SetMinStainColor (uint8_t minStainColor) |
| The minimum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation::SetMinStainColor and EDataAugmentation::SetMaxStainColor). | |
| uint8_t | GetMinStainColor () |
| The minimum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation::SetMinStainColor and EDataAugmentation::SetMaxStainColor). | |
| void | SetMaxStainColor (uint8_t maxStainColor) |
| The maximum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation::SetMinStainColor and EDataAugmentation::SetMaxStainColor). | |
| uint8_t | GetMaxStainColor () |
| The maximum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation::SetMinStainColor and EDataAugmentation::SetMaxStainColor). | |
| void | SetStainColorVariation (uint32_t stainColorVariation) |
| The variation of the color used to fill in the ellipse (We use an gaussian distribution of standard mean deviation stainColorVariation). | |
| uint32_t | GetStainColorVariation () |
| The variation of the color used to fill in the ellipse (We use an gaussian distribution of standard mean deviation stainColorVariation). | |
| void | SetStainInterpolationSiteFactor (float interpolationSiteFactor) |
| The factor to compute the number of interpolation sites to use from the number of anchor points. | |
| float | GetStainInterpolationSiteFactor () |
| The factor to compute the number of interpolation sites to use from the number of anchor points. | |
| void | SetStainProbability (float stainProbability) |
| Probability of applying the stain data augmentation (default value: 0, i.e. no stain). | |
| float | GetStainProbability () |
| Probability of applying the stain data augmentation (default value: 0, i.e. no stain). | |
| void | SetStainBlur (int blur) |
| Stain blur. | |
| int | GetStainBlur () const |
| Stain blur. | |
| std::unique_ptr< eVision::EBaseROI > | Generate (const eVision::EBaseROI *img, eVision::EasyDeepLearning::EDLDataAugmentationType type) const |
| Generates a new image from a generic EBaseROI image. The caller is responsible for calling freeing the memory of the returned image by calling delete on the image. | |
| std::unique_ptr< eVision::EBaseROI > | Generate (const eVision::EBaseROI *img) const |
| Generates a new image from a generic EBaseROI image. The caller is responsible for calling freeing the memory of the returned image by calling delete on the image. | |
| void | Generate (const eVision::EROIBW8 &source, eVision::EROIBW8 &dest, eVision::EasyDeepLearning::EDLDataAugmentationType type) const |
| Generates a new image. | |
| void | Generate (const eVision::EROIBW8 &source, eVision::EROIBW8 &dest) const |
| Generates a new image. | |
| void | Generate (const eVision::EROIBW16 &source, eVision::EROIBW16 &dest, eVision::EasyDeepLearning::EDLDataAugmentationType type) const |
| Generates a new image. | |
| void | Generate (const eVision::EROIBW16 &source, eVision::EROIBW16 &dest) const |
| Generates a new image. | |
| void | Generate (const eVision::EROIC24 &source, eVision::EROIC24 &dest, eVision::EasyDeepLearning::EDLDataAugmentationType type) const |
| Generates a new image. | |
| void | Generate (const eVision::EROIC24 &source, eVision::EROIC24 &dest) const |
| Generates a new image. | |
| EDataAugmentation (CppWrapperInternal::InternalConstructor) | |
Public Attributes | |
| CppWrapperInternal::WrappedClass | wrappedClass_ |
An EDataAugmentation object is responsible for storing the data augmentation parameters and generating new transformed images from existing ones. Deep learning algorithms are not invariant to the location, scale, or rotation of the elements of interest in the image. Thus, if the final application requires the deep learning algorithm to be invariant to those characteristics, the dataset must contain images covering the spectrum of those characteristics.
Data augmentation can be used to avoid capturing in the original dataset the whole spectrum of those characteristics by automatically generating new versions of the images in the dataset that are shifted, scaled or rotated to cover this spectrum.
When generating a new image, the EDataAugmentation will randomly pick transformation value within the specified limits.
When using data augmentation, one must carefully chose the spectrum of transformations such that the element of interest are still visible in the image.
License(s): EasyClassify or EasySegment or EasyLocate
| eVision::EasyDeepLearning::EDataAugmentation::EDataAugmentation | ( | ) |
Creates an EDataAugmentation object.
| eVision::EasyDeepLearning::EDataAugmentation::EDataAugmentation | ( | const eVision::EasyDeepLearning::EDataAugmentation & | other | ) |
Creates a copy of the EDataAugmentation object other.
| other | The other EDataAugmentation that we will copy into this one. |
|
virtual | ||||||||||||
| eVision::EasyDeepLearning::EDataAugmentation::EDataAugmentation | ( | CppWrapperInternal::InternalConstructor | ) |
| void eVision::EasyDeepLearning::EDataAugmentation::CopyTo | ( | eVision::EasyDeepLearning::EDataAugmentation & | other | ) | const |
Copies itself to the EDataAugmentation object other.
| other | The other EDataAugmentation that we will copy into this one. |
| std::unique_ptr< eVision::EBaseROI > eVision::EasyDeepLearning::EDataAugmentation::Generate | ( | const eVision::EBaseROI * | img | ) | const |
Generates a new image from a generic EBaseROI image. The caller is responsible for calling freeing the memory of the returned image by calling delete on the image.
| img | The image to transform. |
If the data augmentation fails, the method will throw an exception.
| std::unique_ptr< eVision::EBaseROI > eVision::EasyDeepLearning::EDataAugmentation::Generate | ( | const eVision::EBaseROI * | img, |
| eVision::EasyDeepLearning::EDLDataAugmentationType | type ) const |
Generates a new image from a generic EBaseROI image. The caller is responsible for calling freeing the memory of the returned image by calling delete on the image.
| img | The image to transform. |
| type | The type of transformation to generate. |
If the data augmentation fails, the method will throw an exception.
| void eVision::EasyDeepLearning::EDataAugmentation::Generate | ( | const eVision::EROIBW16 & | source, |
| eVision::EROIBW16 & | dest ) const |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
If the data augmentation fails, the method will throw an exception.
| void eVision::EasyDeepLearning::EDataAugmentation::Generate | ( | const eVision::EROIBW16 & | source, |
| eVision::EROIBW16 & | dest, | ||
| eVision::EasyDeepLearning::EDLDataAugmentationType | type ) const |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
| type | The type of transformation to generate. |
If the data augmentation fails, the method will throw an exception.
| void eVision::EasyDeepLearning::EDataAugmentation::Generate | ( | const eVision::EROIBW8 & | source, |
| eVision::EROIBW8 & | dest ) const |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
If the data augmentation fails, the method will throw an exception.
| void eVision::EasyDeepLearning::EDataAugmentation::Generate | ( | const eVision::EROIBW8 & | source, |
| eVision::EROIBW8 & | dest, | ||
| eVision::EasyDeepLearning::EDLDataAugmentationType | type ) const |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
| type | The type of transformation to generate. |
If the data augmentation fails, the method will throw an exception.
| void eVision::EasyDeepLearning::EDataAugmentation::Generate | ( | const eVision::EROIC24 & | source, |
| eVision::EROIC24 & | dest ) const |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
If the data augmentation fails, the method will throw an exception.
| void eVision::EasyDeepLearning::EDataAugmentation::Generate | ( | const eVision::EROIC24 & | source, |
| eVision::EROIC24 & | dest, | ||
| eVision::EasyDeepLearning::EDLDataAugmentationType | type ) const |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
| type | The type of transformation to generate. |
If the data augmentation fails, the method will throw an exception.
| bool eVision::EasyDeepLearning::EDataAugmentation::GetEnableHorizontalFlip | ( | ) | const |
Gets whether to use horizontally flipped versions of input images.
| bool eVision::EasyDeepLearning::EDataAugmentation::GetEnableVerticalFlip | ( | ) | const |
Gets whether to use vertically flipped versions of input images.
| float eVision::EasyDeepLearning::EDataAugmentation::GetGaussianNoiseMaximumStandardDeviation | ( | ) | const |
The Gaussian noise maximum standard deviation.
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EDataAugmentation::SetGaussianNoiseMinimumStandardDeviation and EDataAugmentation::SetGaussianNoiseMaximumStandardDeviation.(also called the normal distribution).
Its value must be superior or equal to EDataAugmentation::SetGaussianNoiseMinimumStandardDeviation.
This noise is computed before the salt and paper noise.
| float eVision::EasyDeepLearning::EDataAugmentation::GetGaussianNoiseMinimumStandardDeviation | ( | ) | const |
The Gaussian noise minimum standard deviation.
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EDataAugmentation::SetGaussianNoiseMinimumStandardDeviation and EDataAugmentation::SetGaussianNoiseMaximumStandardDeviation.(also called the normal distribution).
Its value must be between 0 and EDataAugmentation::SetGaussianNoiseMaximumStandardDeviation.
This noise is computed before the salt and paper noise.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMaxBrightnessOffset | ( | ) | const |
Gets the maximum absolute brightness offset.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMaxContrastGain | ( | ) | const |
Gets the maximum contrast gain.
Contrast transformation is performed by multiplying each mean-centered pixel value by a gain value taken between EDataAugmentation::SetMinContrastGain and EDataAugmentation::SetMaxContrastGain. A contrast transformation does not change the overall brightness of an image.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMaxGamma | ( | ) | const |
Gets the maximum gamma for gamma correction.
Gamma correction transformation is performed by raising each normalized pixel value to the power of gamma with gamma taken between EDataAugmentation::SetMinGamma and EDataAugmentation::SetMaxGamma.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMaxHorizontalShear | ( | ) | const |
Gets the maximum absolute horizontal shear, represented as an angle from the vertical direction.
| int32_t eVision::EasyDeepLearning::EDataAugmentation::GetMaxHorizontalShift | ( | ) | const |
Return the maximum horizontal shift allowed.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMaxHueOffset | ( | ) | const |
Gets the maximum absolute hue offset.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMaxRotationAngle | ( | ) | const |
Returns the maximum rotation angle allowed. The unit of the returned angle is in the current angle unit (see Easy::SetAngleUnit).
| float eVision::EasyDeepLearning::EDataAugmentation::GetMaxSaturationGain | ( | ) | const |
Gets the maximum saturation gain.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMaxScale | ( | ) | const |
Gets the maximum scaling allowed.
| uint8_t eVision::EasyDeepLearning::EDataAugmentation::GetMaxStainColor | ( | ) |
The maximum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation::SetMinStainColor and EDataAugmentation::SetMaxStainColor).
Its value must be bigger than EDataAugmentation::SetMinStainColor.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMaxVerticalShear | ( | ) | const |
Gets the maximum absolute vertical shear, represented as an angle from the horizontal direction.
| int32_t eVision::EasyDeepLearning::EDataAugmentation::GetMaxVerticalShift | ( | ) | const |
Return the maximum vertical shift allowed.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMinContrastGain | ( | ) | const |
Gets the minimum contrast gain.
Contrast transformation is performed by multiplying each mean-centered pixel value by a gain value taken between EDataAugmentation::SetMinContrastGain and EDataAugmentation::SetMaxContrastGain. A contrast transformation does not change the overall brightness of an image.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMinGamma | ( | ) | const |
Gets the minimum gamma for gamma correction.
Gamma correction transformation is performed by raising each normalized pixel value to the power of gamma with gamma taken between EDataAugmentation::SetMinGamma and EDataAugmentation::SetMaxGamma.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMinSaturationGain | ( | ) | const |
Gets the minimum saturation gain.
| float eVision::EasyDeepLearning::EDataAugmentation::GetMinScale | ( | ) | const |
Gets the minimum scaling allowed.
| uint8_t eVision::EasyDeepLearning::EDataAugmentation::GetMinStainColor | ( | ) |
The minimum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation::SetMinStainColor and EDataAugmentation::SetMaxStainColor).
Its value must be inferior to 255 and EDataAugmentation::SetMaxStainColor.
| float eVision::EasyDeepLearning::EDataAugmentation::GetSaltAndPepperNoiseMaximumDensity | ( | ) | const |
The maximum density of the salt and pepper noise.
The salt and pepper noise sets the value of a number of randomly selected (between EDataAugmentation::SetSaltAndPepperNoiseMinimumDensity and EDataAugmentation::SetSaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be between EDataAugmentation::SetSaltAndPepperNoiseMinimumDensity and 1.
This noise is computed after all the other noises.
| float eVision::EasyDeepLearning::EDataAugmentation::GetSaltAndPepperNoiseMinimumDensity | ( | ) | const |
The minimum density of the salt and pepper noise.
The salt and pepper noise sets the value of a number of randomly selected (between EDataAugmentation::SetSaltAndPepperNoiseMinimumDensity and EDataAugmentation::SetSaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be between 0 and EDataAugmentation::SetSaltAndPepperNoiseMinimumDensity.
This noise is computed after all the other noises.
| float eVision::EasyDeepLearning::EDataAugmentation::GetSpeckleNoiseMaximumStandardDeviation | ( | ) | const |
The speckle noise maximum standard deviation.
The speckle noise is a multiplicative noise sampled from a Gamma distribution of deviation between EDataAugmentation::SetSpeckleNoiseMinimumStandardDeviation and EDataAugmentation::SetSpeckleNoiseMaximumStandardDeviation.
Its value must be strictly higher than EDataAugmentation::SetSpeckleNoiseMinimumStandardDeviation.
This noise is computed before the salt and paper noise.
| float eVision::EasyDeepLearning::EDataAugmentation::GetSpeckleNoiseMinimumStandardDeviation | ( | ) | const |
The speckle noise minimum standard deviation.
The speckle noise is a multiplicative noise sampled from a Gamma distribution of deviation between EDataAugmentation::SetSpeckleNoiseMinimumStandardDeviation and EDataAugmentation::SetSpeckleNoiseMaximumStandardDeviation.
Its value must be strictly positive and lower than EDataAugmentation::SetSpeckleNoiseMaximumStandardDeviation.
This noise is computed before the salt and paper noise.
| int eVision::EasyDeepLearning::EDataAugmentation::GetStainBlur | ( | ) | const |
Stain blur.
The stain blur is the half kernel size of a Gaussian filter that is applied on the stain to smooth its edges and therefore the transition between the original image and the stain.
| uint32_t eVision::EasyDeepLearning::EDataAugmentation::GetStainColorVariation | ( | ) |
The variation of the color used to fill in the ellipse (We use an gaussian distribution of standard mean deviation stainColorVariation).
| uint32_t eVision::EasyDeepLearning::EDataAugmentation::GetStainDisruptionMaxAnchorPoints | ( | ) |
The maximum number of anchor points to use while disrupting the ellipse.
| float eVision::EasyDeepLearning::EDataAugmentation::GetStainDisruptionMaxIntensity | ( | ) |
The maximum offset applied to the coordinates (x,y) of a pixel from the ellipse contour.
| uint32_t eVision::EasyDeepLearning::EDataAugmentation::GetStainEllipseMaxRadius | ( | ) |
The maximum radius of the ellipse used to produce the stain.
Its value must be superior to EDataAugmentation::SetStainEllipseMinRadius.
| uint32_t eVision::EasyDeepLearning::EDataAugmentation::GetStainEllipseMinRadius | ( | ) |
The minimum radius of the ellipse used to produce the stain.
Its value must be inferior to EDataAugmentation::SetStainEllipseMaxRadius.
| float eVision::EasyDeepLearning::EDataAugmentation::GetStainInterpolationSiteFactor | ( | ) |
The factor to compute the number of interpolation sites to use from the number of anchor points.
| float eVision::EasyDeepLearning::EDataAugmentation::GetStainProbability | ( | ) |
Probability of applying the stain data augmentation (default value: 0, i.e. no stain).
| bool eVision::EasyDeepLearning::EDataAugmentation::HasDataAugmentations | ( | ) | const |
Whether the EDataAugmentation object contains augmentations.
| void eVision::EasyDeepLearning::EDataAugmentation::Load | ( | const std::string & | path | ) |
Loads an EDataAugmentation object. The given ESerializer must have been created for reading.
| path | The file path. |
| void eVision::EasyDeepLearning::EDataAugmentation::Load | ( | eVision::ESerializer * | serializer | ) |
Loads an EDataAugmentation object. The given ESerializer must have been created for reading.
| serializer | The serializer. |
| eVision::EasyDeepLearning::EDataAugmentation & eVision::EasyDeepLearning::EDataAugmentation::operator= | ( | const eVision::EasyDeepLearning::EDataAugmentation & | other | ) |
Copies the EDataAugmentation object other to this object.
| other | The other EDataAugmentation that we will copy into this one. |
| bool eVision::EasyDeepLearning::EDataAugmentation::operator== | ( | const eVision::EasyDeepLearning::EDataAugmentation & | other | ) | const |
Equality operator.
| other | Other object to compare to |
| void eVision::EasyDeepLearning::EDataAugmentation::Save | ( | const std::string & | path | ) |
Saves an EDataAugmentation object. The given ESerializer must have been created for writing.
| path | The file path. |
| void eVision::EasyDeepLearning::EDataAugmentation::Save | ( | eVision::ESerializer * | serializer | ) |
Saves an EDataAugmentation object. The given ESerializer must have been created for writing.
| serializer | The ESerializer object that is written to. |
| void eVision::EasyDeepLearning::EDataAugmentation::SetEnableHorizontalFlip | ( | bool | enable | ) |
Sets whether to use horizontally flipped versions of input images.
| enable | Whether to enable horizontal flips. |
| void eVision::EasyDeepLearning::EDataAugmentation::SetEnableVerticalFlip | ( | bool | enable | ) |
Sets whether to use vertically flipped versions of input images.
| enable | Whether to enable vertical flips. |
| void eVision::EasyDeepLearning::EDataAugmentation::SetGaussianNoiseMaximumStandardDeviation | ( | float | gaussianMaximumDeviation | ) |
The Gaussian noise maximum standard deviation.
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EDataAugmentation::SetGaussianNoiseMinimumStandardDeviation and EDataAugmentation::SetGaussianNoiseMaximumStandardDeviation.(also called the normal distribution).
Its value must be superior or equal to EDataAugmentation::SetGaussianNoiseMinimumStandardDeviation.
| gaussianMaximumDeviation | The maximum standard deviation of the gaussian distribution expressed in percentage of the image type max intensity |
This noise is computed before the salt and paper noise.
| void eVision::EasyDeepLearning::EDataAugmentation::SetGaussianNoiseMinimumStandardDeviation | ( | float | gaussianMinimumDeviation | ) |
The Gaussian noise minimum standard deviation.
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EDataAugmentation::SetGaussianNoiseMinimumStandardDeviation and EDataAugmentation::SetGaussianNoiseMaximumStandardDeviation.(also called the normal distribution).
Its value must be between 0 and EDataAugmentation::SetGaussianNoiseMaximumStandardDeviation.
| gaussianMinimumDeviation | The minimum standard deviation of the gaussian distribution expressed in percentage of the image type max intensity |
This noise is computed before the salt and paper noise.
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxBrightnessOffset | ( | float | offset | ) |
Sets the maximum absolute brightness offset. It must be between 0 and 1.
| offset | The maximum absolute offset to the brightness |
Brightness transformation is performed by adding a value taken between -EDataAugmentation::SetMaxBrightnessOffset and +EDataAugmentation::SetMaxBrightnessOffset to each pixel of the normalized image.
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxContrastGain | ( | float | val | ) |
Sets the maximum contrast gain. Its value must be strictly positive and over EDataAugmentation::SetMinContrastGain.
| val | The maximum contrast gain |
Contrast transformation is performed by multiplying each mean-centered pixel value by a gain value taken between EDataAugmentation::SetMinContrastGain and EDataAugmentation::SetMaxContrastGain. A contrast transformation does not change the overall brightness of an image.
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxGamma | ( | float | gamma | ) |
Sets the maximum gamma for gamma correction. Its value must be higher than EDataAugmentation::SetMinGamma.
| gamma | The maximum gamma |
Gamma correction transformation is performed by raising each normalized pixel value to the power of gamma with gamma taken between EDataAugmentation::SetMinGamma and EDataAugmentation::SetMaxGamma.
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxHorizontalShear | ( | float | hShear | ) |
Sets the maximum absolute horizontal shear, represented as an angle from the vertical direction. Its value must be between 0 and 90 degrees.
| hShear | The maximum horizontal shear allowed |
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxHorizontalShift | ( | int32_t | maxShift | ) |
Sets the maximum horizontal shift allowed.
| maxShift | Maximum horizontal shift |
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxHueOffset | ( | float | hueOffset | ) |
Sets the maximum absolute hue offset. Its value must be between 0 and 180 degrees.
| hueOffset | The maximum hue offset |
The hue is represented as an angle between 0 and 360 degrees. The hue transformation is performed by rotating the hue of each pixel by a value between -EDataAugmentation::SetMaxHueOffset and +EDataAugmentation::SetMaxHueOffset. This transformation only works for color images.
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxRotationAngle | ( | float | maxAngle | ) |
Set the maximum rotation angle allowed. Its value must be between 0 and 180 degrees.
The unit of this angle is in the current angle unit (see Easy::SetAngleUnit).
| maxAngle | The maximum angle allowed. |
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxSaturationGain | ( | float | saturationGain | ) |
Sets the maximum saturation gain. Its value must be over or equal to EDataAugmentation::SetMinSaturationGain.
| saturationGain | The maximum saturation gain |
The saturation transformation is performed by multiplying the saturation of each pixel by a value between EDataAugmentation::SetMinSaturationGain and EDataAugmentation::SetMaxSaturationGain.
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxScale | ( | float | maxScale | ) |
Sets the maximum scaling allowed. Its value must be strictly positive and over EDataAugmentation::SetMinScale.
| maxScale | The maximum scaling allowed |
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxStainColor | ( | uint8_t | maxStainColor | ) |
The maximum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation::SetMinStainColor and EDataAugmentation::SetMaxStainColor).
Its value must be bigger than EDataAugmentation::SetMinStainColor.
| maxStainColor | The color |
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxVerticalShear | ( | float | vShear | ) |
Sets the maximum absolute vertical shear, represented as an angle from the horizontal direction. Its value must be between 0 and 90 degrees.
| vShear | The maximum vertical shear allowed |
| void eVision::EasyDeepLearning::EDataAugmentation::SetMaxVerticalShift | ( | int32_t | maxShift | ) |
Sets the maximum vertical shift allowed.
| void eVision::EasyDeepLearning::EDataAugmentation::SetMinContrastGain | ( | float | val | ) |
Sets the minimum contrast gain. Its value must be strictly positive and below EDataAugmentation::SetMaxContrastGain.
| val | The minimum contrast gain |
Contrast transformation is performed by multiplying each mean-centered pixel value by a gain value taken between EDataAugmentation::SetMinContrastGain and EDataAugmentation::SetMaxContrastGain. A contrast transformation does not change the overall brightness of an image.
| void eVision::EasyDeepLearning::EDataAugmentation::SetMinGamma | ( | float | gamma | ) |
Sets the minimum gamma for gamma correction. Its value must be strictly positive and below EDataAugmentation::SetMaxGamma.
| gamma | The minimum gamma |
Gamma correction transformation is performed by raising each normalized pixel value to the power of gamma with gamma taken between EDataAugmentation::SetMinGamma and EDataAugmentation::SetMaxGamma.
| void eVision::EasyDeepLearning::EDataAugmentation::SetMinSaturationGain | ( | float | saturationGain | ) |
Sets the minimum saturation gain. Its value must be strictly positive.
| saturationGain | The minimum saturation gain |
The saturation transformation is performed by multiplying the saturation of each pixel by a value between EDataAugmentation::SetMinSaturationGain and EDataAugmentation::SetMaxSaturationGain.
| void eVision::EasyDeepLearning::EDataAugmentation::SetMinScale | ( | float | minScale | ) |
Sets the minimum scaling allowed. Its value must be strictly positive and below EDataAugmentation::SetMaxScale.
| minScale | The minimum scaling allowed |
| void eVision::EasyDeepLearning::EDataAugmentation::SetMinStainColor | ( | uint8_t | minStainColor | ) |
The minimum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation::SetMinStainColor and EDataAugmentation::SetMaxStainColor).
Its value must be inferior to 255 and EDataAugmentation::SetMaxStainColor.
| minStainColor | The color |
| void eVision::EasyDeepLearning::EDataAugmentation::SetSaltAndPepperNoiseMaximumDensity | ( | float | saltAndPepperNoiseMaximumDensity | ) |
The maximum density of the salt and pepper noise.
The salt and pepper noise sets the value of a number of randomly selected (between EDataAugmentation::SetSaltAndPepperNoiseMinimumDensity and EDataAugmentation::SetSaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be between EDataAugmentation::SetSaltAndPepperNoiseMinimumDensity and 1.
| saltAndPepperNoiseMaximumDensity | The maximum density of the salt and pepper noise expressed in percentage of the total number of pixels of the image |
This noise is computed after all the other noises.
| void eVision::EasyDeepLearning::EDataAugmentation::SetSaltAndPepperNoiseMinimumDensity | ( | float | saltAndPepperNoiseMinimumDensity | ) |
The minimum density of the salt and pepper noise.
The salt and pepper noise sets the value of a number of randomly selected (between EDataAugmentation::SetSaltAndPepperNoiseMinimumDensity and EDataAugmentation::SetSaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be between 0 and EDataAugmentation::SetSaltAndPepperNoiseMinimumDensity.
| saltAndPepperNoiseMinimumDensity | The minimum density of the salt and pepper noise expressed in percentage of the total number of pixels of the image |
This noise is computed after all the other noises.
| void eVision::EasyDeepLearning::EDataAugmentation::SetSpeckleNoiseMaximumStandardDeviation | ( | float | speckleNoiseMaximumStandardDeviation | ) |
The speckle noise maximum standard deviation.
The speckle noise is a multiplicative noise sampled from a Gamma distribution of deviation between EDataAugmentation::SetSpeckleNoiseMinimumStandardDeviation and EDataAugmentation::SetSpeckleNoiseMaximumStandardDeviation.
Its value must be strictly higher than EDataAugmentation::SetSpeckleNoiseMinimumStandardDeviation.
| speckleNoiseMaximumStandardDeviation | The standard maximum deviation of the gamma distribution |
This noise is computed before the salt and paper noise.
| void eVision::EasyDeepLearning::EDataAugmentation::SetSpeckleNoiseMinimumStandardDeviation | ( | float | speckleNoiseMinimumStandardDeviation | ) |
The speckle noise minimum standard deviation.
The speckle noise is a multiplicative noise sampled from a Gamma distribution of deviation between EDataAugmentation::SetSpeckleNoiseMinimumStandardDeviation and EDataAugmentation::SetSpeckleNoiseMaximumStandardDeviation.
Its value must be strictly positive and lower than EDataAugmentation::SetSpeckleNoiseMaximumStandardDeviation.
| speckleNoiseMinimumStandardDeviation | The standard minimum deviation of the gamma distribution |
This noise is computed before the salt and paper noise.
| void eVision::EasyDeepLearning::EDataAugmentation::SetStainBlur | ( | int | blur | ) |
Stain blur.
The stain blur is the half kernel size of a Gaussian filter that is applied on the stain to smooth its edges and therefore the transition between the original image and the stain.
| blur | Blur to apply to the stain |
| void eVision::EasyDeepLearning::EDataAugmentation::SetStainColorVariation | ( | uint32_t | stainColorVariation | ) |
The variation of the color used to fill in the ellipse (We use an gaussian distribution of standard mean deviation stainColorVariation).
| stainColorVariation | The variation of the color |
| void eVision::EasyDeepLearning::EDataAugmentation::SetStainDisruptionMaxAnchorPoints | ( | uint32_t | stainDisruptioMaxAnchorPoints | ) |
The maximum number of anchor points to use while disrupting the ellipse.
| void eVision::EasyDeepLearning::EDataAugmentation::SetStainDisruptionMaxIntensity | ( | float | stainDisruptionMaxIntensity | ) |
The maximum offset applied to the coordinates (x,y) of a pixel from the ellipse contour.
| stainDisruptionMaxIntensity | The maximum offset |
| void eVision::EasyDeepLearning::EDataAugmentation::SetStainEllipseMaxRadius | ( | uint32_t | stainEllipseMaxRadius | ) |
The maximum radius of the ellipse used to produce the stain.
Its value must be superior to EDataAugmentation::SetStainEllipseMinRadius.
| stainEllipseMaxRadius | The maximum radius |
| void eVision::EasyDeepLearning::EDataAugmentation::SetStainEllipseMinRadius | ( | uint32_t | stainEllipseMinRadius | ) |
The minimum radius of the ellipse used to produce the stain.
Its value must be inferior to EDataAugmentation::SetStainEllipseMaxRadius.
| stainEllipseMinRadius | The minimum radius |
| void eVision::EasyDeepLearning::EDataAugmentation::SetStainInterpolationSiteFactor | ( | float | interpolationSiteFactor | ) |
The factor to compute the number of interpolation sites to use from the number of anchor points.
| interpolationSiteFactor | Interpolation site factor. |
| void eVision::EasyDeepLearning::EDataAugmentation::SetStainProbability | ( | float | stainProbability | ) |
Probability of applying the stain data augmentation (default value: 0, i.e. no stain).
| stainProbability | Probability of applying stain data augmentation (between 0 and 1). |
| CppWrapperInternal::WrappedClass eVision::EasyDeepLearning::EDataAugmentation::wrappedClass_ |