三元交通运输超常规、反常规联合开展交通...

public static class CameraSourceConfig.Builder extends Object
百度   这一周对于整个汽车圈,都是难过的一周。

Builder for CameraSourceConfig.

Public Constructor Summary

<ResultT>
Builder(Context context, Detector<ResultT> detector, DetectionTaskCallback<ResultT> detectionTaskCallback)
Creates a CameraSourceConfig builder with the supplied context, a vision Detector and a post detection DetectionTaskCallback.

Public Method Summary

CameraSourceConfig
CameraSourceConfig.Builder
CameraSourceConfig.Builder
setRequestedPreviewSize(int width, int height)
Sets the desired width and height of the camera frames in pixels.

Inherited Method Summary

Public Constructors

public Builder (Context context, Detector<ResultT> detector, DetectionTaskCallback<ResultT> detectionTaskCallback)

Creates a CameraSourceConfig builder with the supplied context, a vision Detector and a post detection DetectionTaskCallback. Camera preview images will be streamed to the associated detector upon starting the camera source.

Public Methods

public CameraSourceConfig build ()

public CameraSourceConfig.Builder setRequestedPreviewSize (int width, int height)

Sets the desired width and height of the camera frames in pixels. If the exact desired values are not available options, the best matching available options are selected.

We pass the desired size to CameraX and let CameraX choose the best available size.

Default: 480x360.