Created
July 17, 2020 03:21
-
-
Save yushulx/e73d3caa22d6c45bbed3462a7892a89b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (results != null) { | |
for (index in results) { | |
let result = results[index]; | |
let upperLeft = new cv.Point(result.x1, result.y1) | |
let bottomLeft = new cv.Point(result.x2, result.y2) | |
let upperRight = new cv.Point(result.x3, result.y3) | |
let bottomRight = new cv.Point(result.x4, result.y4) | |
img.drawLine( | |
upperLeft, | |
bottomLeft, | |
drawParams | |
) | |
img.drawLine( | |
bottomLeft, | |
upperRight, | |
drawParams | |
) | |
img.drawLine( | |
upperRight, | |
bottomRight, | |
drawParams | |
) | |
img.drawLine( | |
bottomRight, | |
upperLeft, | |
drawParams | |
) | |
img.putText(result.value, new cv.Point(result.x1, result.y1 + 10), fontFace, fontScale, textColor, thickness); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment