ScannerConfig
Configuration parameters for scanning functionality. ScannerConfig allows you to customize scan recording behavior including recording framerate, visualization settings, depth range, and output resolution. Use this class to optimize scanning performance for your specific use case. ## Basic Usage
kotlin val config = ScannerConfig( framerate = 30, enableRaycastVisualization = true, enableVoxelVisualization = true ) scanningSession.configure(config) Declaration
class ScannerConfigProperties
| Name | Type | Summary |
|---|---|---|
| basePath | String? | |
| enableFullResolution | Boolean | Controls whether full-resolution camera images are recorded. When true, the scanning feature will record a JPEG image that is the same resolution as the raw camera image passed to the NSDK session with the sendFrame function. When false, the scanning feature records a 720x540 resolution JPEG image generated by cropping and/or scaling and compressing the raw camera image. Note: Compressing the camera image to JPEG format is relatively expensive, so enable this option with that in mind. Note: The quality of voxel and raycast visualizations is not affected by this value. Default: false |
| enableRaycastVisualization | Boolean | Controls whether raycast visualization images are generated. When true, images for the raycast visualization will be generated each time a new input frame is available. The scanning feature provides buffers that can be used to generate a 2D image that visualizes what parts of the scene have been thoroughly scanned. Default: false |
| enableVoxelVisualization | Boolean | Controls whether voxel visualization is enabled. When true, voxels can be computed, and computed voxels will be updated each time a new input frame is available. Default: false |
| farDepth | Float | Far depth plane for scan depth range, in meters. This parameter controls the farthest distance at which depth data will be integrated. Objects farther than this distance will not be visible in visualization or reconstruction. This does not affect the range of the recorded depth frames. If set to 0.0, this is configured to 5.0 m in the default configuration. Values greater than 5.0 m are not recommended. Must be greater than [nearDepth], or set to 0 to use the default range. Default: 0.0f (defaults to 5.0 m) |
| framerate | Int | Target FPS for recording and visualization processes. The target framerate is the cap for how often the feature will process new input frames. The actual framerate may differ. If set to 0, this defaults to 30 FPS. The recording FPS cannot exceed the rate at which frames are delivered to the scanning session. Note: Recording NSDK depth with [useNsdkDepthsIfPlatformUnavailable] can result in a lower recording FPS than the target framerate. Default: 0 (defaults to 30 FPS) |
| fullResolutionFramerate | Int | Target FPS for full resolution frame recording. The target framerate for recording full resolution frames when [enableFullResolution] is true. The actual framerate for full-resolution frames may differ from the target framerate. Note: Recording NSDK depth with [useNsdkDepthsIfPlatformUnavailable] can result in a lower recording FPS than the target framerate. Default: 0 (defaults to 2 FPS) |
| nearDepth | Float | Near depth plane for scan depth range, in meters. This parameter controls the closest distance at which depth data will be integrated. Objects closer than this distance will not be visible in visualization or reconstruction. This does not affect the range of the recorded depth frames. If set to -1.0, this is configured to 0.02 m in the default configuration. Must be greater than or equal to 0 and less than [farDepth], or set to -1.0 to use the default range. Default: 0.02f |
| raycastHeight | Int | Height of the raycast visualization's output image in pixel units. The output quality is bound by both the configured resolution and the quality of the underlying 3D reconstruction data. On devices without native depth support, the data is unlikely to be sufficient to support resolutions above 256x144. Default: 0 (defaults to 144 pixels) |
| raycastWidth | Int | Width of the raycast visualization's output image in pixel units. The output quality is bound by both the configured resolution and the quality of the underlying 3D reconstruction data. On devices without native depth support, the data is unlikely to be sufficient to support resolutions above 256x144. Default: 0 (defaults to 256 pixels) |
| scanTargetId | String? | Optional field to set a scan target identifier for use with Niantic Spatial's mapping services. Default: null |
| useNsdkDepthsIfPlatformUnavailable | Boolean | Whether to use and record NSDK's estimated depths, if platform depths are unavailable. Depths are recorded as part of the scan data, and are also required to generate voxels or raycast visualization images. If NSDK was configured to use platform depths, this value is ignored, and depths are expected to come through the scanning session. Otherwise: - When true, NSDK will generate estimated depths for use by the scanning feature - When false, the scanning feature will not be able to generate voxels or raycast visualization images, but will still be able to record other scan data. Attention: If NSDK depth is being recorded because [useNsdkDepthsIfPlatformUnavailable] is true and lidar is unavailable, the recording FPS will be limited to the update rate of the depth feature, which defaults to 10 FPS. To change the update rate of the depth feature, set [DepthConfig.framerate] to match [framerate]. Default: false |
| voxelSize | Float | Minimum size of voxels for the voxel visualization, in meters. This parameter controls the resolution of the voxel grid used for voxel visualization. Smaller values result in higher resolution but require more memory and computation. Larger values result in lower resolution but are more efficient. The actual voxel size may become larger due to memory constraints, so this is only a minimum value. Default: 0.0f (defaults to 0.01 m) |
null, NSDK uses the public application path which was configured when creating the NSDK object. Default:null