A simple web console application to demostrate the magic-erase package. Clear blurry background in close-focused images, by selecting click-points on the image. Works like the magic-wand tool in Photoshopp.
npm i magic-erase-console --save-dev
In package.json:
{
"scripts": {
"console": "magic-erase-console"
}
}
Then run:
npm run console
This web console comes with a few sample images out of the box. If you need to add your own, for now, you can use the following steps:
- Put your image file (jpg) in the directory
<project-root>/node_modules/magic-erase-console/img
- Add your image information in the configuration file
<project-root>/node_modules/magic-erase-console/dist/data/options.json
with the following attributes:id
is a unique string and must be different from the others in the configuration file.name
is the displayed name of your image.src
is the file name of your image, e.g.myImage.jpg
. DO NOT include the path of the image.sensitivity
is the default sensitivity of your image. It MUST be set between 0.1 to 100.
- Bigger images will take longer time.