透過場景語意 API,開發人員可以提供機器學習模型的即時語意資訊,瞭解使用者周遭的場景。當您提供戶外場景的圖片時,API 會針對每個像素傳回一組實用的語意類別標籤,例如天空、建築物、樹木、道路、人行道、車輛、人物等。除了像素標籤之外,場景語意 API 還會為每個像素標籤提供信心值,並提供簡單易用的查詢方式,可查詢特定標籤在戶外場景中的盛行率。
if(semanticManager.TryGetSemanticConfidenceTexture(outTexture2DsemanticConfidenceImage)){using(semanticConfidenceImage){// Use the semantic confidence image here.}}
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-14 (世界標準時間)。"],[[["The Scene Semantics API provides real-time understanding of a user's surroundings by assigning semantic labels, like \"building\" or \"tree\", to each pixel of an outdoor scene."],["It offers confidence values for each pixel label to indicate the certainty of the assigned label."],["Developers can efficiently query the prevalence of a specific semantic label, like \"sky\", within the scene."],["Before using, ensure your device supports the Scene Semantics API and enable it in your ARCore session settings."],["Access the semantic information through the `ArSemanticManager` by retrieving the semantic image, the confidence image, or querying label fractions."]]],["The Scene Semantics API provides real-time semantic understanding of outdoor scenes through pixel labeling. To use it, first, enable \"Semantics Mode\" in ARCore configurations. Then, retrieve the semantic image using `TryGetSemanticTexture()`, which assigns a label to each pixel. Acquire the corresponding confidence image with `TryGetSemanticConfidenceTexture()` for pixel confidence values. Finally, query the fraction of a specific label within the scene using `GetSemanticLabelFraction()`. The API requires 1-3 frames to start outputting images.\n"]]