FaceLandmarks68.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var tslib_1 = require("tslib");
  4. var utils_1 = require("../utils");
  5. var FaceLandmarks_1 = require("./FaceLandmarks");
  6. var FaceLandmarks68 = /** @class */ (function (_super) {
  7. tslib_1.__extends(FaceLandmarks68, _super);
  8. function FaceLandmarks68() {
  9. return _super !== null && _super.apply(this, arguments) || this;
  10. }
  11. FaceLandmarks68.prototype.getJawOutline = function () {
  12. return this.positions.slice(0, 17);
  13. };
  14. FaceLandmarks68.prototype.getLeftEyeBrow = function () {
  15. return this.positions.slice(17, 22);
  16. };
  17. FaceLandmarks68.prototype.getRightEyeBrow = function () {
  18. return this.positions.slice(22, 27);
  19. };
  20. FaceLandmarks68.prototype.getNose = function () {
  21. return this.positions.slice(27, 36);
  22. };
  23. FaceLandmarks68.prototype.getLeftEye = function () {
  24. return this.positions.slice(36, 42);
  25. };
  26. FaceLandmarks68.prototype.getRightEye = function () {
  27. return this.positions.slice(42, 48);
  28. };
  29. FaceLandmarks68.prototype.getMouth = function () {
  30. return this.positions.slice(48, 68);
  31. };
  32. FaceLandmarks68.prototype.getRefPointsForAlignment = function () {
  33. return [
  34. this.getLeftEye(),
  35. this.getRightEye(),
  36. this.getMouth()
  37. ].map(utils_1.getCenterPoint);
  38. };
  39. return FaceLandmarks68;
  40. }(FaceLandmarks_1.FaceLandmarks));
  41. exports.FaceLandmarks68 = FaceLandmarks68;
  42. //# sourceMappingURL=FaceLandmarks68.js.map