mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-12 21:21:42 +08:00
- Inverted image for better localization
- increased detection size for static/upload images to 800px
This commit is contained in:
Vendored
+3
-3
@@ -4299,7 +4299,7 @@ define('cv_utils',['cluster', 'glMatrixAddon', "array_helper"], function(Cluster
|
|||||||
var imageData = imageWrapper.data, length = imageData.length, targetData = targetWrapper.data;
|
var imageData = imageWrapper.data, length = imageData.length, targetData = targetWrapper.data;
|
||||||
|
|
||||||
while (length--) {
|
while (length--) {
|
||||||
targetData[length] = imageData[length] < threshold ? 0 : 1;
|
targetData[length] = imageData[length] < threshold ? 1 : 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -7183,7 +7183,7 @@ function(Code128Reader, EANReader, InputStream, ImageWrapper, BarcodeLocator, Ba
|
|||||||
_stopped = true;
|
_stopped = true;
|
||||||
},
|
},
|
||||||
onDetected : function(callback) {
|
onDetected : function(callback) {
|
||||||
Events.subscribe("detected", callback, true);
|
Events.subscribe("detected", callback);
|
||||||
},
|
},
|
||||||
isInitialized : function() {
|
isInitialized : function() {
|
||||||
return _initialized;
|
return _initialized;
|
||||||
@@ -7197,7 +7197,7 @@ function(Code128Reader, EANReader, InputStream, ImageWrapper, BarcodeLocator, Ba
|
|||||||
type : "ImageStream",
|
type : "ImageStream",
|
||||||
src : config.src,
|
src : config.src,
|
||||||
sequence : false,
|
sequence : false,
|
||||||
size: 640
|
size: 800
|
||||||
};
|
};
|
||||||
config.readyFunc = function() {
|
config.readyFunc = function() {
|
||||||
Events.subscribe("detected", function(result) {
|
Events.subscribe("detected", function(result) {
|
||||||
|
|||||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
@@ -19,14 +19,12 @@
|
|||||||
/* line 1, ../sass/_viewport.scss */
|
/* line 1, ../sass/_viewport.scss */
|
||||||
#interactive.viewport {
|
#interactive.viewport {
|
||||||
width: 640px;
|
width: 640px;
|
||||||
height: 480px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* line 6, ../sass/_viewport.scss */
|
/* line 6, ../sass/_viewport.scss */
|
||||||
#interactive.viewport canvas, video {
|
#interactive.viewport canvas, video {
|
||||||
float: left;
|
float: left;
|
||||||
width: 640px;
|
width: 640px;
|
||||||
height: 480px;
|
|
||||||
}
|
}
|
||||||
/* line 10, ../sass/_viewport.scss */
|
/* line 10, ../sass/_viewport.scss */
|
||||||
#interactive.viewport canvas.drawingBuffer, video.drawingBuffer {
|
#interactive.viewport canvas.drawingBuffer, video.drawingBuffer {
|
||||||
|
|||||||
+1
-1
@@ -115,7 +115,7 @@ define(['cluster', 'glMatrixAddon', "array_helper"], function(Cluster2, glMatrix
|
|||||||
var imageData = imageWrapper.data, length = imageData.length, targetData = targetWrapper.data;
|
var imageData = imageWrapper.data, length = imageData.length, targetData = targetWrapper.data;
|
||||||
|
|
||||||
while (length--) {
|
while (length--) {
|
||||||
targetData[length] = imageData[length] < threshold ? 0 : 1;
|
targetData[length] = imageData[length] < threshold ? 1 : 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -193,7 +193,7 @@ function(Code128Reader, EANReader, InputStream, ImageWrapper, BarcodeLocator, Ba
|
|||||||
_stopped = true;
|
_stopped = true;
|
||||||
},
|
},
|
||||||
onDetected : function(callback) {
|
onDetected : function(callback) {
|
||||||
Events.subscribe("detected", callback, true);
|
Events.subscribe("detected", callback);
|
||||||
},
|
},
|
||||||
isInitialized : function() {
|
isInitialized : function() {
|
||||||
return _initialized;
|
return _initialized;
|
||||||
@@ -207,7 +207,7 @@ function(Code128Reader, EANReader, InputStream, ImageWrapper, BarcodeLocator, Ba
|
|||||||
type : "ImageStream",
|
type : "ImageStream",
|
||||||
src : config.src,
|
src : config.src,
|
||||||
sequence : false,
|
sequence : false,
|
||||||
size: 640
|
size: 800
|
||||||
};
|
};
|
||||||
config.readyFunc = function() {
|
config.readyFunc = function() {
|
||||||
Events.subscribe("detected", function(result) {
|
Events.subscribe("detected", function(result) {
|
||||||
|
|||||||
Reference in New Issue
Block a user