Skip to content

Basic image augmentation Node.js library for machine learning in JavaScript

License

Notifications You must be signed in to change notification settings

LMJayasundara/augment-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic image augmentation Node.js library for machine learning in Javascript


A simple and flexible npm library that helps to creates augmentation images for Deep Learning Applications.
Implement with opencv4nodejs.

Installation

npm i augment-nodejs --save
npm i opencv4nodejs --save

Import

const cv = require("opencv4nodejs");
var aug = require("augment-nodejs")(cv);

Example

const cv = require("opencv4nodejs");
const aug = require("augment-nodejs")(cv);

const image = cv.imread("lenna.jpg");

const augimg = aug.flip(image);

cv.imshowWait("", augimg);

API


blur

Return, blured image

aug.blur(img, kernalSize, stddev);

kernalSize - odd number
stddev - number


intensity

Return, darked or brighted image

aug.intensity(img, alpha, beta);

alpha - number
beta - number


flip

Return, fliped image

aug.flip(img);


gray

Return, grayed image

aug.gray(img);


rotate

Return, rotated image

aug.rotate(img, angle);

angle - number


zoom

Return, zoomed image

const roi = { x0: 0.3, y0: 0.3, x1: 0.8 , y1: 0.8}

aug.zoom(img, roi);


crop

Return, croped image

const roi = { x0: 0.3, y0: 0.3, x1: 0.8 , y1: 0.8}

aug.crop(img, roi);


padding

Return, padded image

aug.padding(img, padHeight, padWidth, centerContent);

centerContent - boolean
padHeight - number
padWidth - number


Contributing

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.

About

Basic image augmentation Node.js library for machine learning in JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published