Comments (24)
Hey - I think this issue has been fixed in VisionCamera 4.0.0. 🥳
Please try V4 and let me know if you still experience this issue;
- if not, please consider 💖 sponsoring me on GitHub 💖 to support the development of VisionCamera and thank me for my time spent on fixing bugs and building new features.
- if you still see this issue, please comment and we can re-open this. But please update your native logs with the native (Xcode/Android Studio) logs from running VisionCamera V4 so I can investigate this.
from react-native-vision-camera.
whoaaa, all the weirdest stretches on the preview is solved in v4 beta 9 for me :/
from react-native-vision-camera.
what also surprise me (but there is maybe a technical limitation), is that given photoAspectRatio
is not applied on taking a picture.
For example I have set a ratio of 0.625 (like preview in the capture below) and the taken picture has a width of 720 and a height of 1280, so a ratio of 0.5625 (it's why we see black stripes on the captures image)
So what you see with preview is not what you get. For the moment I mitigate this by cropping the image (to have expected ratio) but the result is zoomed in.
from react-native-vision-camera.
I think it's more visible because I'm using a tablet but I also see small differences on my redmi
from react-native-vision-camera.
I'm also experiencing this issue while testing 4.0.0-beta.11 on Galaxy A01
from react-native-vision-camera.
can you guys reproduce this on the example app in v4 branch?
from react-native-vision-camera.
can you guys reproduce this on the example app in v4 branch?
I have just tested with example app. First I didn't reproduce the issue (even if I have a small preview with a ratio of 0.625), but then I have tried to have a similar display as my example : preview and result on the same screen. And now I reproduce the issue, particularly when I remove frame Processor
Here is the CameraPage I use in the example app on v4 branch to reproduce the issue:
https://gist.github.com/mlecoq/94ffbfb4803cddea58860e379d9a5eb6
from react-native-vision-camera.
This is really weird, I haven't reproduced the stretching on any devices since V4.
from react-native-vision-camera.
Maybe I am not using correctly react-native-vision-camera but everything is fine on iOS so I was expecting a similar behavior on android
from react-native-vision-camera.
Sorry you all. After more testing, I realized I was setting the wrong photoAspectRatio
.
from react-native-vision-camera.
@mlecoq how about you - are you using different photo sizes?
from react-native-vision-camera.
@mrousavy in the example I made (see https://github.com/mlecoq/VisionCameraPreviewIssue), I use as aspectRatio the same one as used to display preview and taken picture
In the example of react-native-vision-camera
I have seen that used aspect-ratio depends on screen size, so I have tried with it (see gist here #2690 (comment)) but I have still the issue
from react-native-vision-camera.
With the front camera it's easy to see the difference
from react-native-vision-camera.
The capture is good, on the preview I have an elongated face
from react-native-vision-camera.
and the photoAspectRatio modifications don't change anything on the preview
from react-native-vision-camera.
Yea because photo size doesn't have anything to do with the video stream.
I think what you're seeing is all expected.
from react-native-vision-camera.
Do you mean that there is an issue on how I use ? Because I don't see this preview issue on iOS with the same code and on my Redmi neither.
from react-native-vision-camera.
when I use screen aspect ratio, the result looks worse (taken picture has a width of 720 and a height of 1600)
from react-native-vision-camera.
I am wondering if this https://developer.android.com/media/camera/camerax/configuration?hl=en#crop could be used to solve this issue
from react-native-vision-camera.
Any solution about this issue?
from react-native-vision-camera.
Hi everyone,
I'm also facing the same preview stretched issue on stock android device, for other device and for ios it is working fine.
Did you found any solution?
from react-native-vision-camera.
Switching to beta version as mention in [https://github.com//issues/2583] solved my issue.
from react-native-vision-camera.
Switching to beta version solved my issue.
you're welcome 👍
from react-native-vision-camera.
Try this hack if you don't wanna install the beta version.
from react-native-vision-camera.
Related Issues (20)
- ✨ Built-in RTMP Support in React Native Vision Camera HOT 5
- 🔧 Crash on build on android HOT 4
- 🐛 Cannot scan large Aztec code on Android HOT 2
- 💭 HOT 3
- 💭 How to set a React state from a Frame processor? HOT 3
- 🐛 frameProcessor and codeScanner are not working together on android HOT 3
- 🐛 Camera preview blank screen when using Skia Frame Processors HOT 5
- 🐛 Device torch flashing when takePhoto function called HOT 4
- 💭 Image Compression and Frame Processing Question HOT 3
- 💭 Fatal Error on App Initialization: IllegalArgumentException - width must be positive in CameraDeviceDetails.getFormats HOT 5
- 🐛 Unable to scan code-39 barcode. HOT 2
- 💭 V3 is not reading Data-Matrix codes with black background on Android. HOT 4
- 🐛 [4.5.3] Google Api Error: Invalid request - Your app declares support for 'riscv64' architecture, but the following libraries are missing HOT 21
- 💭 Can't find VisionCamera.xcodeproj as Readme HOT 3
- 🐛 InitializationException - Device reporting less cameras than anticipated HOT 7
- 🐛 Fatal Error on App Initialization: IllegalArgumentException - width must be positive in CameraDeviceDetails.getFormats HOT 1
- 🔧 v4.5.3 fails to build on Android - jetified-camera-core-1.5.0-alpha01/jni/riscv64/libimage_processing_util_jni.so is not an ABI HOT 12
- 🐛 TakePhoto() doesn't work with Android Emulator (Pixel 4 API 28, Pixel 4 API 31, Pixel 8 API 31) HOT 1
- ✨ Able to use this library detect QR code from the image HOT 3
- 🐛 Issue launching camera on iOS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-vision-camera.