From a548765c78e3edf1077ac3f601ad05ffa21418ba Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Mon, 13 Apr 2026 20:14:02 -0400 Subject: [PATCH] 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. --- panel-detection/opencv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel-detection/opencv.js b/panel-detection/opencv.js index 412ccbf..ff02d3f 100644 --- a/panel-detection/opencv.js +++ b/panel-detection/opencv.js @@ -5,7 +5,7 @@ export async function detectPanelsOpenCV(imageData, cv) { const gray = new cv.Mat(); const blurred = new cv.Mat(); const edges = new cv.Mat(); - const contours = new cv.Mat(); + const contours = new cv.MatVector(); const hierarchy = new cv.Mat(); try {