Upgrade to webpack 2 and babel 6

This commit is contained in:
Christoph Oberhofer
2016-03-29 12:08:57 +02:00
parent ce81e9169c
commit da08ae3eaf
27 changed files with 268 additions and 196 deletions
-15
View File
@@ -1,4 +1,3 @@
import CVUtils from '../common/cv_utils';
import ImageWrapper from '../common/image_wrapper';
var Bresenham = {};
@@ -90,20 +89,6 @@ Bresenham.getBarcodeLine = function(imageWrapper, p1, p2) {
};
};
Bresenham.toOtsuBinaryLine = function(result) {
var line = result.line,
image = new ImageWrapper({x: line.length - 1, y: 1}, line),
threshold = CVUtils.determineOtsuThreshold(image, 5);
line = CVUtils.sharpenLine(line);
CVUtils.thresholdImage(image, threshold);
return {
line: line,
threshold: threshold
};
};
/**
* Converts the result from getBarcodeLine into a binary representation
* also considering the frequency and slope of the signal for more robust results