UNPKG

ojos

Version:

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

36 lines 1.63 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var misc_utils_of_mine_generic_1 = require("misc-utils-of-mine-generic"); var abstractOperation_1 = require("./abstractOperation"); /** * smoothes an image using the median filter with the ksize x ksize aperture. */ var MedianBlur = /** @class */ (function (_super) { __extends(MedianBlur, _super); function MedianBlur() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.name = "MedianBlur"; _this.description = 'smoothes an image using the median filter with the ksize x ksize aperture.'; return _this; } MedianBlur.prototype._exec = function (o) { misc_utils_of_mine_generic_1.checkThrow(!o.ksize || o.ksize === 1 || o.ksize % 2 !== 0, 'MedianBlur Blur size must be odd and greater than 2'); cv.medianBlur(o.src, o.dst, o.ksize); }; return MedianBlur; }(abstractOperation_1.AbstractOperation)); exports.MedianBlur = MedianBlur; //# sourceMappingURL=medianBlur.js.map