ojos
Version:
High level API on top of Mirada (opencv.js) supporting bth browser and node.
35 lines • 2 kB
JavaScript
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 abstractOperation_1 = require("./abstractOperation");
/**
* Applies fixed-level thresholding to a multiple-channel array. The function is typically used to get a bi-level (binary) image out of a grayscale image or for removing a noise, that is, filtering out pixels with too small or too large values. There are several types of thresholding supported by the function. They are determined by type parameter.
*/
var Threshold = /** @class */ (function (_super) {
__extends(Threshold, _super);
function Threshold() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.name = 'Threshold';
_this.description = 'Applies fixed-level thresholding to a multiple-channel array. The function is typically used to get a bi-level (binary) image out of a grayscale image or for removing a noise, that is, filtering out pixels with too small or too large values. There are several types of thresholding supported by the function. They are determined by type parameter.';
_this.sameSizeAndType = true;
return _this;
}
Threshold.prototype._exec = function (o) {
cv.threshold(o.src, o.dst, o.thresh, o.maxval, o.type);
};
return Threshold;
}(abstractOperation_1.AbstractOperation));
exports.Threshold = Threshold;
//# sourceMappingURL=threshold.js.map
;