Open Valentin-Rault opened 5 months ago
yeah, I saw that vision now supports the orientation. But I didn't have time to play around with it and see the changes in there. if you have a time, could you implement a proposal and create a PR for it? @Valentin-Rault
I will definitely take a look at it and play with it a bit
Little update here, as of react native vision camera v.4.4.0 the frame is back to the correct orientation of landscape-right. I am still having some issues with scanning though. Do you have the possibility to test @ismaelsousa? So I can see if it is an issue from the rest of my code. In the meantime I am starting to look into a way to support the orientation to not have this issue again in the future
hmmm, maybe your error is around this, isn’t ?
Because if you are trying to draw it and it's appearing in a mess way the frame can give you the rotation but the output of ML kit is rotated to that format. Try to update the native side with this properties and let me know the result :)
link to docs: https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setOutputImageRotationEnabled(boolean)
@ismaelsousa I have made a PR with a proposal to rectify this behaviour for ios
Hello, the author of react-native-vision-camera
has described how to fix the issue here: https://github.com/mrousavy/react-native-vision-camera/issues/3051
It seems to be one line of code.
Can you please fix this ASAP?
After upgrading to latest version of react native, react native vision camera and this library, the frame is now in a wrong orientation. The frame orientation is set to
portrait
but is actually inlandscape-right
. This results in needing to orientate the text to the right in order to be able to scan. A quick fix I tried is to setvisionImage.orientation = .right
instead of.up
, now the text is scanned properly when held upright in front of the camera.I realise that this issue is also coming from react native vision camera but shouldn't this library be able to handle different frame orientation?
Version: react native: 0.74.2 react native vision camera: 4.3.2 vision camera ocr: 3.0.1