UNPKG

ojos

Version:

High level API on top of Mirada (opencv.js) supporting bth browser and node.

29 lines 924 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var mirada_1 = require("mirada"); var Chain = /** @class */ (function () { function Chain(mat) { if (mat === void 0) { mat = new cv.Mat(); } this.mat = mat; } Chain.prototype.filter2D = function (kernel, depth, anchor, delta, border) { cv.filter2D(this.mat, this.mat, depth, kernel, anchor, delta, border); return this; }; Chain.prototype.toRgba = function () { this.mat = mirada_1.toRgba(this.mat, this.mat); return this; }; Chain.prototype.roi = function (expr) { var dst = this.mat.roi(expr); this.mat.delete(); this.mat = dst; return this; }; Chain.prototype.asFile = function (name) { return mirada_1.File.fromMat(this.mat, name); }; return Chain; }()); exports.Chain = Chain; //# sourceMappingURL=chain.js.map