diff --git a/server.py b/server.py index c0db138..22fba51 100644 --- a/server.py +++ b/server.py @@ -288,9 +288,9 @@ def extend_pattern(data): emit('extention', info) -@socketio.on('train') -def train(data): - trainer.trainModel(data['name']) +#@socketio.on('train') +#def train(data): +# trainer.trainModel(data['name']) ###### ROUTES diff --git a/static/VectorizerCanvas.js b/static/VectorizerCanvas.js index f803e5d..10e41d0 100644 --- a/static/VectorizerCanvas.js +++ b/static/VectorizerCanvas.js @@ -236,8 +236,10 @@ export class VectorizerCanvas extends HTMLElement { //jsfeat.imgproc.equalize_histogram(img_u8, img_u8) - var r = this.edgeDetails; //5 bei zu viel gedöns? + var r = Number(this.edgeDetails) //5 bei zu viel gedöns? + console.log("edgeDetails", r) var kernel_size = (r+1) << 1; + console.log("kernel_size", kernel_size) jsfeat.imgproc.gaussian_blur(img_u8, img_u8, kernel_size, 0); @@ -322,9 +324,9 @@ export class VectorizerCanvas extends HTMLElement { this.shadow.getElementById("canvas-container").appendChild(this.canvas) - paper.view.onFrame = this.tick.bind(this) + //paper.view.onFrame = this.tick.bind(this) this.raster = new Raster([this.vidw,this.vidh]); - + this.tick() }) diff --git a/static/WebcamGenerator.js b/static/WebcamGenerator.js index 39a8726..d575c29 100644 --- a/static/WebcamGenerator.js +++ b/static/WebcamGenerator.js @@ -121,6 +121,8 @@ export class WebcamGenerator extends HTMLElement {