StructuredEdgeDetection.create constructor
StructuredEdgeDetection.create(
- String model, {
- RFFeatureGetter? howToGetFeatures,
Implementation
factory StructuredEdgeDetection.create(String model, {RFFeatureGetter? howToGetFeatures}) {
final cmodel = model.toNativeUtf8().cast<ffi.Char>();
final p = calloc<cvg.StructuredEdgeDetection>();
howToGetFeatures == null
? cvRun(() => cffi.ximgproc_StructuredEdgeDetection_Create(cmodel, p))
: cvRun(() => cffi.ximgproc_StructuredEdgeDetection_Create_1(cmodel, howToGetFeatures.ref, p));
calloc.free(cmodel);
return StructuredEdgeDetection.fromPointer(p);
}