mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
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:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user