Daugment is a C++ suport library for augmenting data from image samples. It takes images from a folder and can apply a variety of augmenting methods on them.
The library can apply argmentation by random or in sequence.
For random transformations, as seen in example folder, you can get results like shown below.
All methods have encapsulation to set values for required transformations. So you can apply specific transformations too, like examples below.
-
adBilateralFilter bil = new adBilateralFilter(); bil->setSigmaClr(float sigmaClr); bil->setSigmaDst(float sigmaDst); bil->setNumKernels(int kernels); bil->setMaxKernels(int maxKernels); bil->setMinSigClr(float minSigClr); bil->setMaxSigClr(float maxSigClr); bil->setMinSigDst(float minSigDst); bil->setMaxSigDst(float maxSigDst); bil->apply(Mat cpImg);
or
adBilateralFilter bil = new adBilateralFilter(int kernels, float sigmaDst, float sigmaClr, int maxKernels = 80, float minSigClr = 10, float maxSigClr = 120, float minSigDst = 5, float maxSigDst = 100); bil->apply(Mat cpImg);
-
adRotate rot = new Rotate(); rot->setAngle(int angle); rot->setMaxAngle(int maxAngle); rot->apply(Mat cpImg);
or
adRotate rot = new Rotate(int angle, int maxAngRot = 25); rot->apply(Mat cpImg);
-
adContBright cb = new adContBright(); cb->setBrightness(int brightness); cb->setContrast(float contrast); cb->setMaxBrightness(int maxBrightness); cb->setMinBrightness(int minBrightness); cb->setMaxContrast(float maxContrast); cb->setMinContrast(float minContrast); cb->setMinSigDst(float minSigDst); cb->setMaxSigDst(float maxSigDst); cb->apply(Mat cpImg);
or
adContBright cb = new adContBright(int brightness, double contrast, int minBrightness = 50, int maxBrightness = 150, float maxContrast = 150, float minContrast = 50); cb->apply(Mat cpImg);
Daugment only requires openCV for C++.
- Opencv - sudo apt-get install libopencv-dev