UNPKG

ojos

Version:

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

35 lines 1.66 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 mirada_1 = require("mirada"); var abstractOperation_1 = require("./abstractOperation"); /** * [dst] is set to 255 (all 1 -bits) if [src] is within the specified 1D, 2D, 3D, ... box and 0 otherwise. */ var InRange = /** @class */ (function (_super) { __extends(InRange, _super); function InRange() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.name = 'InRange'; _this.description = '[dst] is set to 255 (all 1 -bits) if [src] is within the specified 1D, 2D, 3D, ... box and 0 otherwise.'; return _this; } InRange.prototype._exec = function (o) { cv.inRange(o.src, mirada_1.isMat(o.lowerb) ? o.lowerb : new cv.Mat(o.src.rows, o.src.cols, o.src.type(), o.lowerb), mirada_1.isMat(o.upperb) ? o.upperb : new cv.Mat(o.src.rows, o.src.cols, o.src.type(), o.upperb), o.dst); }; return InRange; }(abstractOperation_1.AbstractOperation)); exports.InRange = InRange; //# sourceMappingURL=inRange.js.map