Skip to content
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

[ncnn-android-yolov8] How to handle real-time detect when the view set orientation to "landscape" ? #5450

Open
chenchen-boop opened this issue May 7, 2024 · 1 comment

Comments

@chenchen-boop
Copy link

Anythimg work fine until i set the view orientation to landscape ,it will make preview rotate 90 degree.
I have tried setting
orientation = (int)e.data.i32[0]; ->orientation = (int)e.data.i32[0]- 90 ;
( inside ndkcamera.cpp: int NdkCamera::open(int _camera_facing)){ })
this make preview show correct, but the detect get wrong.
please help me !!!

(i think the key is inside ndkcamera.cpp,but I don't know exact how to do.)

source:https://github.com/FeiGeChuanShu/ncnn-android-yolov8

@zhenjing
Copy link

zhenjing commented May 8, 2024

use TinyEXIF https://github.com/cdcseacave/TinyEXIF to get JPEG Orientation, then rotate image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants