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

165
Vistas
Conversion of Windows.Graphics.Capture.Direct3D11CaptureFrame to OpenCvSharp::Mat

As the title suggests, the aim is to convert Direct3DCaptureFrame from the Windows.Graphics.Capture API to a matrix object available in OpenCvSharp (Mat) so that the captured frame may be used with the popular Computer Vision Library.

There's an in-depth issue available on GitHub which gives reference to current attempts and findings. It also includes sample of what the result should look like and what it does as of now.

I personally believe my way isn't the right way and there may be an easier way to handle this, but I just decided to map the memory and copy it to a byte[]. OpenCvSharp::Mat has constructor overloads which allow one to reference data.

If there is a better (hopefully as performant) and easy way to do this, please do suggest it. I would love some help here.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

This issue was recently fixed by myself.

The missing thing was padding when referencing the byte[]. It is required to set the step parameter of Mat's overloaded constructor to width * (bytes / pixel). In my case, bytes / pixel was 4.

over 4 years ago · Santiago Trujillo 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