extractFeatures method

  1. @override
Future<List<List<double>>> extractFeatures(
  1. Uint8List imageBytes
)
override

Implementation

@override
Future<List<List<double>>> extractFeatures(Uint8List imageBytes) async {
  final result = await methodChannel.invokeMethod<List<dynamic>>(
    'extractFeatures',
    {'imageBytes': imageBytes},
  );

  if (result == null) {
    return [];
  }

  return result.map((feature) {
    final featureList = feature as List<dynamic>;
    return featureList.map((value) => (value as num).toDouble()).toList();
  }).toList();
}