Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

171
Views
¿Es posible ocultar el video en ml5.js pero mantener los puntos de pose de la mano?

Estoy tratando de ocultar el video (webcam en este caso) pero mantengo los puntos detectados de la mano. He probado diferentes métodos, pero hasta ahora no he tenido éxito. Agradezco la ayuda.

El código principal (abajo) de ml5.js se puede encontrar y probar en vivo aquí: https://editor.p5js.org/ml5/sketches/Handpose_Webcam

 let handpose; let video; let predictions = []; function setup() { createCanvas(640, 480); video = createCapture(VIDEO); video.size(width, height); handpose = ml5.handpose(video, modelReady); // This sets up an event that fills the global variable "predictions" // with an array every time new hand poses are detected handpose.on("predict", results => { predictions = results; }); // Hide the video element, and just show the canvas video.hide(); } function modelReady() { console.log("Model ready!"); } function draw() { image(video, 0, 0, width, height); // We can call both functions to draw all keypoints and the skeletons drawKeypoints(); } // A function to draw ellipses over the detected keypoints function drawKeypoints() { for (let i = 0; i < predictions.length; i += 1) { const prediction = predictions[i]; for (let j = 0; j < prediction.landmarks.length; j += 1) { const keypoint = prediction.landmarks[j]; fill(0, 255, 0); noStroke(); ellipse(keypoint[0], keypoint[1], 10, 10); } } }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Sí, simplemente deje de dibujarlo en el lienzo y agregue una llamada al background para llenar el lienzo.

 function draw() { // image(video, 0, 0, width, height); // <- just delete this line background(255); // We can call both functions to draw all keypoints and the skeletons drawKeypoints(); }

https://editor.p5js.org/Samathingamajig/sketches/BV_kqU0Ik

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!