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

175
Views
cómo usar pixfinder para detectar píxeles específicos

Actualmente estoy usando https://www.npmjs.com/package/pixfinder para tratar de detectar agujeros en mis objetivos de papel para puntuar automáticamente mi objetivo. Lo coloqué contra un tablero de respaldo rojo, le tomé una foto y estaba tratando de encontrar el "rojo" en la imagen.

objetivo

Código de componente.

 import * as pix from 'pixfinder'; @Component({ selector: 'app-find-bullets', templateUrl: './find-bullets.component.html', styleUrls: ['./find-bullets.component.scss'] }) export class FindBulletsComponent implements AfterViewInit { bulletCount: number = 0; @ViewChild('img') img!: ElementRef<HTMLImageElement>; constructor() { } ngAfterViewInit(): void { var holes = pix.findAll({ img: this.img.nativeElement, distance: 2, colors: ['#6e0917'], //red clearNoise: 10, }); console.log(holes) this.bulletCount = holes.length; } }

bulletCount siempre es "1", y los puntos son esencialmente el objetivo completo si estoy leyendo esto bien:

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
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!