Multi-camera support

In Exterior View System (EVS) 1.1, the logical camera device that consists of multiple physical camera devices is supported. To use this virtual device, device implementations must support the Synchronization Framework.

Enumerate, open, and close logical camera device

The app can use the same IEvsEnumerator methods to use the available logical camera devices. The returned EvsCamera object, which represents a logical camera device, must contain the following items in the metadata:

  • ANDROID_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
    If a returned EvsCamera object represents a logical camera, its camera metadata must contain this capability key in its ANDROID_REQUEST_AVAILABLE_CAPABILITIES field.
  • ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS field lists physical camera device identifiers.
  • ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE field can have either of below enum values:
    • ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE is for sensors in master-master mode, no hardware shutter/exposure sync.
    • ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED is for sensors in master-slave mode, hardware shutter/exposure sync. Synchronized GMSL2 cameras must have this value.

The app can retrieve a descriptor of physical camera devices through IEvsCamera in the new getPhysicalCameraInfo(stringcameraId) method.

/**
 * 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);

Configure multi-camera support

All logical cameras are required to be defined statically and must be enumerated through a configuration manager implementation. As EVS allows each device in the group to be configured differently, EVS provides a list of member devices and indicates whether or not the image capture is synchronized.

<!-- 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>