estimatePoses method

Future<Person?> estimatePoses(
  1. Image image
)

Implementation

Future<Person?> estimatePoses(img.Image image) async {
  // CameraImageをMapに変換して、ネイティブ側に渡す
  final args = {
    _estimatePoseArgsImageWidth: image.width,
    _estimatePoseArgsImageHeight: image.height,
    _estimagePoseArgsImageBytes: image.getBytes(order: ChannelOrder.bgra)
  };

  final Map<dynamic, dynamic>? result =
      await _platform.invokeMethod(_invokeNameEstimatePose, args);

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

  final person = Person.fromJson(Map<String, dynamic>.from(result));

  return person;
}