FirebaseExtended / mlkit-material-android

ML Kit Showcase App with Material Design
Apache License 2.0
491 stars 143 forks source link

Preview size and FirebaseVisionImage bitmap size not matching #30

Closed Axrorxoja closed 4 years ago

Axrorxoja commented 4 years ago

Hi there, I have a problem with cutting image part because of when I send an image to the detector image frame metadata is 1280x720 and when came back ***Processor.onSuccess method it was 720x1280 when I write to log on com.google.firebase.ml.md.kotlin.barcodedetection.BarcodeProcessor line 51 Log.d(TAG,"metadata.w:${image.bitmap.width} metadata.h:${image.bitmap.height}") and com.google.firebase.ml.md.kotlin.camera.CameraSource 406 Log.d(TAG,"frameMetadata.w:${frameMetadata.width} frameMetadata.h:${frameMetadata.height}") you can see uploading/result image size inverting I check out in last source code

zhouyiself commented 4 years ago

Have you checked the value of rotation filed in the metadata?