fix(opencv): correct contour type for findContours

Changed contours from cv.Mat to cv.MatVector to match OpenCV.js API
requirements. The findContours method expects a MatVector for contour
storage, not a single Mat object. This fixes a potential runtime error
when using OpenCV-based panel detection.
This commit is contained in:
2026-04-13 20:14:02 -04:00
parent 0926428192
commit a548765c78
+1 -1
View File
@@ -5,7 +5,7 @@ export async function detectPanelsOpenCV(imageData, cv) {
const gray = new cv.Mat(); const gray = new cv.Mat();
const blurred = new cv.Mat(); const blurred = new cv.Mat();
const edges = new cv.Mat(); const edges = new cv.Mat();
const contours = new cv.Mat(); const contours = new cv.MatVector();
const hierarchy = new cv.Mat(); const hierarchy = new cv.Mat();
try { try {