-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
🐛 Frame orientation is in landscape-right when phone is held in portrait mode #3051
Comments
Guten Tag, Hans here. Note New features, bugfixes, updates and other improvements are all handled mostly by |
I do have the same issue, only on iOS |
IOS for me too |
Same, iPhone 11. |
Same issue on iPhone 14 Pro and "react-native-vision-camera": "^4.5.0". |
Blocking use of any frame processor with text recognition @mrousavy |
The problem is with a Frame Processor Plugin you are using, not with my library. I explained how In the case of react-native-vision-camera-text-recognition, he needs to update this If a Frame Processor Plugin wants to actually support rotation, they just need to add a parameter to their plugin where you can pass the current cc @gev2002 |
Hi @mrousavy , thanks for your reply and your time! As often happens, your comments are very useful and allow us to understand the situation and in some cases manage it. For example, your previous comment was very useful for me, because although I use another engine for OCR (this one: https://www.npmjs.com/package/@ismaelmoreiraa/vision-camera-ocr), it It was easy to find the file to edit in the plugin source (this file https://github.com/gev2002/react-native-vision-camera-text-recognition/blob/758041042d6608368fe2a41c38e3368c04f6b9c0/ios/VisionCameraTextRecognition.swift#L146-L151 a line 142) and insert the .right value instead of the .up value. This small change - which I'm still testing - seems to be enough to solve the problem. Thanks again for your time. |
Thank you. Yea the problem again was that |
Seems a good idea to give the plugin the raw value. |
Well it's both the same name unfortunately. I could rename it to something like |
Considering how easy is to "fix" the plugin(s) code, maybe it's better to leave the property name "orientation" and let:
|
We are using |
Hello @mrousavy, I've installed react-native-vision-camera-text-recognition@3.0.4 In the file android/src/main/java/com/visioncameratextrecognition/VisionCameraTextRecognitionModule.kt, I've modified the callback function and the getFrameRotation methods
You can see logs below (frame.orientation are same if I rotate the device) I don't understand why my frame is not rotated in my app You can see below my screenshots Camera without frameProcessor props : Camera with frameProcessor props : Below is the frameProcessor code
My app is locked in landscape mode "react-native-vision-camera": "4.5.0", |
@Flocurry did you manage to solve this? I'm having the same issue and can't find a way around this without having to change the native code 🤔 Btw, I think this is not a plugin issue, so it doesn't matter if you make changes to the plugin code. |
What's happening?
I want to scan text in portrait mode but the camera does not pick up anything only if the text is sideways or the phone is in landscape mode.
When logging out the frame.orientation it comes back as landscape-right when the phone is held in portrait
RPReplay_Final1720178652.1.mp4
Reproduceable Code
Relevant log output
Camera Device
Device
iPhone 12 Pro Max (IOS 17.5.1)
VisionCamera Version
4.4.1
Can you reproduce this issue in the VisionCamera Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information
The text was updated successfully, but these errors were encountered: