0

I'm building a tester app using the Camera2 API. Some devices show the following issues, but the angle of view of the image is different in 1920x1080 and 1280x720 resolutions.

I think that the angle of view should be the same because the ratio of the two images is the same.

These same issues will appear in the apps I created and the same results will be seen when I test them with the OpenCamera app by Mark Harman on PlayStore.

This image is captured with the OpenCamera app (https://play.google.com/store/apps/details?id=net.sourceforge.opencamera).

The device we tested is Galaxy J7.

Galaxy S6, 7, 8 and 9 have the same angle of view in both resolutions.

Could the Galaxy J7's HAL implementation be wrong?

(1280x720) enter image description here

(1920x1080) enter image description here

  • Note that both images are 1280×720. This means that with 1920×1080 something went wrong. Maybe this phone doesn't support such picture resolution (but lies that it does). Check if you can get 1920×1080 jpeg from the built-in camera app. – Alex Cohn Jul 04 '19 at 14:34
  • The image is a preview of the image captured. The built-in camera app correctly previews the image at 1920x1080, which is presumably not the Camera2 API internally. One thing is suspicious is that the resolution of this device is 1280x720. It seems to be an issue because the resolution of the device itself is lower than 1920x1080. I would appreciate your feedback. – SKWyverns29 Jul 05 '19 at 09:05
  • Ok, so this explains the distortion and the resolution of https://i.stack.imgur.com/dsBPv.jpg. The display resolution of 1280×720 does not mean that necessarily higher resolution camera images will be distorted. – Alex Cohn Jul 06 '19 at 16:40
  • So what is the problem? The same issue has been seen with Google's sample app. (https://github.com/googlesamples/android-Camera2Video) – SKWyverns29 Jul 08 '19 at 01:02
  • additional, Galaxy J7(2017 ver. modelName : J730K)'s device resolution is 1920x1080. However, the same issue appears in Galaxy J7(2017 ver. modelName : J730K). The device we tested earlier is Galaxy J7 (2016 ver. modelName : J710K). – SKWyverns29 Jul 08 '19 at 03:05
  • This only means that this device has a bug in camera HAL. Not the first one, not the worst one. If they have LEGACY camera2 level, use the deprecated Camera API: this will avoid at least some bugs introduced by the camera2 emulation. – Alex Cohn Jul 08 '19 at 10:30
  • 1
    Galaxy J7(2016 ver , 2017 ver) is LIMITED Level. It seems H/W Issue... – SKWyverns29 Jul 09 '19 at 00:53
  • Are you sure you can get `1920x1080` Resolution using Camera2 Api on J7? I think not, and it's `1440x1080` instead of `1920x1080`, check this https://github.com/googlearchive/android-Camera2Basic/issues/123 So on some devices with legacy camera you can get Full HD preview only using legacy camera api, so it's about ratio but resolution itself, also here https://stackoverflow.com/questions/31362202/android-camera2-output-sizes#comment50709560_31362202 – user924 Feb 28 '21 at 22:00

1 Answers1

0

Are you sure you can get 1920x1080 Resolution using camera2 on Galaxy J7?

I believe you get 1440x1080 instead of 1920x1080 using camera2 API, check this github.com/googlearchive/android-Camera2Basic/issues/123

So on some devices with legacy level camera you can get Full HD preview only using legacy Camera API, so it's not ratio but resolution itself

Also here Android Camera2 Output sizes

So Galaxy J7 doesn't support camera2 fully - Legacy level, and not Limited, Full or 3 level

val isLegacyLevelCamera = cameraCharacteristics(context, cameraIdx)
               .get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL) 
               == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY

So if it's legacy level - use legacy Camera API otherwise you won't get Full HD resolution on some devices with legacy level camera using camera2 API

user924
  • 8,146
  • 7
  • 57
  • 139