A simple and flexible npm library that helps to creates augmentation images for Deep Learning Applications.
Implement with opencv4nodejs.
npm i augment-nodejs --save
npm i opencv4nodejs --save
const cv = require("opencv4nodejs");
var aug = require("augment-nodejs")(cv);
const cv = require("opencv4nodejs");
const aug = require("augment-nodejs")(cv);
const image = cv.imread("lenna.jpg");
const augimg = aug.flip(image);
cv.imshowWait("", augimg);
Return, blured image
aug.blur(img, kernalSize, stddev);
kernalSize - odd number
stddev - number
Return, darked or brighted image
aug.intensity(img, alpha, beta);
alpha - number
beta - number
Return, fliped image
aug.flip(img);
Return, grayed image
aug.gray(img);
Return, rotated image
aug.rotate(img, angle);
angle - number
Return, zoomed image
const roi = { x0: 0.3, y0: 0.3, x1: 0.8 , y1: 0.8}
aug.zoom(img, roi);
Return, croped image
const roi = { x0: 0.3, y0: 0.3, x1: 0.8 , y1: 0.8}
aug.crop(img, roi);
Return, padded image
aug.padding(img, padHeight, padWidth, centerContent);
centerContent - boolean
padHeight - number
padWidth - number
You can contribute to this project.
You just need to create a pull request which will be revised, merged to main branch (if the code doesn't break the project) and published as a new release.