Updated to 0.11.0
@@ -29,6 +29,7 @@ showInMenu: false
|
||||
<option value="code_39">Code 39</option>
|
||||
<option value="code_39_vin">Code 39 VIN</option>
|
||||
<option value="ean">EAN</option>
|
||||
<option value="ean_extended">EAN-extended</option>
|
||||
<option value="ean_8">EAN-8</option>
|
||||
<option value="upc">UPC</option>
|
||||
<option value="upc_e">UPC-E</option>
|
||||
|
||||
@@ -88,7 +88,20 @@ $(function() {
|
||||
},
|
||||
decoder: {
|
||||
readers: function(value) {
|
||||
return [value + "_reader"];
|
||||
if (value === 'ean_extended') {
|
||||
return [{
|
||||
format: "ean_reader",
|
||||
config: {
|
||||
supplements: [
|
||||
'ean_5_reader', 'ean_2_reader'
|
||||
]
|
||||
}
|
||||
}];
|
||||
}
|
||||
return [{
|
||||
format: value + "_reader",
|
||||
config: {}
|
||||
}];
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -102,7 +115,10 @@ $(function() {
|
||||
},
|
||||
numOfWorkers: 1,
|
||||
decoder: {
|
||||
readers: ["code_128_reader"]
|
||||
readers: [{
|
||||
format: "code_128_reader",
|
||||
config: {}
|
||||
}]
|
||||
},
|
||||
locate: true,
|
||||
src: null
|
||||
|
||||
@@ -23,6 +23,7 @@ showInMenu: false
|
||||
<option value="code_39">Code 39</option>
|
||||
<option value="code_39_vin">Code 39 VIN</option>
|
||||
<option value="ean">EAN</option>
|
||||
<option value="ean_extended">EAN-extended</option>
|
||||
<option value="ean_8">EAN-8</option>
|
||||
<option value="upc">UPC</option>
|
||||
<option value="upc_e">UPC-E</option>
|
||||
|
||||
@@ -79,7 +79,20 @@ $(function() {
|
||||
},
|
||||
decoder: {
|
||||
readers: function(value) {
|
||||
return [value + "_reader"];
|
||||
if (value === 'ean_extended') {
|
||||
return [{
|
||||
format: "ean_reader",
|
||||
config: {
|
||||
supplements: [
|
||||
'ean_5_reader', 'ean_2_reader'
|
||||
]
|
||||
}
|
||||
}];
|
||||
}
|
||||
return [{
|
||||
format: value + "_reader",
|
||||
config: {}
|
||||
}];
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -98,7 +111,10 @@ $(function() {
|
||||
},
|
||||
numOfWorkers: 4,
|
||||
decoder: {
|
||||
readers : ["code_128_reader"]
|
||||
readers : [{
|
||||
format: "code_128_reader",
|
||||
config: {}
|
||||
}]
|
||||
},
|
||||
locate: true
|
||||
},
|
||||
|
||||
@@ -23,6 +23,7 @@ showInMenu: false
|
||||
<option value="code_128" selected="selected">Code 128</option>
|
||||
<option value="code_39">Code 39</option>
|
||||
<option value="ean">EAN</option>
|
||||
<option value="ean_extended">EAN-extended</option>
|
||||
<option value="ean_8">EAN-8</option>
|
||||
<option value="upc">UPC</option>
|
||||
<option value="upc_e">UPC-E</option>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
$(function() {
|
||||
var App = {
|
||||
init: function() {
|
||||
var config = this.config[this.state.decoder.readers[0]] || this.config.default;
|
||||
var config = this.config[this.state.decoder.readers[0].format] || this.config.default;
|
||||
config = $.extend(true, {}, config, this.state);
|
||||
Quagga.init(config, function() {
|
||||
App.attachListeners();
|
||||
@@ -94,7 +94,20 @@ $(function() {
|
||||
inputMapper: {
|
||||
decoder: {
|
||||
readers: function(value) {
|
||||
return [value + "_reader"];
|
||||
if (value === 'ean_extended') {
|
||||
return [{
|
||||
format: "ean_reader",
|
||||
config: {
|
||||
supplements: [
|
||||
'ean_5_reader', 'ean_2_reader'
|
||||
]
|
||||
}
|
||||
}];
|
||||
}
|
||||
return [{
|
||||
format: value + "_reader",
|
||||
config: {}
|
||||
}];
|
||||
}
|
||||
},
|
||||
inputStream: {
|
||||
@@ -108,7 +121,10 @@ $(function() {
|
||||
src: "../test/fixtures/code_128/"
|
||||
},
|
||||
decoder : {
|
||||
readers : ["code_128_reader"]
|
||||
readers : [{
|
||||
format: "code_128_reader",
|
||||
config: {}
|
||||
}]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ showInMenu: true
|
||||
quaggaJS
|
||||
========
|
||||
|
||||
- [Changelog](#changelog) (2016-04-19)
|
||||
- [Changelog](#changelog) (2016-04-24)
|
||||
- [Browser Support](#browser-support)
|
||||
- [Installing](#installing)
|
||||
- [Getting Started](#gettingstarted)
|
||||
@@ -436,6 +436,35 @@ individual box.
|
||||
The remaining properties `drawBoundingBox`, `showFrequency`, `drawScanline` and
|
||||
`showPattern` are mostly of interest during debugging and visualization.
|
||||
|
||||
#### <a name="ean_extended">Enabling extended EAN</a>
|
||||
|
||||
The default setting for `ean_reader` is not capable of reading extensions such
|
||||
as [EAN-2](https://en.wikipedia.org/wiki/EAN_2) or
|
||||
[EAN-5](https://en.wikipedia.org/wiki/EAN_5). In order to activate those
|
||||
supplements you have to provide them in the configuration as followed:
|
||||
|
||||
```javascript
|
||||
decoder: {
|
||||
readers: [{
|
||||
format: "ean_reader",
|
||||
config: {
|
||||
supplements: [
|
||||
'ean_5_reader', 'ean_2_reader'
|
||||
]
|
||||
}
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
Beware that the order of the `supplements` matters in such that the reader stops
|
||||
decoding when the first supplement was found. So if you are interested in EAN-2
|
||||
and EAN-5 extensions, use the order depicted above.
|
||||
|
||||
It's important to mention that, if supplements are supplied, regular EAN-13
|
||||
codes cannot be read any more with the same reader. If you want to read EAN-13
|
||||
with and without extensions you have to add another `ean_reader` reader to the
|
||||
configuration.
|
||||
|
||||
### locator
|
||||
|
||||
The `locator` config is only relevant if the `locate` flag is set to `true`.
|
||||
@@ -613,6 +642,14 @@ on the ``singleChannel`` flag in the configuration when using ``decodeSingle``.
|
||||
|
||||
## <a name="changelog">Changelog</a>
|
||||
|
||||
### 2016-04-24
|
||||
- Features
|
||||
- EAN-13 extended codes can now be decoded (See
|
||||
[\#71](https://github.com/serratus/quaggaJS/issues/71))
|
||||
|
||||
Take a look at the release-notes (
|
||||
[0.11.0](https://github.com/serratus/quaggaJS/releases/tag/v0.11.0))
|
||||
|
||||
### 2016-04-19
|
||||
- Improvements
|
||||
- Reducing false-positives for Code 128 barcodes (
|
||||
|
||||
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 91 KiB |