WeChatQRCode constructor
WeChatQRCode([])
Initialize the WeChatQRCode. It includes two models, which are packaged with caffe format. Therefore, there are prototxt and caffe models (In total, four paramenters).
Implementation
factory WeChatQRCode([
String detectorPrototxtPath = "",
String detectorCaffeModelPath = "",
String superResolutionPrototxtPath = "",
String superResolutionCaffeModelPath = "",
]) {
final arena = Arena();
final p = calloc<ccontrib.WeChatQRCode>();
final dp = detectorPrototxtPath.toNativeUtf8(allocator: arena).cast<ffi.Char>();
final dm = detectorCaffeModelPath.toNativeUtf8(allocator: arena).cast<ffi.Char>();
final srp = superResolutionPrototxtPath.toNativeUtf8(allocator: arena).cast<ffi.Char>();
final srm = superResolutionCaffeModelPath.toNativeUtf8(allocator: arena).cast<ffi.Char>();
cvRun(() => ccontrib.WeChatQRCode_NewWithParams(dp, dm, srp, srm, p));
arena.releaseAll();
return WeChatQRCode._(p);
}