Fixes #102; Relates to #103 and #96

pull/99/head
Christoph Oberhofer 9 years ago
parent cd8148d05d
commit 7bead78de8

@ -199,7 +199,7 @@ function boxFromPatches(patches) {
function binarizeImage() { function binarizeImage() {
otsuThreshold(_currentImageWrapper, _binaryImageWrapper); otsuThreshold(_currentImageWrapper, _binaryImageWrapper);
_binaryImageWrapper.zeroBorder(); _binaryImageWrapper.zeroBorder();
if (_config.showCanvas) { if (_config.debug.showCanvas) {
_binaryImageWrapper.show(_canvasContainer.dom.binary, 255); _binaryImageWrapper.show(_canvasContainer.dom.binary, 255);
} }
} }

@ -358,10 +358,19 @@ function initWorker(cb) {
cmd: 'init', cmd: 'init',
size: {x: _inputStream.getWidth(), y: _inputStream.getHeight()}, size: {x: _inputStream.getWidth(), y: _inputStream.getHeight()},
imageData: workerThread.imageData, imageData: workerThread.imageData,
config: _config config: configForWorker(_config)
}, [workerThread.imageData.buffer]); }, [workerThread.imageData.buffer]);
} }
function configForWorker(config) {
return {
...config,
inputStream: {
...config.inputStream,
target: null
}
};
}
function workerInterface(factory) { function workerInterface(factory) {
/* eslint-disable no-undef*/ /* eslint-disable no-undef*/

Loading…
Cancel
Save