diff --git a/src/ext/conf/ExtensionConf.js b/src/ext/conf/ExtensionConf.js index 0a688dc..9811230 100644 --- a/src/ext/conf/ExtensionConf.js +++ b/src/ext/conf/ExtensionConf.js @@ -55,7 +55,7 @@ var ExtensionConf = { treshold: 16, // if pixel is darker than the sum of black level and this value, we count it as black // on 0-255. Needs to be fairly high (8 might not cut it) due to compression // artifacts in the video itself - imageTreshold: 8, // in order to detect pixel as "not black", the pixel must be brighter than + imageTreshold: 4, // in order to detect pixel as "not black", the pixel must be brighter than // the sum of black level, treshold and this value. gradientTreshold: 2, // When trying to determine thickness of the black bars, we take 2 values: position of // the last pixel that's darker than our treshold, and position of the first pixel that's diff --git a/src/ext/lib/ar-detect/edge-detect/EdgeDetect.js b/src/ext/lib/ar-detect/edge-detect/EdgeDetect.js index c0328cb..2cf48cc 100644 --- a/src/ext/lib/ar-detect/edge-detect/EdgeDetect.js +++ b/src/ext/lib/ar-detect/edge-detect/EdgeDetect.js @@ -548,7 +548,7 @@ class EdgeDetect{ image[tmpI + 1] > this.blackbarTreshold || image[tmpI + 2] > this.blackbarTreshold ){ - colsOut[c].black = (i / this.conf.canvasImageDataRowLength); + colsOut[c].black = (i / this.conf.canvasImageDataRowLength) - 1; colsOut[c].col = colsIn[c].value; colsIn[c].blackFound = 1; console.log("BLACK FOUND AT COL:", colsIn[c].value, '|', colsOut[c].col, "LINE:", colsOut[c].black, colsOut, colsOut[c])