Remove unused code to make Aard work
This commit is contained in:
parent
3645b9ffcf
commit
54d53f1b91
@ -84,9 +84,7 @@ class ArDetector {
|
|||||||
private animationFrameHandle: any;
|
private animationFrameHandle: any;
|
||||||
private attachedCanvas: HTMLCanvasElement;
|
private attachedCanvas: HTMLCanvasElement;
|
||||||
canvas: HTMLCanvasElement;
|
canvas: HTMLCanvasElement;
|
||||||
private blackframeCanvas: HTMLCanvasElement;
|
|
||||||
private context: CanvasRenderingContext2D;
|
private context: CanvasRenderingContext2D;
|
||||||
private blackframeContext: CanvasRenderingContext2D;
|
|
||||||
canvasImageDataRowLength: number;
|
canvasImageDataRowLength: number;
|
||||||
|
|
||||||
private timers = {
|
private timers = {
|
||||||
@ -213,8 +211,6 @@ class ArDetector {
|
|||||||
// this.blackframeCanvas.height = this.settings.active.arDetect.canvasDimensions.blackframeCanvas.height;
|
// this.blackframeCanvas.height = this.settings.active.arDetect.canvasDimensions.blackframeCanvas.height;
|
||||||
|
|
||||||
this.context = this.canvas.getContext("2d");
|
this.context = this.canvas.getContext("2d");
|
||||||
// this.blackframeContext = this.blackframeCanvas.getContext("2d");
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// [2] determine places we'll use to sample our main frame
|
// [2] determine places we'll use to sample our main frame
|
||||||
@ -826,7 +822,7 @@ class ArDetector {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.blackframeContext) {
|
if (!this.context) {
|
||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -980,16 +976,6 @@ class ArDetector {
|
|||||||
*/
|
*/
|
||||||
const bfDrawStartTime = performance.now();
|
const bfDrawStartTime = performance.now();
|
||||||
|
|
||||||
// await new Promise<void>(
|
|
||||||
// resolve => {
|
|
||||||
// this.blackframeContext.drawImage(this.video, 0, 0, this.blackframeCanvas.width, this.blackframeCanvas.height);
|
|
||||||
// resolve();
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// const rows = this.blackframeCanvas.height;
|
|
||||||
// const cols = this.blackframeCanvas.width;
|
|
||||||
// const bfImageData = this.blackframeContext.getImageData(0, 0, cols, rows).data;
|
|
||||||
|
|
||||||
const rows = this.settings.active.arDetect.canvasDimensions.blackframeCanvas.width;
|
const rows = this.settings.active.arDetect.canvasDimensions.blackframeCanvas.width;
|
||||||
const cols = this.settings.active.arDetect.canvasDimensions.blackframeCanvas.height;
|
const cols = this.settings.active.arDetect.canvasDimensions.blackframeCanvas.height;
|
||||||
const samples = rows * cols;
|
const samples = rows * cols;
|
||||||
|
Loading…
Reference in New Issue
Block a user