Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public static async fromImageWithoutAlphaChannel(
img: Image,
roi?: Region,
): Promise {
const mat = new cv.Mat(img.data, img.height, img.width, cv.CV_8UC3);
if (roi) {
return mat.getRegion(determineROI(img, roi));
} else {
return mat;
}
}
}