google-ar / arcore-ios-sdk

ARCore SDK for iOS
https://developers.google.com/ar/
Apache License 2.0
283 stars 84 forks source link

How to get Pupillary distance? #62

Closed RickeyXiao closed 2 years ago

RickeyXiao commented 2 years ago

I am working on iOS , only find following code :

typedef NS_ENUM(NSUInteger, GARAugmentedFaceRegionType) {
  /** The region at the tip of the nose. */
  GARAugmentedFaceRegionTypeNose = 0,

  /** The region at the detected face's left side of the forehead. */
  GARAugmentedFaceRegionTypeForeheadLeft = 1,

  /** The region at the detected face's right side of the forehead. */
  GARAugmentedFaceRegionTypeForeheadRight = 2,
};

I think there should have a enum like GARAugmentedFaceRegionTypeEyeLeft, now how can i get Pupillary distance?

tenback commented 2 years ago

Look in the ARCore documentation what vertice number you need and use that position. Challenge is that the face can be from different lengths from the camera, so if you know the position and the distance between the points, what do you want to use as reference width to get the real distance between those points?

With kind regards,

Marco Tenback

On Fri, Sep 2, 2022 at 11:01 AM 肖伟 @.***> wrote:

I am working on iOS , only find following code :

typedef NS_ENUM(NSUInteger, GARAugmentedFaceRegionType) { /* The region at the tip of the nose. / GARAugmentedFaceRegionTypeNose = 0,

/* The region at the detected face's left side of the forehead. / GARAugmentedFaceRegionTypeForeheadLeft = 1,

/* The region at the detected face's right side of the forehead. / GARAugmentedFaceRegionTypeForeheadRight = 2, };

I think there should have a enum like GARAugmentedFaceRegionTypeEyeLeft, now how can i get Pupillary distance?

— Reply to this email directly, view it on GitHub https://github.com/google-ar/arcore-ios-sdk/issues/62, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVH4JHOF3JG5HCXDBHMZXDV4G65LANCNFSM6AAAAAAQDCR2BE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

RickeyXiao commented 2 years ago

Look in the ARCore documentation what vertice number you need and use that position. Challenge is that the face can be from different lengths from the camera, so if you know the position and the distance between the points, what do you want to use as reference width to get the real distance between those points? With kind regards, Marco Tenback On Fri, Sep 2, 2022 at 11:01 AM 肖伟 @.*> wrote: I am working on iOS , only find following code : typedef NS_ENUM(NSUInteger, GARAugmentedFaceRegionType) { /* The region at the tip of the nose. / GARAugmentedFaceRegionTypeNose = 0, / The region at the detected face's left side of the forehead. */ GARAugmentedFaceRegionTypeForeheadLeft = 1, / The region at the detected face's right side of the forehead. / GARAugmentedFaceRegionTypeForeheadRight = 2, }; I think there should have a enum like GARAugmentedFaceRegionTypeEyeLeft, now how can i get Pupillary distance? — Reply to this email directly, view it on GitHub <#62>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVH4JHOF3JG5HCXDBHMZXDV4G65LANCNFSM6AAAAAAQDCR2BE . You are receiving this because you are subscribed to this thread.Message ID: @.>

YES! I found this image