You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using resize mode contain, so black bars appear at the camera's start and end.
I want to find the (0, 0) point of the preview in screen coordinates, accounting for the black bars.
But everything I tried seems to return the incorrect position on the screen, so I'm either experiencing a missing ; moment or missing some of the correct information.
How are the black bars calculated? How can I find the X from above using the parameters available in react-native-vision-camera?
If anyone could provide a previewPointToScreenPoint function or a getBlackBarsHeight function, that'd be very appreciated.
maintenance-hansbot
changed the title
How to translate preview point to screen point with resizeMode contain?
💭 How to translate preview point to screen point with resizeMode contain?
Jun 11, 2024
New features, bugfixes, updates and other improvements are all handled mostly by Marc Rousavy in his free time.
To support Marc, please consider 💖 sponsoring him on GitHub 💖.
Sponsored issues will be prioritized.
Question
I am using resize mode
contain,
so black bars appear at the camera's start and end.I want to find the (0, 0) point of the preview in screen coordinates, accounting for the black bars.
But everything I tried seems to return the incorrect position on the screen, so I'm either experiencing a missing
;
moment or missing some of the correct information.How are the black bars calculated? How can I find the X from above using the parameters available in react-native-vision-camera?
If anyone could provide a
previewPointToScreenPoint
function or agetBlackBarsHeight
function, that'd be very appreciated.What I tried
No response
VisionCamera Version
4.0.5
Additional information
The text was updated successfully, but these errors were encountered: