-
-
Notifications
You must be signed in to change notification settings - Fork 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
feat: Implement Orientation #2932
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
fff23d7
to
3320df2
Compare
This seems like a breaking change for frame processors. For text recognition, the frame processor has to rotate the image to match the preview in portrait mode if it does not accept passing the orientation. Maybe adding an option to enable rotation is a good idea to make old frame processors compatible with the new version. |
Hm, I am not sure - I think for portrait nothing changed, but whereas frame processors previously didnt work when the phone is rotated, they now work. Not entirely sure though, need to test it... |
Hi @mrousavy, we trying to record the video in Landscape, but the output video is in Portrait. Whatever the orientation we are recording it is in Portrait only. We are running react-native-vision-camera in Android application, but it is not working. Hereby I have attached a sample code. Kindly help us with a solution. |
thanks @mrousavy! It seems |
@laxminarayana-capgemini The name of the orientation prop changed with this PR. |
What
Implements orientation for VisionCamera.
outputOrientation
), which specifies how VisionCamera should treat orientation:device
; use physical device orientation, even if screen is lockedpreview
; use preview orientation, respects screen-lockportrait
,landscape-left
,landscape-right
,portrait-upside-down
; locked to a specific orientationorientation
prop has been removed to avoid confusion. (it never really worked anyways)Frame.orientation
actually reflect it's relative orientation.CMSampleBuffer
s on iOS. This makes the video and frame processor pipeline much more lightweight and use less energy, as it now no longer physically rotates pixels in a buffer.Frame.orientation
now represents it's rotation relative to the target rotation (like on Android)Changes
Tested on
Related issues