Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shrunken Image after Migrating TFLite packages #28

Open
mlopez0 opened this issue Dec 2, 2021 · 3 comments
Open

Shrunken Image after Migrating TFLite packages #28

mlopez0 opened this issue Dec 2, 2021 · 3 comments

Comments

@mlopez0
Copy link

mlopez0 commented Dec 2, 2021

Hi,

I recently migrated the TensorFlow lite packages to the lates version and I noticed this issue.

On the camera_view.dart

cameraController = CameraController(cameras[0], ResolutionPreset.low, enableAudio: false);

cameraController = CameraController(cameras[0], ResolutionPreset.medium, enableAudio: false);

cameraController = CameraController(cameras[0], ResolutionPreset.high, enableAudio: false);

The updated pubspec.yaml

  camera: ^0.8.1+3
  tflite_flutter: ^0.9.0
  tflite_flutter_helper: ^0.3.0
  image: ^3.0.8
  path_provider: ^2.0.1
  image_picker: ^0.7.3
@bitsdominicada
Copy link

I had the same issue!

@mlopez0
Copy link
Author

mlopez0 commented Feb 21, 2022

has anyone been able to fix this? 🙂

@cuzyoucant
Copy link

If anyone is still looking for a solution,

In camera_view.dart, build method change
return AspectRatio( aspectRatio: cameraController.value.aspectRatio, child: CameraPreview(cameraController));
to
return CameraPreview(cameraController);

I dont know if there is a better solution, or why it broke in the first place, but it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants