Releases: serratus/quaggaJS
v0.12.1
v0.12.0
New Features
Support for Code 93 and Standard 2of5 barcodes
Huge thanks go to @madmanpierre and his company Maintenance Connection Canada (Asset Pro Solutions Inc. for sponsoring this implementation.
From now on, you can use code_93_reader and 2of5_reader in your decoder. Check out the examples using static images. In case you have any of these types of barcodes in your reach, you can also play around with the web-cam demo.
Exposing MediaStreamTrack
Today marks the release of Chrome 59 shipping with a lot of improvements to MediaStreamTrack. Thanks to
@ltlBeBoy for opening #159 and writing about MediaStream Image Capture.
You can now access the track via Quagga.CameraAccess.getActiveTrack() and apply settings yourself, like described in my blog-post Let's light a torch and explore MediaStreamTrack's capabilities
Check out the updated examples on web-cam demo and turn on/off your torch, or use the zoom.
v0.11.0
New Features
Finally, support for EAN-2 and EAN-5 supplement codes has arrived in Quagga. You can easily give it a try with the following configuration-options:
decoder: {
readers: [{
format: "ean_reader",
config: {
supplements: [
'ean_5_reader', 'ean_2_reader'
]
}
}]
}Read more about this feature in Enabling extended EAN
EAN-5 and EAN-2 supplements in action
v0.10.0
New Features
MediaDevices
Nothing too exciting, but this release added the dependency to adapter.js in order to keep up with the ever changing WebRTC and MediaDevices API. With this in place, some constraints have changed, and some have been added:
constraints: {
aspectRatio: 640/480, // optional, former minAspectRatio and maxAspectRatio
facingMode: "environment", // optional, former only facing
deviceId: "38745983457387598375983759834" // new, let's you specify the camera
},Frequency
Thanks to #95, @JauernigIT added a configuration for specifying the frequency of scanning the images. In cases where quagga should not eat 100% CPU, this can be used to control the scans per second like this:
const config = {
// ....
frequency: 5 // allow a maximum of 5 scans per second
}Other Updates
In this release, I also took the time to upgrade some of the dependencies to their latest version
- upgraded to babel 6
- using webpack 2
These changes now
Migration
Due to the changes present in the constraint config, and the update to webpack 2, some things are important to keep in mind:
Configuration
minAspectRatioandmaxAspectRationow become onlyaspectRatiofacingis now defined asfacingMode
Importing the Library
Due to the migration to webpack 2, the UMD build is now ES6 compliant and must be therefore used as such:
var Quagga = require('quagga');now becomes
var Quagga = require('quagga').default;
// or better, use ES6 imports:
import Quagga from 'quagga';Fixes
Unfortunately, due to some code-refactoring, changes in the configuration did not reflect them during runtime, when using web-workers. This is now fixed in a way that web-workers are always terminated instead of reused. This is necessary, because the initialization happens whenever the worker is created.
v0.9.0
Changelog
Features added
- Added
multipleconfiguration parameter to decode multiple barcodes at once (see #90 kudos to @dgreif) - Added
targetoption to theinputStreamconfiguration which specifies the entry-point for the video-element. This can either be a CSS selector, or a DOM node. (fixes #52, see #89 for details, many thanks to @davincho)
v0.8.2
v0.8.0
From RequireJS to webpack
Although this release does not contain any API changes, I'm proud to announce the move away from RequireJS to webpack. During the transition, I also integrated babel as a dependency for all the ES6 goodies which I will make use of for the upcoming features and refactorings.
Changes
All the changes only affect the build and testing of the library.
npm run buildbuilds the web and node versionnpm run testruns the unit-testsnpm run integrationtestruns the integration-testsnpm run watchfor development mode
v0.7.0
Node Support
Basic node support has landed in QuaggaJS, finally allowing to decode images on the server-side as well. Due to the lack of the DOM and navigator, <video/> and getUserMedia are not supported for now. Maybe, in the distant future, this will be abstracted for the use with plugins, if needed. For now, this means only decodeSingle is available to the node environment.
How do I use it in node?
The following example illustrates the basic use within node:
var Quagga = require('quagga');
Quagga.decodeSingle({
src: "image-abc-123.jpg",
numOfWorkers: 0, // Needs to be 0 when used within node
inputStream: {
size: 800 // restrict input-size to be 800px in width (long-side)
},
decoder: {
readers: ["code_128_reader"] // List of active readers
},
}, function(result) {
if(result.codeResult) {
console.log("result", result.codeResult.code);
} else {
console.log("not detected");
}
});Under the hood
The combination of ndarray and get-pixels provides a simple and intuitive way to replace the <image/>, <canvas/> and CanvasContext pipeline for reading/pre-processing images within node.
Dependencies
In addition to the two packages mentioned above, the new release also switches from the statically included libraries such as requirejs and glMatrix to npm dependencies.
v0.6.16
v0.6.14
This release adds a basic support for ITF (Interleaved 2 of 5) barcodes.The new reader can be activated by using i2of5_reader in the usual way:
decoder: {
readers : ["i2of5_reader"]
}Known Issues
- High density barcodes are not easily detected (more of an issue of the barcode-locator)
- Variations of widths between spaces and bars are poorly handled (experimenting with
normalizeBarSpaceWidthconfiguration of the reader)
