- Notifications
You must be signed in to change notification settings - Fork5
ivfisunov/node-zbardecoder
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This barcode reader is a Node.js C++ addon wrapper over the open source ZBar and OpenCV libraries.
It works with a static image files, supports multiple barcodes in the image and detects barcode types.
ZBar code reader andOpenCV have to be installed on your machine.
Beforenpm install
you need to install packages.
For linux users:
apt-get install libzbar0 libzbar-dev apt-get install python3-opencv libopencv-devor yum install zbar zbar-devel yum install opencv opencv-devel
After this install Barcode Reader
npm i node-zbardecoder
constbardecoder=require('node-zbardecoder');constresult=JSON.parse(bardecoder.decode('image.jpg'));console.log(result);/*{ results: [ { type: 'CODE-128', data: 'ARD000083' }, { type: 'CODE-128', data: 'ARD000066' } ]}*/
For better results use images no larger then 1500px on the long side and images with sharp and large barcodes.
See thetest
folder for example.
About
Simple and very fast javascript bar/qr code reader for images, supports Code128, Code93, Code39, Code-2of5, Codabar and EAN-13 types.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.