> Documentation index: https://developer.android.com/reference/llms.txt

# ImageAnalysisScope

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

*** ** * ** ***


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

<br />

*** ** * ** ***

Scope class for `ImageAnalysis` configuration DSL.

## Summary

| ### Public methods |
|---|---|
| `final @NonNull Executor` | `getBackgroundExecutor()` Sets or gets the background executor for image analysis tasks. |
| `final int` | `getBackpressureStrategy()` Sets or gets the backpressure strategy for this use case. |
| `final int` | `getImageQueueDepth()` Sets or gets the image queue depth for this use case. |
| `final int` | `getOutputImageFormat()` Sets or gets the output image format for this use case. |
| `final @NonNull ResolutionSelector` | `getResolutionSelector()` Sets or gets the resolution selector for this use case. |
| `final @NonNull String` | `getTargetName()` Sets or gets the target name for this use case configuration. |
| `final int` | `getTargetRotation()` Sets or gets the target rotation for this use case. |
| `final boolean` | `isOutputImageRotationEnabled()` Sets or gets whether output image rotation is enabled for this use case. |
| `final void` | `setBackgroundExecutor(@NonNull Executor value)` Sets or gets the background executor for image analysis tasks. |
| `final void` | `setBackpressureStrategy(int value)` Sets or gets the backpressure strategy for this use case. |
| `final void` | `setImageQueueDepth(int value)` Sets or gets the image queue depth for this use case. |
| `final void` | `setOutputImageFormat(int value)` Sets or gets the output image format for this use case. |
| `final void` | `setOutputImageRotationEnabled(boolean value)` Sets or gets whether output image rotation is enabled for this use case. |
| `final void` | `setResolutionSelector(@NonNull ResolutionSelector value)` Sets or gets the resolution selector for this use case. |
| `final void` | `setTargetName(@NonNull String value)` Sets or gets the target name for this use case configuration. |
| `final void` | `setTargetRotation(int value)` Sets or gets the target rotation for this use case. |

## Public methods

### getBackgroundExecutor

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

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

Sets or gets the background executor for image analysis tasks.

| See also |
|---|---|
| `setBackgroundExecutor` |   |

### getBackpressureStrategy

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

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

Sets or gets the backpressure strategy for this use case.

| See also |
|---|---|
| `setBackpressureStrategy` |   |

### getImageQueueDepth

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

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

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

| See also |
|---|---|
| `setImageQueueDepth` |   |

### getOutputImageFormat

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

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

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

| See also |
|---|---|
| `setOutputImageFormat` |   |

### getResolutionSelector

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

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

Sets or gets the resolution selector for this use case.

| See also |
|---|---|
| `setResolutionSelector` |   |

### getTargetName

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

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

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

| See also |
|---|---|
| `setTargetName` |   |

### getTargetRotation

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

```
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 |
|---|---|
| `setTargetRotation` |   |

### isOutputImageRotationEnabled

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

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

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

| See also |
|---|---|
| `setOutputImageRotationEnabled` |   |

### setBackgroundExecutor

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

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

Sets or gets the background executor for image analysis tasks.

| See also |
|---|---|
| `setBackgroundExecutor` |   |

### setBackpressureStrategy

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

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

Sets or gets the backpressure strategy for this use case.

| See also |
|---|---|
| `setBackpressureStrategy` |   |

### setImageQueueDepth

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

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

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

| See also |
|---|---|
| `setImageQueueDepth` |   |

### setOutputImageFormat

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

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

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

| See also |
|---|---|
| `setOutputImageFormat` |   |

### setOutputImageRotationEnabled

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

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

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

| See also |
|---|---|
| `setOutputImageRotationEnabled` |   |

### setResolutionSelector

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

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

Sets or gets the resolution selector for this use case.

| See also |
|---|---|
| `setResolutionSelector` |   |

### setTargetName

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

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

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

| See also |
|---|---|
| `setTargetName` |   |

### setTargetRotation

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

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

Sets or gets the target rotation for this use case.

| See also |
|---|---|
| `setTargetRotation` |   |