autodetection works more or less properly. Removed some console.logs
This commit is contained in:
parent
4914a0dc1c
commit
82abee42bd
@ -37,7 +37,6 @@ class EdgeDetect{
|
|||||||
edgeCandidates = this.edgeDetect(image, fastCandidates);
|
edgeCandidates = this.edgeDetect(image, fastCandidates);
|
||||||
bars = this.edgePostprocess(edgeCandidates, this.conf.canvas.height);
|
bars = this.edgePostprocess(edgeCandidates, this.conf.canvas.height);
|
||||||
|
|
||||||
console.log("\n------------------------------------\nguardLineOut",guardLineOut,"\nsample cols",sampleCols,"\nfast candidates:", fastCandidates, "\nedgeCandidates:",edgeCandidates,"\nbars:",bars,"\n----------------------------\n\n\n")
|
|
||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
bars = this.pillarTest(image) ? {status: 'ar_known'} : {status: 'ar_unknown'};
|
bars = this.pillarTest(image) ? {status: 'ar_known'} : {status: 'ar_unknown'};
|
||||||
@ -246,8 +245,6 @@ class EdgeDetect{
|
|||||||
delete(edges.edgeCandidatesTop.count);
|
delete(edges.edgeCandidatesTop.count);
|
||||||
delete(edges.edgeCandidatesBottom.count);
|
delete(edges.edgeCandidatesBottom.count);
|
||||||
|
|
||||||
console.log("edges", edges, "missing edge?" ,missingEdge);
|
|
||||||
|
|
||||||
if( edges.edgeCandidatesTopCount > 0){
|
if( edges.edgeCandidatesTopCount > 0){
|
||||||
for(var e in edges.edgeCandidatesTop){
|
for(var e in edges.edgeCandidatesTop){
|
||||||
var edge = edges.edgeCandidatesTop[e];
|
var edge = edges.edgeCandidatesTop[e];
|
||||||
@ -270,15 +267,10 @@ class EdgeDetect{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("edges pre-sort:", edgesTop.slice(0), edgesBottom.slice(0));
|
|
||||||
|
|
||||||
// sort by distance
|
// sort by distance
|
||||||
edgesTop = edgesTop.sort((a,b) => {return a.distance - b.distance});
|
edgesTop = edgesTop.sort((a,b) => {return a.distance - b.distance});
|
||||||
edgesBottom = edgesBottom.sort((a,b) => {return a.distance - b.distance});
|
edgesBottom = edgesBottom.sort((a,b) => {return a.distance - b.distance});
|
||||||
|
|
||||||
console.log("edges post-sort:", edgesTop.slice(0), edgesBottom.slice(0));
|
|
||||||
|
|
||||||
|
|
||||||
// če za vsako stran (zgoraj in spodaj) poznamo vsaj enega kandidata, potem lahko preverimo nekaj
|
// če za vsako stran (zgoraj in spodaj) poznamo vsaj enega kandidata, potem lahko preverimo nekaj
|
||||||
// stvari
|
// stvari
|
||||||
|
|
||||||
|
@ -105,8 +105,6 @@ class GuardLine {
|
|||||||
|
|
||||||
var rowStart, rowEnd;
|
var rowStart, rowEnd;
|
||||||
|
|
||||||
console.log("!!!! -asdsa --------------- asdas- BLACKBAR CHECK")
|
|
||||||
|
|
||||||
// <<<=======| checking upper row |========>>>
|
// <<<=======| checking upper row |========>>>
|
||||||
|
|
||||||
rowStart = ((edge_upper * this.conf.canvas.width) << 2) + offset;
|
rowStart = ((edge_upper * this.conf.canvas.width) << 2) + offset;
|
||||||
@ -147,7 +145,7 @@ class GuardLine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
imageCheck(image){
|
imageCheck(image){
|
||||||
if(GlobalVars.arDetect.guardLine.top == null || GlobalVars.arDetect.guardLine.bottom == null)
|
if(!this.imageBar.top || !this.imageBar.bottom)
|
||||||
return { success: false };
|
return { success: false };
|
||||||
|
|
||||||
|
|
||||||
@ -185,8 +183,6 @@ class GuardLine {
|
|||||||
|
|
||||||
var res = false;
|
var res = false;
|
||||||
|
|
||||||
console.log("!!!! -asdsa --------------- asdas- IMAGE CHECK")
|
|
||||||
|
|
||||||
if(Debug.debugCanvas.enabled && Debug.debugCanvas.guardLine){
|
if(Debug.debugCanvas.enabled && Debug.debugCanvas.guardLine){
|
||||||
res = this._ti_debugCheckRow(image, rowStart, rowEnd, successTreshold);
|
res = this._ti_debugCheckRow(image, rowStart, rowEnd, successTreshold);
|
||||||
} else {
|
} else {
|
||||||
|
@ -480,8 +480,6 @@ class ArDetector {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("sample cols", sampleCols)
|
|
||||||
|
|
||||||
// save black level only if defined
|
// save black level only if defined
|
||||||
if(currentMinVal)
|
if(currentMinVal)
|
||||||
this.blackLevel = this.blackLevel < currentMinVal ? this.blackLevel : currentMinVal;
|
this.blackLevel = this.blackLevel < currentMinVal ? this.blackLevel : currentMinVal;
|
||||||
|
@ -71,11 +71,8 @@ class Resizer {
|
|||||||
} else if (this.stretch.mode == StretchMode.CONDITIONAL) {
|
} else if (this.stretch.mode == StretchMode.CONDITIONAL) {
|
||||||
stretchFactors = Stretcher.conditionalStretch(dimensions, ExtensionConf.stretch.conditionalDifferencePercent);
|
stretchFactors = Stretcher.conditionalStretch(dimensions, ExtensionConf.stretch.conditionalDifferencePercent);
|
||||||
}
|
}
|
||||||
console.log("PRE_ZOOM DIMENSIONS:",dimensions);
|
|
||||||
|
|
||||||
this.zoom.applyZoom(dimensions);
|
this.zoom.applyZoom(dimensions);
|
||||||
|
|
||||||
console.log("POST_ZOOM DIMENSIONS:",dimensions);
|
|
||||||
var cssOffsets = this.computeOffsets(dimensions);
|
var cssOffsets = this.computeOffsets(dimensions);
|
||||||
this.applyCss(cssOffsets, stretchFactors);
|
this.applyCss(cssOffsets, stretchFactors);
|
||||||
}
|
}
|
||||||
@ -193,8 +190,6 @@ class Resizer {
|
|||||||
|
|
||||||
applyCss(dimensions, stretchFactors){
|
applyCss(dimensions, stretchFactors){
|
||||||
|
|
||||||
console.log("CSS DIMENSIOPNS", dimensions)
|
|
||||||
|
|
||||||
if(this.video == undefined || this.video == null){
|
if(this.video == undefined || this.video == null){
|
||||||
if(Debug.debug)
|
if(Debug.debug)
|
||||||
console.log("[Resizer::_res_applyCss] Video went missing, doing nothing.");
|
console.log("[Resizer::_res_applyCss] Video went missing, doing nothing.");
|
||||||
|
Loading…
Reference in New Issue
Block a user