inputNameToIndex method

int inputNameToIndex(
  1. String name
)

InputNameToIndex returns index of input blob in input array.

For further details, please see: https://docs.opencv.org/master/d3/d6c/classcv_1_1dnn_1_1Layer.html#a60ffc8238f3fa26cd3f49daa7ac0884b

Implementation

int inputNameToIndex(String name) {
  final cName = name.toNativeUtf8().cast<ffi.Char>();
  final p = calloc<ffi.Int>();
  cvRun(() => cdnn.cv_dnn_Layer_inputNameToIndex(ref, cName, p));
  final rval = p.value;
  calloc.free(p);
  calloc.free(cName);
  return rval;
}