在 Exterior View System (EVS) 1.1 中,系統支援由多個實體相機裝置組成的邏輯相機裝置。如要使用這個虛擬裝置,裝置實作必須支援 同步處理架構。
列舉、開啟及關閉邏輯相機裝置
應用程式可以使用相同的 IEvsEnumerator
方法,使用可用的邏輯相機裝置。傳回的 EvsCamera
物件 (代表邏輯攝影機裝置) 在中繼資料中必須包含下列項目:
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
如果傳回的 EvsCamera 物件代表邏輯攝影機,其攝影機中繼資料必須在ANDROID_REQUEST_AVAILABLE_CAPABILITIES
欄位中包含這個功能鍵。ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS
欄位會列出實體相機裝置 ID。ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
欄位可使用下列列舉值:ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE
適用於主-主模式中的感應器,沒有硬體快門/曝光同步。ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED
是用於主從模式的感應器,硬體快門/曝光同步。同步的 GMSL2 攝影機必須使用這個值。
應用程式可透過新 getPhysicalCameraInfo(stringcameraId)
方法中的 IEvsCamera
,擷取實體攝影機裝置的描述元。
/** * Returns the description of the physical camera device that backs this * logical camera. * * If a requested device does not either exist or back this logical device, * this method returns a null camera descriptor. And, if this is called on * a physical camera device, this method is the same as getCameraInfo_1_1() * method if a given device ID is matched. Otherwise, this returns a * null camera descriptor. * * @param deviceId Physical camera device identifier string. * @return info The description of a member physical camera device. * This must be the same value as reported by * EvsEnumerator::getCameraList_1_1(). */ getPhysicalCameraInfo(string deviceId) generates (CameraDesc info);
設定多相機支援
所有邏輯攝影機都必須以靜態方式定義,並透過設定管理員實作項目進行列舉。由於 EVS 允許群組中的每部裝置設定不同,因此 EVS 會提供成員裝置清單,並指出是否同步處理圖像擷取作業。
<!-- camera group 0 --> <group id='group0' synchronized='CALIBRATED'> <caps> <!-- list of supported controls supported by all physical devices --> <supported_controls> <control name='BRIGHTNESS' min='0' max='255'/> <control name='CONTRAST' min='0' max='255'/> </supported_controls> <!-- list of stream configuration supported by all physical devices --> <stream id='0' width='640' height='480' format='RGBA_8888' framerate='30'/> </caps> <!-- list of parameters --> <characteristics> <parameter name='REQUEST_AVAILABLE_CAPABILITIES' type='enum' size='1' value='LOGICAL_MULTI_CAMERA' /> <parameter name='LOGICAL_MULTI_CAMERA_PHYSICAL_IDS' type='byte[]' size='2' value='/dev/video3,/dev/video4' /> </characteristics> </group>