openIndexAsync method

Future<bool> openIndexAsync(
  1. int index, {
  2. int apiPreference = CAP_ANY,
})

Opens a camera for video capturing with API Preference and parameters.

https://docs.opencv.org/4.x/d8/dfe/classcv_1_1VideoCapture.html#a10867868137c2d142aac30a0648d00fe

Implementation

Future<bool> openIndexAsync(int index, {int apiPreference = CAP_ANY}) async => cvRunAsync(
      (callback) => cffi.VideoCapture_OpenDeviceWithAPI_Async(ref, index, apiPreference, callback),
      boolCompleter,
    );