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

Detection stops when the screen orientation is changed. #596

Open
yamamotokotaro opened this issue Mar 30, 2024 · 0 comments
Open

Detection stops when the screen orientation is changed. #596

yamamotokotaro opened this issue Mar 30, 2024 · 0 comments
Labels
Object Detection and Tracking Issues corresponding to Object Detection and Tracking API

Comments

@yamamotokotaro
Copy link

Title: Detection stops when the screen orientation is changed.

Describe the bug
When running the example app on iOS, object detection stops when the screen orientation is changed.
On Android, the detection continues without any problem.

To Reproduce
Steps to reproduce the behavior:

  1. Tap 'Vision APIs' and go to 'Object Detection' in example app.
  2. Change screen orientation

Expected behavior
Object detection stops and the last detection result continues to be displayed

Screenshots
スクリーンショット 2024-03-30 21 44 17

Platform (please complete the following information):

  • OS: iOS
  • Device: iPhone 15 pro max
  • OS: iOS 17.3.1
  • Flutte Versionr: 3.16.6
  • Plugin version: 0.11.0

Additional context
I added the orientation to VisionImage in the plugin's Object-C file, but the symptoms did not improve!
It seems that even if I change the screen orientation, the image byte data is still sent to the plugin's Object-C function, and the same detection results continue to be returned.

NSLog(@"metadataRotation: %@", metadata[@"rotation"]);
    if (rotation.intValue == 180) {
        visionImage.orientation = UIImageOrientationRight;
    } else {
        visionImage.orientation = UIImageOrientationUp;
    }
@fbernaly fbernaly added the Object Detection and Tracking Issues corresponding to Object Detection and Tracking API label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Object Detection and Tracking Issues corresponding to Object Detection and Tracking API
Projects
None yet
Development

No branches or pull requests

2 participants