Git Product home page Git Product logo

Comments (9)

itahmad101 avatar itahmad101 commented on August 23, 2024 1

@Win546 inverted value of x and y on IOS right ?

from react-native-vision-camera.

mrousavy avatar mrousavy commented on August 23, 2024

I don't really understand the question here, this might be better off asked on the community discord.

from react-native-vision-camera.

Win546 avatar Win546 commented on August 23, 2024

yes, from what i understood, the x and y on ios are tilted, i think for the orientation of the camera (on android after the scaling the point are where they should be ),so when i scale with the camera resolution dosen't work as aspected.
Ios:
even if the view is vertical, the camera seems oriented in landscape, I notice this because by moving the camera up/down my point moves on my x axis, while by moving it left/right it moves on the y axis

from react-native-vision-camera.

itahmad101 avatar itahmad101 commented on August 23, 2024

I'm also can reproduce this bug(Iphone 6S iOS 15.8.2)

from react-native-vision-camera.

mlhtnc avatar mlhtnc commented on August 23, 2024

I am not sure if I understood the question right but comments are right. x and y values are inverted on ios. I updated to @4.3.2 few weeks ago and the problem still persist. Also width and height might be inverted too. On the other hand there is no problem on android.

from react-native-vision-camera.

Win546 avatar Win546 commented on August 23, 2024

yes, exactly what you said!
Any way i've changed my first approach and now i'm trying to use expo-camera but it's the same, android works well, ios tilted, the only one that seems to work it's expo-barcode-scanner, where the point are where the should be on ios !( but on android instead the camera preview it's not so good as the other pack, so i was conditionally render the correct scanner based on platform .
But it's not the right solution because expo-barcode-scanner it'll be deprecated from sdk 51, so i'm trying to find a solution for for expo-camera, without any success at the moment

from react-native-vision-camera.

mlhtnc avatar mlhtnc commented on August 23, 2024

I just inverted x, y and width, height values for ios as workaround and it's working fine. For android I just use values as it is. I was using the values to calculate if scanned barcode inside the rectangle or not.

from react-native-vision-camera.

mrousavy avatar mrousavy commented on August 23, 2024

VisionCamera exposes device.sensorOrientation, maybe you need to rotate that. Either way, I don't have the free time to look into this now. Maybe I can take a look at this in the future, we'll see.

from react-native-vision-camera.

mrousavy avatar mrousavy commented on August 23, 2024

Always open to PRs of course.

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.