Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

141
Vistas
Javascript Video Capture

I have the following code. It displays filter video at top and original video at bottom.

How to hide the video at the top?

Thanks

// https://editor.p5js.org/

function setup() {
   createCanvas(320, 260);
   video = createCapture(VIDEO);
   video.size(width,height);
 }
 let video;
 function draw() {
 image(video,0,0,width,height);
 // filter(THRESHOLD); 
//  filter(GRAY);
filter(INVERT);
}
about 4 years ago · Juan Pablo Isaza
3 Respuestas
Responde la pregunta

0

Thank you @Samathingamajig

The following Code works for me.

let video;

function setup() {
  createCanvas(320, 260);
  video = createCapture(VIDEO);
  video.size(width, height);
  video.hide();
}

function draw() {
  image(video,0,0,width,height);
  // rest of code
}
about 4 years ago · Juan Pablo Isaza Denunciar

0

Can we redefine it as below?

// https://editor.p5js.org/

function setup() {
   createCanvas(700, 394);
   video = createCapture(VIDEO);
   
   video.hide();
  // video.show();
 }
 let video;
 function draw() {
 image(video,0,0,width,height);
 // filter(THRESHOLD); 
 //  filter(GRAY);
 // filter(INVERT);
}
about 4 years ago · Juan Pablo Isaza Denunciar

0

On the documenation page, it says to do video.hide() to hide the webcam capture.

And if you don't want the filter, then don't call filter(...)

So your code will look like this:

let video;

function setup() {
  createCanvas(320, 260);
  video = createCapture(VIDEO);
  video.size(width, height);
  video.hide();
}

function draw() {
  image(video,0,0,width,height);
  // rest of code
}

If you ever want to reshow the original video, just run video.show().

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda