Merge pull request #23449 from Zwyx:fix-mat-zeros-rows-cols

Switch `rows` and `cols` in call to Mat.zeros
pull/23127/head
Alexander Smorkalov 2 years ago committed by GitHub
commit bac7180e02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      doc/js_tutorials/js_assets/js_contours_begin_contours.html

@ -41,7 +41,7 @@
<script src="utils.js" type="text/javascript"></script>
<script id="codeSnippet" type="text/code-snippet">
let src = cv.imread('canvasInput');
let dst = cv.Mat.zeros(src.cols, src.rows, cv.CV_8UC3);
let dst = cv.Mat.zeros(src.rows, src.cols, cv.CV_8UC3);
cv.cvtColor(src, src, cv.COLOR_RGBA2GRAY, 0);
cv.threshold(src, src, 120, 200, cv.THRESH_BINARY);
let contours = new cv.MatVector();

Loading…
Cancel
Save