I am using the android camera API for a project I am working on at the moment and I came across a rather strange behavior. When I change the preview size to go to a higher resolution, I indeed get a much better quality preview but there is also this annoying zoom effect that occurs: Say I am holding my device at 5 cm from a object in 1024x512, I can see it entirely. But if I change to 1920x1080, It's like I've zoomed into the object and I need to go further away to capture it entirely. Now that's a bit disappointing as I want a higher resolution to get more details of my object but if I have to go further away from it then the sensor is not sensible enough to get those details. Is there something I misunderstood with the Camera API maybe?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
This could be a bug on your side, or a bug (or a feature, if you like) of the camera on your device. To check, register for preview callback (setOneShotPreviewCallback()), save the buffers that you receive in same position for different resolutions, and compare the images.
From my personal experience, going from 4:3 to 16:9 resolution often reduces the field of view. But in your example, both settings keep same aspect ratio.