Minor tweaks
This commit is contained in:
parent
3d0c6926db
commit
978bd41386
@ -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
|
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
|
// on 0-255. Needs to be fairly high (8 might not cut it) due to compression
|
||||||
// artifacts in the video itself
|
// 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.
|
// 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
|
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
|
// the last pixel that's darker than our treshold, and position of the first pixel that's
|
||||||
|
@ -548,7 +548,7 @@ class EdgeDetect{
|
|||||||
image[tmpI + 1] > this.blackbarTreshold ||
|
image[tmpI + 1] > this.blackbarTreshold ||
|
||||||
image[tmpI + 2] > 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;
|
colsOut[c].col = colsIn[c].value;
|
||||||
colsIn[c].blackFound = 1;
|
colsIn[c].blackFound = 1;
|
||||||
console.log("BLACK FOUND AT COL:", colsIn[c].value, '|', colsOut[c].col, "LINE:", colsOut[c].black, colsOut, colsOut[c])
|
console.log("BLACK FOUND AT COL:", colsIn[c].value, '|', colsOut[c].col, "LINE:", colsOut[c].black, colsOut, colsOut[c])
|
||||||
|
Loading…
Reference in New Issue
Block a user