- Inverted image for better localization

- increased detection size for static/upload images to 800px
This commit is contained in:
Christoph Oberhofer
2014-12-03 23:29:45 +01:00
parent 238e4bfee0
commit dedeb3e739
5 changed files with 8 additions and 10 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ define(['cluster', 'glMatrixAddon', "array_helper"], function(Cluster2, glMatrix
var imageData = imageWrapper.data, length = imageData.length, targetData = targetWrapper.data;
while (length--) {
targetData[length] = imageData[length] < threshold ? 0 : 1;
targetData[length] = imageData[length] < threshold ? 1 : 0;
}
};
+2 -2
View File
@@ -193,7 +193,7 @@ function(Code128Reader, EANReader, InputStream, ImageWrapper, BarcodeLocator, Ba
_stopped = true;
},
onDetected : function(callback) {
Events.subscribe("detected", callback, true);
Events.subscribe("detected", callback);
},
isInitialized : function() {
return _initialized;
@@ -207,7 +207,7 @@ function(Code128Reader, EANReader, InputStream, ImageWrapper, BarcodeLocator, Ba
type : "ImageStream",
src : config.src,
sequence : false,
size: 640
size: 800
};
config.readyFunc = function() {
Events.subscribe("detected", function(result) {