Skip to content

Releases: serratus/quaggaJS

v0.12.1

07 Jun 19:00
Compare
Choose a tag to compare

This is just a patch release for those who are interested in testing it with the new Safari Technology Preview. So far it works on iOS (11 Beta) and macOS, with some limitations: The video is upside-down on iOS devices. Haven't figured out why. Have fun testing!

safari-11-quagga

v0.12.0

06 Jun 18:29
Compare
Choose a tag to compare

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.

capabilities-enabled

v0.11.0

24 Apr 20:11
Compare
Choose a tag to compare

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

ean-extended-0 11 0

v0.10.0

31 Mar 19:56
Compare
Choose a tag to compare

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

  • minAspectRatio and maxAspectRatio now become only aspectRatio
  • facing is now defined as facingMode

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

15 Feb 21:27
Compare
Choose a tag to compare

Changelog

Features added

  • Added multiple configuration parameter to decode multiple barcodes at once (see #90 kudos to @dgreif)
  • Added target option to the inputStream configuration 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

22 Nov 19:18
Compare
Choose a tag to compare

Changelog

  • Fixed inconsistencies for Code 128 decoding (See #76)

v0.8.0

14 Oct 23:50
Compare
Choose a tag to compare

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 build builds the web and node version
  • npm run test runs the unit-tests
  • npm run integrationtest runs the integration-tests
  • npm run watch for development mode

v0.7.0

15 Sep 18:07
Compare
Choose a tag to compare

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

29 Aug 20:31
Compare
Choose a tag to compare

IE Support

Includes the needed polyfill for Math.imul as proposed by MDN. Additionally, a small code change also makes web-workers useable for QuaggaJS. When using the new Edge browser, you can now leverage it's getUserMedia implementation.

v0.6.14

29 Jul 20:32
Compare
Choose a tag to compare

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 normalizeBarSpaceWidth configuration of the reader)