crescent
v0.0.9
Published
JavaScript images Binarization/Comparsion
Downloads
356
Readme
crescentjs
JavaScript Image Comparsion
Installation
npm install crescent
Comparsion
| pic1 | pic2 | |:----:|:----:| | | |
import {Picture} from 'crescent';
let pic1 = new Picture('date:image/png;base64,/iV....');
let pic2 = new Picture('date:image/png;base64,/iV....');
Promise.all([pic1.initialized, pic2.initialized]).then(() => {
return pic1.compareTo(pic2);
}).then(results => {
console.log(results[0].score); // 0.6517857142857143
});
Binarization
| original | binarized | |:--------:|:---------:| | | |
let pic = new Picture('date:image/png;base64,/iV....');
pic.initialized.then(() => {
pic.binarize();
pic.debug().open(); // window.open('data:image/png;base64,....')
});
Visual Diff
// TODO
Development
npm install && npm start
npm run ci
npm run release