0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

opencv.jsの作法 その6

Last updated at Posted at 2019-02-18

概要

opencv.jsの作法を調べてみた。

実行環境

sandboxを用意した。以下のコードは動く。
http://jsdo.it/ohisama1/mU6l

写真

image.png

習作 いい感じのボケ

let src = cv.imread('canvasInput');
let dst = new cv.Mat();
let kernel = cv.matFromArray(1, 21, cv.CV_32FC1, [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]);
cv.normalize(kernel, kernel, 0, 0.1, cv.NORM_MINMAX);
let anchor = new cv.Point(-1, -1);
cv.filter2D(src, dst, cv.CV_8U, kernel, anchor, 0, cv.BORDER_DEFAULT);
cv.imshow('canvasOutput', dst);
src.delete();
dst.delete();
kernel.delete();

以上。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?