Stay organized with collectionsSave and categorize content based on your preferences.
public static final enumConfig.SemanticMode
Describes the desired behavior of the Scene Semantics API. Scene Semantics uses a machine
learning model to label each pixel from the camera feed with aSemanticLabel. See theScene Semantics
Developer Guidefor more information.
The Scene Semantics API is currently able to distinguish between outdoor labels specified bySemanticLabel. Usage indoors is currently unsupported and may yield unreliable results.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eConfig.SemanticMode\u003c/code\u003e controls the behavior of the Scene Semantics API in ARCore, which uses machine learning to label pixels in the camera feed with semantic information.\u003c/p\u003e\n"],["\u003cp\u003eThis API primarily supports outdoor environments and might provide unreliable results indoors.\u003c/p\u003e\n"],["\u003cp\u003eThe API is not supported on all ARCore devices; developers should check for device compatibility using \u003ccode\u003eSession.isSemanticModeSupported()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eConfig.SemanticMode\u003c/code\u003e has two main values: \u003ccode\u003eDISABLED\u003c/code\u003e (default) which deactivates the API, and \u003ccode\u003eENABLED\u003c/code\u003e which activates it for use with methods like \u003ccode\u003eFrame.acquireSemanticImage()\u003c/code\u003e.\u003c/p\u003e\n"]]],["`Config.SemanticMode` controls the Scene Semantics API, which labels camera feed pixels. Key actions include enabling/disabling the API via `Config.setSemanticMode()`. `Session.isSemanticModeSupported()` checks for device support, as not all devices are compatible. When enabled, `Frame` methods like `acquireSemanticImage()` and `getSemanticLabelFraction()` return data. The API currently supports outdoor labels. The default mode is `DISABLED`, requiring explicit enabling. `ENABLED` activates the API's functionality.\n"],null,["# Config.SemanticMode\n\n`\npublic static final enum\n`**Config.SemanticMode**`\n` \nDescribes the desired behavior of the Scene Semantics API. Scene Semantics uses a machine\nlearning model to label each pixel from the camera feed with a [SemanticLabel](/ar/reference/java/com/google/ar/core/SemanticLabel). See the\n[Scene Semantics\nDeveloper Guide](https://developers.google.com/ar/develop/java/scene-semantics) for more information.\n\nThe Scene Semantics API is currently able to distinguish between outdoor labels specified by\n[SemanticLabel](/ar/reference/java/com/google/ar/core/SemanticLabel). Usage indoors is currently unsupported and may yield unreliable results.\n\nA small number of ARCore supported devices do not support the Scene Semantics API. Use\n[Session.isSemanticModeSupported(Config.SemanticMode)](/ar/reference/java/com/google/ar/core/Session#isSemanticModeSupported(com.google.ar.core.Config.SemanticMode)) to query for support for Scene\nSemantics. Affected devices are also indicated on the [ARCore supported devices page](https://developers.google.com/ar/devices).\n\nThe default value is [DISABLED](/ar/reference/java/com/google/ar/core/Config.SemanticMode#DISABLED). Use [Config.setSemanticMode(Config.SemanticMode)](/ar/reference/java/com/google/ar/core/Config#setSemanticMode(com.google.ar.core.Config.SemanticMode)) to set the desired mode. \n\nInherited Methods\n-----------------\n\nFrom `class\njava.lang.Enum` \n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` final `[Object](https://developer.android.com/reference/java/lang/Object)` ` | clone`()` |\n| ` final int ` | compareTo`(`[Config.SemanticMode](/ar/reference/java/com/google/ar/core/Config.SemanticMode)` arg0)` |\n| ` int ` | compareTo`(`[Object](https://developer.android.com/reference/java/lang/Object)` arg0)` |\n| ` final Optional\u003cEnumDesc\u003c`[Config.SemanticMode](/ar/reference/java/com/google/ar/core/Config.SemanticMode)`\u003e\u003e ` | describeConstable`()` |\n| ` final boolean ` | equals`(`[Object](https://developer.android.com/reference/java/lang/Object)` arg0)` |\n| ` final void ` | finalize`()` |\n| ` final `[Class](https://developer.android.com/reference/java/lang/Class)`\u003c`[Config.SemanticMode](/ar/reference/java/com/google/ar/core/Config.SemanticMode)`\u003e ` | getDeclaringClass`()` |\n| ` final int ` | hashCode`()` |\n| ` final `[String](https://developer.android.com/reference/java/lang/String)` ` | name`()` |\n| ` final int ` | ordinal`()` |\n| ` `[String](https://developer.android.com/reference/java/lang/String)` ` | toString`()` |\n| ` static \u003cT extends `[Enum](https://developer.android.com/reference/java/lang/Enum)`\u003cT\u003e\u003e T ` | valueOf`(`[Class](https://developer.android.com/reference/java/lang/Class)`\u003cT\u003e arg0, `[String](https://developer.android.com/reference/java/lang/String)` arg1)` |\n\nFrom `class\njava.lang.Object` \n\n|---------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| ` `[Object](https://developer.android.com/reference/java/lang/Object)` ` | clone`()` |\n| ` boolean ` | equals`(`[Object](https://developer.android.com/reference/java/lang/Object)` arg0)` |\n| ` void ` | finalize`()` |\n| ` final `[Class](https://developer.android.com/reference/java/lang/Class)`\u003c?\u003e ` | getClass`()` |\n| ` int ` | hashCode`()` |\n| ` final void ` | notify`()` |\n| ` final void ` | notifyAll`()` |\n| ` `[String](https://developer.android.com/reference/java/lang/String)` ` | toString`()` |\n| ` final void ` | wait`(long arg0, int arg1)` |\n| ` final void ` | wait`(long arg0)` |\n| ` final void ` | wait`()` |\n\nFrom `interface\njava.lang.constant.Constable` \n\n|-----------------------------------------------|-----------------------|\n| ` abstract Optional\u003c? extends ConstantDesc\u003e ` | describeConstable`()` |\n\nFrom `interface\njava.lang.Comparable` \n\n|------------------|------------------------------------------------------------------------------------------------------|\n| ` abstract int ` | compareTo`(`[Config.SemanticMode](/ar/reference/java/com/google/ar/core/Config.SemanticMode)` arg0)` |\n\nEnum Values\n-----------\n\n#### public\nstatic\nfinal\nConfig.SemanticMode\nDISABLED\n\n### DISABLED\n\n```java\npublic static final Config.SemanticMode DISABLED\n``` \nThe Scene Semantics API is disabled. Calls to [Frame.acquireSemanticImage()](/ar/reference/java/com/google/ar/core/Frame#acquireSemanticImage()), [Frame.acquireSemanticConfidenceImage()](/ar/reference/java/com/google/ar/core/Frame#acquireSemanticConfidenceImage()), and [Frame.getSemanticLabelFraction(SemanticLabel)](/ar/reference/java/com/google/ar/core/Frame#getSemanticLabelFraction(com.google.ar.core.SemanticLabel)) will not return valid results.\n\nThis is the default mode.\n\n#### public\nstatic\nfinal\nConfig.SemanticMode\nENABLED\n\n### ENABLED\n\n```java\npublic static final Config.SemanticMode ENABLED\n``` \nThe Scene Semantics API is enabled. Calls to [Frame.acquireSemanticImage()](/ar/reference/java/com/google/ar/core/Frame#acquireSemanticImage()), [Frame.acquireSemanticConfidenceImage()](/ar/reference/java/com/google/ar/core/Frame#acquireSemanticConfidenceImage()), and [Frame.getSemanticLabelFraction(SemanticLabel)](/ar/reference/java/com/google/ar/core/Frame#getSemanticLabelFraction(com.google.ar.core.SemanticLabel)) will return valid results.\n\nUse [Config.setSemanticMode(Config.SemanticMode)](/ar/reference/java/com/google/ar/core/Config#setSemanticMode(com.google.ar.core.Config.SemanticMode)) to set this mode."]]