Convert CameraImage Stream to Bytes or File in flutter?

Viewed 716

I am trying to use google ml kit to process an image so i extract the left eye open probability, but it requires the input image to be either a file,bytes or file path, see below

final inputImage = InputImage.fromFile(file);

final inputImage = InputImage.fromBytes(bytes: bytes, inputImageData: inputImageData);

final inputImage = InputImage.fromFilePath(filePath);

it requires one of those above, i am trying to use a Camera image stream to achieve this,

 _cameraService.cameraController.startImageStream((image) async {
// i am trying to convert the image received here to be converted into either a File, Bytes, File path
}
1 Answers
Related