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

135
Vistas
Saving openCV.js destination image

In the code below I want to save dst in image format or get an URL to show in an image tag. There is a method imwrite() for other languages but I could not find any for javascript.

    let imgElement = document.getElementById("ImgViewImage"); // img element with ImgViewImage id
    let src = cv.imread(imgElement);
    let dst = new cv.Mat();
    let hsvPlanes = new cv.MatVector();
    let mergedPlanes = new cv.MatVector();
    cv.cvtColor(src, src, cv.COLOR_RGB2HSV, 0);
    cv.split(src, hsvPlanes);
    let H = hsvPlanes.get(0);
    let S = hsvPlanes.get(1);
    let V = hsvPlanes.get(2);
    cv.equalizeHist(V, V);
    mergedPlanes.push_back(H);
    mergedPlanes.push_back(S);
    mergedPlanes.push_back(V);
    cv.merge(mergedPlanes, src);
    cv.cvtColor(src, dst, cv.COLOR_HSV2RGB, 0);
    cv.imshow("canvasOutput", dst); // canavas element with canvasOutput id
    src.delete();
    dst.delete();
    hsvPlanes.delete();
    mergedPlanes.delete();

In addition, is there any way to give the image source directly to the src variable in javascript?

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