ugu11 / camera_tutorial

Apache License 2.0
36 stars 11 forks source link

Capture image was flipped horizontal and had green screen #6

Open AnhPC03 opened 3 years ago

AnhPC03 commented 3 years ago

Thanks for your public code. I ran your code and had some issues that the image captured by Camera was flipped and had screen Screenshot_2021-01-07-17-20-28 Screenshot_2021-01-07-17-20-19

ugu11 commented 3 years ago

Interesting. I'll need to look into it then. It might be the C code that's causing it

AnhPC03 commented 3 years ago

@Hugand thanks for your fast reply. I had checked and realized that if i used android 7 or higher. It worked well excepted having green bar at the bottom, and that bar pushed the image. It seemed that the bar wasn't a part of image. If i used android 5, then the result was this issue i opened (green screen and flipped)

assanbayev commented 3 years ago

@Hugand please can take a look in that issue. I have the same issue

ugu11 commented 3 years ago

@assanbayev Yes of course. Can you provide more details on the device you're using and the android version?

assanbayev commented 3 years ago

@Hugand Hi. Thank you for responce. On xiaomi divices image has green bottom bar. on some huawei with android 8, galaxy s20 with android 11, samsung a51 with android 10 works well. Bun on xiaomi note 8,note 9, and on some redmi with android 9,10 it has the issue. on working devices u or v array length is equal to ((y array length)/2 -1) and on not working devices there's lack of u and v array bytes. For example in working image y = 307200, u = 153599, v = 153599 and in not working image y = 168592, u = 184271, v = 184271 WhatsApp Image 2021-03-25 at 7 53 45 AM

assanbayev commented 3 years ago

@Hugand Why there's additional bytes on xiaomi devices? I mean 480*720=345600 and its not what we have in y array 368592. I guess thats the problem