# ImageAnalysisScope

Artifact: [androidx.camera:camera-core](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/core/CameraXDsl.kt+class:androidx.camera.core.ImageAnalysisScope) Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

*** ** * ** ***


```
@CameraXDsl
public final class ImageAnalysisScope implements InteropConfigurableScope<@NonNull ImageAnalysis.Builder>
```

<br />

*** ** * ** ***

Scope class for `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis` configuration DSL.

## Summary

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#getBackgroundExecutor()()` Sets or gets the background executor for image analysis tasks. |
| `final int` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#getBackpressureStrategy()()` Sets or gets the backpressure strategy for this use case. |
| `final int` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#getImageQueueDepth()()` Sets or gets the image queue depth for this use case. |
| `final int` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#getOutputImageFormat()()` Sets or gets the output image format for this use case. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/core/resolutionselector/ResolutionSelector` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#getResolutionSelector()()` Sets or gets the resolution selector for this use case. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#getTargetName()()` Sets or gets the target name for this use case configuration. |
| `final int` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#getTargetRotation()()` Sets or gets the target rotation for this use case. |
| `final boolean` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#isOutputImageRotationEnabled()()` Sets or gets whether output image rotation is enabled for this use case. |
| `final void` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#setBackgroundExecutor(java.util.concurrent.Executor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html value)` Sets or gets the background executor for image analysis tasks. |
| `final void` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#setBackpressureStrategy(kotlin.Int)(int value)` Sets or gets the backpressure strategy for this use case. |
| `final void` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#setImageQueueDepth(kotlin.Int)(int value)` Sets or gets the image queue depth for this use case. |
| `final void` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#setOutputImageFormat(kotlin.Int)(int value)` Sets or gets the output image format for this use case. |
| `final void` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#setOutputImageRotationEnabled(kotlin.Boolean)(boolean value)` Sets or gets whether output image rotation is enabled for this use case. |
| `final void` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#setResolutionSelector(androidx.camera.core.resolutionselector.ResolutionSelector)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/core/resolutionselector/ResolutionSelector value)` Sets or gets the resolution selector for this use case. |
| `final void` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#setTargetName(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html value)` Sets or gets the target name for this use case configuration. |
| `final void` | `https://developer.android.com/reference/androidx/camera/core/ImageAnalysisScope#setTargetRotation(kotlin.Int)(int value)` Sets or gets the target rotation for this use case. |

## Public methods

### getBackgroundExecutor

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final @NonNull Executor getBackgroundExecutor()
```

Sets or gets the background executor for image analysis tasks.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setBackgroundExecutor(java.util.concurrent.Executor)` |   |

### getBackpressureStrategy

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final int getBackpressureStrategy()
```

Sets or gets the backpressure strategy for this use case.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setBackpressureStrategy(int)` |   |

### getImageQueueDepth

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final int getImageQueueDepth()
```

Sets or gets the image queue depth for this use case.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setImageQueueDepth(int)` |   |

### getOutputImageFormat

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final int getOutputImageFormat()
```

Sets or gets the output image format for this use case.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setOutputImageFormat(int)` |   |

### getResolutionSelector

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final @NonNull ResolutionSelector getResolutionSelector()
```

Sets or gets the resolution selector for this use case.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setResolutionSelector(androidx.camera.core.resolutionselector.ResolutionSelector)` |   |

### getTargetName

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final @NonNull String getTargetName()
```

Sets or gets the target name for this use case configuration.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setTargetName(java.lang.String)` |   |

### getTargetRotation

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final int getTargetRotation()
```

Sets or gets the target rotation for this use case.

Value is one of the following:

- `Surface.ROTATION_0`
- `Surface.ROTATION_90`
- `Surface.ROTATION_180`
- `Surface.ROTATION_270`

<br />

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setTargetRotation(int)` |   |

### isOutputImageRotationEnabled

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final boolean isOutputImageRotationEnabled()
```

Sets or gets whether output image rotation is enabled for this use case.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setOutputImageRotationEnabled(boolean)` |   |

### setBackgroundExecutor

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final void setBackgroundExecutor(@NonNull Executor value)
```

Sets or gets the background executor for image analysis tasks.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setBackgroundExecutor(java.util.concurrent.Executor)` |   |

### setBackpressureStrategy

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final void setBackpressureStrategy(int value)
```

Sets or gets the backpressure strategy for this use case.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setBackpressureStrategy(int)` |   |

### setImageQueueDepth

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final void setImageQueueDepth(int value)
```

Sets or gets the image queue depth for this use case.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setImageQueueDepth(int)` |   |

### setOutputImageFormat

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final void setOutputImageFormat(int value)
```

Sets or gets the output image format for this use case.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setOutputImageFormat(int)` |   |

### setOutputImageRotationEnabled

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final void setOutputImageRotationEnabled(boolean value)
```

Sets or gets whether output image rotation is enabled for this use case.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setOutputImageRotationEnabled(boolean)` |   |

### setResolutionSelector

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final void setResolutionSelector(@NonNull ResolutionSelector value)
```

Sets or gets the resolution selector for this use case.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setResolutionSelector(androidx.camera.core.resolutionselector.ResolutionSelector)` |   |

### setTargetName

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final void setTargetName(@NonNull String value)
```

Sets or gets the target name for this use case configuration.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setTargetName(java.lang.String)` |   |

### setTargetRotation

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final void setTargetRotation(int value)
```

Sets or gets the target rotation for this use case.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setTargetRotation(int)` |   |