Supporto multicamera

In Exterior View System (EVS) 1.1, è supportato il dispositivo fotocamera logico costituito da più dispositivi fotocamera fisici. Per utilizzare questo dispositivo virtuale, le implementazioni del dispositivo devono supportare il Synchronization Framework .

Enumerare, aprire e chiudere il dispositivo fotocamera logico

L'app può usare gli stessi metodi IEvsEnumerator per usare i dispositivi logici della fotocamera disponibili. L'oggetto EvsCamera restituito, che rappresenta un dispositivo fotocamera logico, deve contenere i seguenti elementi nei metadati:

  • ANDROID_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
    Se un oggetto EvsCamera restituito rappresenta una telecamera logica, i metadati della telecamera devono contenere questa chiave di funzionalità nel campo ANDROID_REQUEST_AVAILABLE_CAPABILITIES .
  • Il campo ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS elenca gli identificatori fisici del dispositivo della fotocamera.
  • Il campo ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE può avere uno dei seguenti valori enum:
    • ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE è per i sensori in modalità master-master, senza sincronizzazione hardware dell'otturatore/esposizione.
    • ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED è per sensori in modalità master-slave, sincronizzazione hardware dell'otturatore/esposizione. Le telecamere GMSL2 sincronizzate devono avere questo valore.

L'app può recuperare un descrittore dei dispositivi fisici della fotocamera tramite IEvsCamera nel nuovo metodo getPhysicalCameraInfo(stringcameraId) .

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

Configura il supporto multi-camera

Tutte le telecamere logiche devono essere definite staticamente e devono essere enumerate tramite un'implementazione del gestore configurazione. Poiché EVS consente a ciascun dispositivo del gruppo di essere configurato in modo diverso, EVS fornisce un elenco dei dispositivi membri e indica se l'acquisizione dell'immagine è sincronizzata o meno.

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

In Exterior View System (EVS) 1.1, è supportato il dispositivo fotocamera logico costituito da più dispositivi fotocamera fisici. Per utilizzare questo dispositivo virtuale, le implementazioni del dispositivo devono supportare il Synchronization Framework .

Enumerare, aprire e chiudere il dispositivo fotocamera logico

L'app può usare gli stessi metodi IEvsEnumerator per usare i dispositivi logici della fotocamera disponibili. L'oggetto EvsCamera restituito, che rappresenta un dispositivo fotocamera logico, deve contenere i seguenti elementi nei metadati:

  • ANDROID_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
    Se un oggetto EvsCamera restituito rappresenta una telecamera logica, i metadati della telecamera devono contenere questa chiave di funzionalità nel campo ANDROID_REQUEST_AVAILABLE_CAPABILITIES .
  • Il campo ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS elenca gli identificatori fisici del dispositivo della fotocamera.
  • Il campo ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE può avere uno dei seguenti valori enum:
    • ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE è per i sensori in modalità master-master, senza sincronizzazione hardware dell'otturatore/esposizione.
    • ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED è per sensori in modalità master-slave, sincronizzazione hardware dell'otturatore/esposizione. Le telecamere GMSL2 sincronizzate devono avere questo valore.

L'app può recuperare un descrittore dei dispositivi fisici della fotocamera tramite IEvsCamera nel nuovo metodo getPhysicalCameraInfo(stringcameraId) .

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

Configura il supporto multi-camera

Tutte le telecamere logiche devono essere definite staticamente e devono essere enumerate tramite un'implementazione del gestore configurazione. Poiché EVS consente a ciascun dispositivo del gruppo di essere configurato in modo diverso, EVS fornisce un elenco dei dispositivi membri e indica se l'acquisizione dell'immagine è sincronizzata o meno.

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