mirror of
https://github.com/ColonelParrot/jscanify.git
synced 2025-12-30 22:31:52 +00:00
Fix highlightPaper blank canvas when no contours detected
This commit is contained in:
parent
14809392a6
commit
eecb41ff37
@ -95,6 +95,7 @@
|
||||
const img = cv.imread(image);
|
||||
|
||||
const maxContour = this.findPaperContour(img);
|
||||
cv.imshow(canvas, img);
|
||||
if (maxContour) {
|
||||
const {
|
||||
topLeftCorner,
|
||||
@ -103,8 +104,6 @@
|
||||
bottomRightCorner,
|
||||
} = this.getCornerPoints(maxContour, img);
|
||||
|
||||
cv.imshow(canvas, img);
|
||||
|
||||
if (
|
||||
topLeftCorner &&
|
||||
topRightCorner &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user