0

Problem

I've recognized that the native 'LG' Camera2 App in the Lollipop API can manually focus nearer than any other app on the market. Not even 'Open Camera', which seems to use really all functions of the Camera2 API can focus that near.

I've searched through StackOverflow, Android Forums, Google and the source code of the native Android Lollipop Camera2 App and I've found nothing which explains this difference.

Is somebody out there who can explain, what does the 'LG' Camera2 app differently?

The question is

Is there another usable option beside 'LENS_INFO_MINIMUM_FOCUS_DISTANCE' which can be edit to adjust the focus manually?

More details

Currently I'm writing a camera app for my 'LG G4', which has a 'LENS_INFO_MINIMUM_FOCUS_DISTANCE' of 10.0. 'Android 5.x' currently has no setting to get the step width between 0.0 and 10.0. Whatever I've used as step width, it doesn't changed anything to the focus distance.

The device has SUPPORTED_HARDWARE_LEVEL: HARDWARE_LEVEL_FULL.
The REQUEST_AVAILABLE_CAPABILITIES are: BACKWARD_COMPATIBLE, MANUAL_SENSOR, MANUAL_POST_PROCESSING, READ_SENSOR_SETTINGS, BURST_CAPTURE and RAW.

Nevertheless the settings 'LENS_INFO_AVAILABLE_FILTER_DENSITIES' (0.0), 'LENS_INFO_AVAILABLE_FOCAL_LENGTHS' (4.42) and 'LENS_INFO_AVAILABLE_APERTURES' (1.8) are containing only one value and therefore they can't be changed.

The setting 'LENS_INFO_FOCUS_DISTANCE_CALIBRATION' reporting that the focus is 'CALIBRATED'.

There is even no difference, if I set the 'AF Mode' to 'Off' or to 'Macro'.

The setting 'LENS_INFO_HYPERFOCAL_DISTANCE' is a farce. It's only an info about a value, which can't be set or used for anything.

JoxTraex
  • 13,423
  • 6
  • 32
  • 45
Pixtar
  • 301
  • 6
  • 9
  • 1
    What exactly is the question? What do you mean the native camera2 app? Are you talking about the camera2basic example, or LG's stock camera app for their phone? Because if the latter, we have no way of telling you what they're doing... – rcsumner Aug 21 '15 at 16:11
  • Hi sumner, I thought the pre-installed camera app is the standard android camera app, but after your explanation it sound like it is an app developed by LG. The question is: Is there another useable option beside 'LENS_INFO_MINIMUM_FOCUS_DISTANCE' which can be edit to adjust the focus manually? – Pixtar Aug 23 '15 at 04:31
  • Well, to use manual focus at all via camera2, your device needs to have MANUAL_SENSOR in the android.request.availableCapabilities field. So you should check your CameraCharacteristics for this, and if it only has BACKWARDS_COMPATIBLE, you're out of luck. That's the first check, and then you just need to actually set the focus distance property with the desired value and turn off auto focus in your CaptureRequests. – rcsumner Aug 23 '15 at 19:12
  • Hi sumner, thanks for the input. I checked the device and it says: SUPPORTED_HARDWARE_LEVEL: FULL with REQUEST_AVAILABLE_CAPABILITIES: BACKWARD_COMPATIBLE, MANUAL_SENSOR, MANUAL_POST_PROCESSING, READ_SENSOR_SETTINGS, BURST_CAPTURE, RAW. I turned AF to OFF as written above, used LENS_INFO_MINIMUM_FOCUS_DISTANCE to get the desired value range and adjusted CaptureRequest.LENS_FOCUS_DISTANCE. I've added it into the post. Any other hints what can be done to focus some nearer? – Pixtar Aug 24 '15 at 04:47
  • @Pixtar Your post is really horrible formatted, please make it more readable, don't make us have to do more work with our eyes than we should... I've taken the liberty of formatting it to make it more readable. Please only use bold when you want to emphasize something, don't over-add it. Please try to simplify your questions into bullet points and organize it more cleanly. – JoxTraex Aug 29 '15 at 06:25
  • @Pixtar I dont believe the source for LG's version of the Camera2 application is openly available, so figuring that out may be a little difficult, if not impossible. However; if you can get the apk it can be decompiled. – JoxTraex Aug 29 '15 at 06:34
  • Hi JoxTraex, thanks for the formatting. For me it wasn't that bad ^^. Anyways, thank you for the tip with the apk and the option to decompile it. Currently the best hint I got so far. Have a nice day. – Pixtar Sep 01 '15 at 04:23
  • 1
    I have some successes with LG's camera app. I used the app [Apk Share](http://www.9apps.com/android-apps/Apk-Share-and-Backup/) to backup the app. Next I used the java software [Apktool](http://ibotpeaches.github.io/Apktool) to decompile the apk, but the LG framework where missing, which I found under "system/framework/lge-res/lge-res.apk". Now I was able to decompile the app to Smali code, which can't be read very easily. Next step would be to build a new debug apk file to debug the file with Netbeans or IntelliJ. – Pixtar Sep 01 '15 at 09:32

0 Answers0