Git Product home page Git Product logo

Comments (24)

mrousavy avatar mrousavy commented on September 21, 2024 2

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.

rodgomesc avatar rodgomesc commented on September 21, 2024 1

whoaaa, all the weirdest stretches on the preview is solved in v4 beta 9 for me :/

from react-native-vision-camera.

mlecoq avatar mlecoq commented on September 21, 2024 1

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.

image

from react-native-vision-camera.

mlecoq avatar mlecoq commented on September 21, 2024

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.

ezebecke avatar ezebecke commented on September 21, 2024

I'm also experiencing this issue while testing 4.0.0-beta.11 on Galaxy A01

from react-native-vision-camera.

rodgomesc avatar rodgomesc commented on September 21, 2024

can you guys reproduce this on the example app in v4 branch?

from react-native-vision-camera.

mlecoq avatar mlecoq commented on September 21, 2024

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.

mrousavy avatar mrousavy commented on September 21, 2024

This is really weird, I haven't reproduced the stretching on any devices since V4.

from react-native-vision-camera.

mlecoq avatar mlecoq commented on September 21, 2024

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.

ezebecke avatar ezebecke commented on September 21, 2024

Sorry you all. After more testing, I realized I was setting the wrong photoAspectRatio.

from react-native-vision-camera.

mrousavy avatar mrousavy commented on September 21, 2024

@mlecoq how about you - are you using different photo sizes?

from react-native-vision-camera.

mlecoq avatar mlecoq commented on September 21, 2024

@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.

mlecoq avatar mlecoq commented on September 21, 2024

With the front camera it's easy to see the difference

from react-native-vision-camera.

mlecoq avatar mlecoq commented on September 21, 2024

The capture is good, on the preview I have an elongated face

IMG_2512

from react-native-vision-camera.

mlecoq avatar mlecoq commented on September 21, 2024

and the photoAspectRatio modifications don't change anything on the preview

from react-native-vision-camera.

mrousavy avatar mrousavy commented on September 21, 2024

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.

mlecoq avatar mlecoq commented on September 21, 2024

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.

mlecoq avatar mlecoq commented on September 21, 2024

when I use screen aspect ratio, the result looks worse (taken picture has a width of 720 and a height of 1600)

image

from react-native-vision-camera.

mlecoq avatar mlecoq commented on September 21, 2024

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.

ashfaq14060 avatar ashfaq14060 commented on September 21, 2024

Any solution about this issue?

from react-native-vision-camera.

TatvaKarnika avatar TatvaKarnika commented on September 21, 2024

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.
image
Did you found any solution?

from react-native-vision-camera.

TatvaKarnika avatar TatvaKarnika commented on September 21, 2024

Switching to beta version as mention in [https://github.com//issues/2583] solved my issue.

from react-native-vision-camera.

mrousavy avatar mrousavy commented on September 21, 2024

Switching to beta version solved my issue.

you're welcome 👍

from react-native-vision-camera.

n-ii-ma avatar n-ii-ma commented on September 21, 2024

Try this hack if you don't wanna install the beta version.

from react-native-vision-camera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.