Automatic detection fix
This commit is contained in:
parent
7b5157a48d
commit
f3e0a48471
@ -476,7 +476,7 @@ class ArDetector {
|
|||||||
// poglejmo, če se je razmerje stranic spremenilo
|
// poglejmo, če se je razmerje stranic spremenilo
|
||||||
// check if aspect ratio is changed:
|
// check if aspect ratio is changed:
|
||||||
var lastAr = this.conf.resizer.getLastAr();
|
var lastAr = this.conf.resizer.getLastAr();
|
||||||
if( lastAr.type === AspectRatio.Automatic && lastAr.ar != null){
|
if( lastAr.type === AspectRatio.Automatic && lastAr.ratio !== null){
|
||||||
// spremembo lahko zavrnemo samo, če uporabljamo avtomatski način delovanja in če smo razmerje stranic
|
// spremembo lahko zavrnemo samo, če uporabljamo avtomatski način delovanja in če smo razmerje stranic
|
||||||
// že nastavili.
|
// že nastavili.
|
||||||
//
|
//
|
||||||
@ -600,7 +600,7 @@ class ArDetector {
|
|||||||
// If we don't detect letterbox, we reset aspect ratio to aspect ratio of the video file. The aspect ratio could
|
// If we don't detect letterbox, we reset aspect ratio to aspect ratio of the video file. The aspect ratio could
|
||||||
// have been corrected manually. It's also possible that letterbox (that was there before) disappeared.
|
// have been corrected manually. It's also possible that letterbox (that was there before) disappeared.
|
||||||
console.log("FAST LETTERBOX PRESENCE TEST FAILED, CALLING RESET")
|
console.log("FAST LETTERBOX PRESENCE TEST FAILED, CALLING RESET")
|
||||||
this.conf.resizer.reset({type: AspectRatio.Automatic, ar: null});
|
this.conf.resizer.reset({type: AspectRatio.Automatic, ratio: null});
|
||||||
this.guardLine.reset();
|
this.guardLine.reset();
|
||||||
this.noLetterboxCanvasReset = true;
|
this.noLetterboxCanvasReset = true;
|
||||||
|
|
||||||
@ -639,7 +639,7 @@ class ArDetector {
|
|||||||
// (since the new letterbox edge isn't present in our sample due to technical
|
// (since the new letterbox edge isn't present in our sample due to technical
|
||||||
// limitations)
|
// limitations)
|
||||||
if (this.fallbackMode && guardLineOut.blackbarFail) {
|
if (this.fallbackMode && guardLineOut.blackbarFail) {
|
||||||
this.conf.resizer.reset({type: AspectRatio.Automatic, ar: null});
|
this.conf.resizer.reset({type: AspectRatio.Automatic, ratio: null});
|
||||||
this.guardLine.reset();
|
this.guardLine.reset();
|
||||||
this.noLetterboxCanvasReset = true;
|
this.noLetterboxCanvasReset = true;
|
||||||
|
|
||||||
@ -665,7 +665,7 @@ class ArDetector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(guardLineOut.blackbarFail){
|
if(guardLineOut.blackbarFail){
|
||||||
this.conf.resizer.reset({type: AspectRatio.Automatic, ar: null});
|
this.conf.resizer.reset({type: AspectRatio.Automatic, ratio: null});
|
||||||
this.guardLine.reset();
|
this.guardLine.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ import Debug from '../../../conf/Debug';
|
|||||||
import EdgeStatus from './enums/EdgeStatusEnum';
|
import EdgeStatus from './enums/EdgeStatusEnum';
|
||||||
import EdgeDetectQuality from './enums/EdgeDetectQualityEnum';
|
import EdgeDetectQuality from './enums/EdgeDetectQualityEnum';
|
||||||
import EdgeDetectPrimaryDirection from './enums/EdgeDetectPrimaryDirectionEnum';
|
import EdgeDetectPrimaryDirection from './enums/EdgeDetectPrimaryDirectionEnum';
|
||||||
|
import AntiGradientMode from '../../../../common/enums/anti-gradient-mode.enum';
|
||||||
|
|
||||||
if (Debug.debug) {
|
if (Debug.debug) {
|
||||||
console.log("Loading EdgeDetect.js");
|
console.log("Loading EdgeDetect.js");
|
||||||
@ -30,7 +31,7 @@ class EdgeDetect{
|
|||||||
var fastCandidates, edgeCandidates, bars;
|
var fastCandidates, edgeCandidates, bars;
|
||||||
if (direction == EdgeDetectPrimaryDirection.VERTICAL) {
|
if (direction == EdgeDetectPrimaryDirection.VERTICAL) {
|
||||||
fastCandidates = this.findCandidates(image, sampleCols, guardLineOut);
|
fastCandidates = this.findCandidates(image, sampleCols, guardLineOut);
|
||||||
|
|
||||||
// if(quality == EdgeDetectQuality.FAST){
|
// if(quality == EdgeDetectQuality.FAST){
|
||||||
// edges = fastCandidates; // todo: processing
|
// edges = fastCandidates; // todo: processing
|
||||||
// } else {
|
// } else {
|
||||||
|
Loading…
Reference in New Issue
Block a user