FaceLandmarks68.js 1.4 KB

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