openIndex method

bool openIndex(
  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

bool openIndex(int index, {int apiPreference = CAP_ANY}) {
  return using<bool>((arena) {
    final success = arena<ffi.Bool>();
    cvRun(() => cvideo.VideoCapture_OpenDeviceWithAPI(ref, index, apiPreference, success));
    return success.value;
  });
}