Updated to 0.11.0

This commit is contained in:
Christoph Oberhofer
2016-04-24 22:03:07 +02:00
parent d415ec358c
commit 32463b3e51
19 changed files with 1022 additions and 733 deletions
+1
View File
@@ -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>
+20 -4
View File
@@ -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,13 +115,16 @@ $(function() {
},
numOfWorkers: 1,
decoder: {
readers: ["code_128_reader"]
readers: [{
format: "code_128_reader",
config: {}
}]
},
locate: true,
src: null
}
};
App.init();
Quagga.onProcessed(function(result) {
@@ -145,4 +161,4 @@ $(function() {
$node.find("h4.code").html(code);
$("#result_strip ul.thumbnails").prepend($node);
});
});
});
+919 -718
View File
File diff suppressed because one or more lines are too long
+3 -3
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -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>
+18 -2
View File
@@ -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
},
+1
View File
@@ -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>
+21 -5
View File
@@ -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,11 +121,14 @@ $(function() {
src: "../test/fixtures/code_128/"
},
decoder : {
readers : ["code_128_reader"]
readers : [{
format: "code_128_reader",
config: {}
}]
}
}
};
App.init();
Quagga.onProcessed(function(result) {
@@ -149,4 +165,4 @@ $(function() {
$node.find("h4.code").html(detectedCode);
$("#result_strip ul.thumbnails").prepend($node);
});
});
});
+38 -1
View File
@@ -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 (
Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB