Merged master

This commit is contained in:
Christoph Oberhofer
2015-08-13 22:56:37 +02:00
25 changed files with 3930 additions and 1130 deletions
+4 -3
View File
@@ -116,12 +116,13 @@ define(['quagga'], function(Quagga) {
singleChannel: false
},
locator: {
patchSize: "medium",
halfSample: true
patchSize: "large",
halfSample: true,
showCanvas: true
},
numOfWorkers: 0,
decoder: {
readers: ["code_128_reader"],
readers: ["i2of5_reader"],
showFrequency: true,
showPattern: true
},
+1
View File
@@ -41,6 +41,7 @@
<option value="upc">UPC</option>
<option value="upc_e">UPC-E</option>
<option value="codabar">Codabar</option>
<option value="i2of5">I2of5</option>
</select>
</label>
<label>
+2 -2
View File
@@ -2,7 +2,7 @@ $(function() {
var resultCollector = Quagga.ResultCollector.create({
capture: true,
capacity: 20,
blacklist: [{code: "3574660239843", format: "ean_13"}],
blacklist: [{code: "2167361334", format: "i2of5"}],
filter: function(codeResult) {
// only store results which match this constraint
// e.g.: codeResult
@@ -127,7 +127,7 @@ $(function() {
},
numOfWorkers: 4,
decoder: {
readers : ["code_128_reader"]
readers : [ "code_128_reader"]
},
locate: true
},
+1
View File
@@ -43,6 +43,7 @@
<option value="upc">UPC</option>
<option value="upc_e">UPC-E</option>
<option value="codabar">Codabar</option>
<option value="i2of5">I2of5</option>
</select>
</fieldset>
</div>
+28 -7
View File
@@ -1,14 +1,36 @@
$(function() {
var App = {
init: function() {
Quagga.init(this.state, function() {
var config = this.config[this.state.decoder.readers[0]] || this.config.default;
config = $.extend(true, {}, config, this.state);
Quagga.init(config, function() {
App.attachListeners();
Quagga.start();
});
},
config: {
reader: "code_128",
length: 10
"default": {
inputStream: { name: "Test",
type: "ImageStream",
length: 10,
size: 800
},
locator: {
patchSize: "medium",
halfSample: true
}
},
"i2of5_reader": {
inputStream: {
size: 800,
type: "ImageStream",
length: 5
},
locator: {
patchSize: "small",
halfSample: false
}
}
},
attachListeners: function() {
var self = this;
@@ -58,6 +80,7 @@ $(function() {
paths.forEach(function(path) {
var mappedValue;
if (typeof self._accessByPath(self.inputMapper, path) === "function") {
mappedValue = self._accessByPath(self.inputMapper, path)(value);
}
@@ -82,10 +105,8 @@ $(function() {
}
},
state: {
inputStream: { name: "Test",
type: "ImageStream",
src: "../test/fixtures/code_128/",
length: 10
inputStream: {
src: "../test/fixtures/code_128/"
},
decoder : {
readers : ["code_128_reader"]