如何获得抖动图像的路径

时间:2020-08-03 17:15:11

标签: opencv flutter

res = await ImgProc.adaptiveThreshold(await _croppedImage.readAsBytes(),
      255, ImgProc.adaptiveThreshMeanC, ImgProc.threshBinary, 11, 12);

// res is dynamic
  setState(() {
    imageNew = Image.memory(res);  // imageNew is a Image Class
  });

然后,我想将图像保存到文件夹中,以便我必须访问imageNew的路径,但我无法做到这一点。有什么办法可以访问imageNew路径

        File data = imageNew.path as File;
      String path = data.path;
    text = path.split('/');
    print(text.last);
    await _croppedImage.copy('storage/emulated/0/DigiScan/${text.last}');

我也尝试过这种方式,但是它也给出了空值

File imageNew = Image.file(res) as File;

0 个答案:

没有答案