analysisResolution property

Size? analysisResolution
final

Requested camera analysis resolution (Android only).

By default CameraX delivers analysis frames at its default size (typically 640x480), which caps the detail available to models with larger inputs - small objects can be lost to the upscale. Set this to request a higher analysis resolution, e.g. Size(1280, 960) for an 800px model. The camera falls back to the nearest supported size, and detection coordinates are normalized so overlays are unaffected.

Higher resolutions increase the per-frame copy and downscale cost, so leave this null (the default) unless small-object detail matters more than peak FPS. iOS analysis frames already track the capture session resolution and ignore this setting.

Implementation

final Size? analysisResolution;