ใบหน้าเสริมความงาม
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Augmented Faces ช่วยให้แอประบุภูมิภาคต่างๆ ของใบหน้าที่ตรวจพบโดยอัตโนมัติได้ และใช้ภูมิภาคเหล่านั้นเพื่อวางซ้อนเนื้อหา เช่น พื้นผิวและโมเดล ซึ่งตรงกับรูปร่างและภูมิภาคของใบหน้าแต่ละคนได้อย่างถูกต้อง
Augmented Faces ทํางานอย่างไร
ตัวอย่างแอป AugmentedFaces จะวางซ้อนลักษณะใบหน้าของสุนัขจิ้งจอกลงในใบหน้าของผู้ใช้โดยใช้ทั้งเนื้อหาของโมเดลและพื้นผิว
![]()
แบบจําลอง 3 มิติมีหูสุนัขจิ้งจอก 2 ตัวและจมูกสุนัขจิ้งจอก กระดูกชิ้นนี้ถือเป็นกระดูกแต่ละชิ้นที่แยกกันได้ตามภูมิภาคของใบหน้าที่มันแนบอยู่
![]()
พื้นผิวประกอบด้วยอายแชโดว์ กระ และสีอื่นๆ ดังนี้
![]()
เมื่อคุณเรียกใช้แอปตัวอย่าง แอปจะเรียก API ให้ตรวจจับใบหน้าและวางซ้อนทั้งพื้นผิวและโมเดลลงบนใบหน้า
ระบุตาข่ายเพิ่ม Augmented Face
ARCore จะซ้อนทับพื้นผิวและโมเดล 3 มิติบนใบหน้าที่ตรวจพบ โดย AR จะมอบภูมิภาคที่ตรวจพบและตาข่ายเสริม ตาข่ายนี้นําเสนอใบหน้าเสมือนจริงและประกอบด้วยจุดยอดมุม ใบหน้า และตรงกลางของศีรษะของผู้ใช้ โปรดทราบว่าการวางแนวของ Mesh นั้นแตกต่างจาก Sceneform ทุกประการ
![]()
เมื่อกล้องตรวจพบใบหน้าของผู้ใช้ ARCore จะดําเนินการขั้นตอนเหล่านี้เพื่อสร้างตาข่าย Augmented, โพสท่าที่อยู่ตรงกลางและท่าทาง
โดยจะระบุท่าทางกลางและตาข่าย
- ท่าทางกลางจมูกเป็นจุดศูนย์กลางของศีรษะของผู้ใช้ (หรือที่เรียกว่ากะโหลกศีรษะ)
![]()
- ตาข่ายประกอบด้วยจุดยอดมุมหลายร้อยรูปที่ประกอบขึ้นเป็นใบหน้า และมีการกําหนดตําแหน่งให้สัมพันธ์กับตําแหน่งตรงกลาง
![]()
คลาส AugmentedFace
ใช้ Mesh และโพสท่าที่อยู่ตรงกลางเพื่อระบุท่าทางใบหน้าของใบหน้าในใบหน้าของผู้ใช้ ภูมิภาคเหล่านี้ ได้แก่
- หน้าผากซ้าย (
LEFT_FOREHEAD
)
- หน้าผากขวา (
RIGHT_FOREHEAD
)
- ปลายจมูก (
NOSE_TIP
)
องค์ประกอบเหล่านี้ ได้แก่ การโพสท่าที่ด้านหน้า ตาข่าย และบริเวณของใบหน้าประกอบกันเป็นตาข่าย Augmented Reality และ AugmentedFace
API ใช้เป็นตําแหน่งและภูมิภาคเพื่อวางเนื้อหาในแอป
ขั้นตอนถัดไป
เริ่มใช้ Augmented Faces ในแอปของคุณเอง ดูข้อมูลเพิ่มเติมได้ในหัวข้อ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2022-09-26 UTC
[null,null,["อัปเดตล่าสุด 2022-09-26 UTC"],[[["\u003cp\u003eAugmented Faces automatically identifies face regions to overlay assets like textures and models, realistically conforming to individual faces.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes a 3D model with movable bones (e.g., ears, nose) and a texture for features like eye shadow, freckles, etc., to augment the user's face.\u003c/p\u003e\n"],["\u003cp\u003eARCore provides an augmented face mesh, consisting of vertices, facial regions, and the head's center, for precise overlay placement.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves detecting the center pose, creating a face mesh, and identifying face region poses (forehead, nose tip) for asset positioning.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage Augmented Faces by creating specific assets and using the Sceneform developer guide for implementation.\u003c/p\u003e\n"]]],["Augmented Faces utilizes ARCore to detect a user's face and overlay digital assets. ARCore identifies the face's center pose and generates a face mesh composed of vertices. Using this mesh and center pose, the system determines region poses, such as the left and right forehead, and the nose tip. These elements help position assets like textures (eye shadow, freckles) and 3D models (fox ears, nose) onto the face, allowing the system to move these elements with the face, resulting in a proper fit.\n"],null,["# Augmented Faces allows your app to automatically identify different\nregions of a detected face, and use those regions to overlay assets such as\ntextures and models in a way that properly matches the contours and regions of\nan individual face.\n\nHow does Augmented Faces work?\n------------------------------\n\nThe [**AugmentedFaces**](//github.com/google-ar/sceneform-android-sdk/tree/v1.15.0/samples/augmentedfaces) sample\napp overlays the facial features of a fox onto a user's face using both the\nassets of a model and a texture.\n\nThe 3D model consists of two fox ears and a fox nose. Each is a separate [bone](//en.wikipedia.org/wiki/Skeletal_animation)\nthat can be moved individually to follow the facial region they are attached to:\n\nThe texture consists of eye shadow, freckles, and other coloring:\n\nWhen you run the sample app, it calls APIs to detect a face and overlays both the texture and the models onto the face.\n\nIdentifying an augmented face mesh\n----------------------------------\n\nIn order to properly overlay textures and 3D models on a detected face, ARCore\nprovides detected regions and an *augmented face mesh* . This mesh\nis a virtual representation of the face, and consists of the vertices, facial\nregions, and the center of the user's head. Note that the\n[orientation](/sceneform/develop/augmented-faces/developer-guide#face_mesh_orientation)\nof the mesh is different for Sceneform.\n\nWhen a user's face is detected by the camera, ARCore performs these steps to\ngenerate the augmented face mesh, as well as center and region poses:\n\n1. It identifies the *center pose* and a *face mesh*.\n\n - The center pose, located behind the nose, is the physical center point of the user's head (in other words, inside the skull).\n\n - The face mesh consists of hundreds of vertices that make up the face, and is defined relative to the center pose. \n\n2. The `AugmentedFace` class uses the face mesh and center pose to identify\n *face region poses* on the user's face. These regions are:\n\n - Left forehead (`LEFT_FOREHEAD`)\n - Right forehead (`RIGHT_FOREHEAD`)\n - Tip of the nose (`NOSE_TIP`)\n\nThese elements -- the center pose, face mesh, and face region poses -- comprise\nthe augmented face mesh and are used by `AugmentedFace` APIs as positioning\npoints and regions to place the assets in your app.\n\nNext steps\n----------\n\nStart using Augmented Faces in your own apps. To learn more, see:\n\n- [Creating assets for Augmented Faces](/sceneform/develop/augmented-faces/creating-assets)\n\n- [Augmented Faces developer guide for Sceneform](/sceneform/develop/augmented-faces/developer-guide)"]]