Rear camera does not focus

Help on issues you run into with LapTimer; in case you have a question on how to use LapTimer, use the forum "Using LapTimer" instead
Post Reply
stoneeh
Fewer than 10 Posts
Fewer than 10 Posts
Posts: 4
Joined: Fri Aug 07, 2020 3:27 pm

Rear camera does not focus

Post by stoneeh »

Hello.

I purchased and set up Harry's LapTimer Petrolhead today. Most of it works just fine, but I have encountered one significant problem: while the front camera would focus just fine, the rear camera just won't.

Test screenshots; rear camera:

Image

Front camera:

Image

I have tried many times, with various motives - here is a test video in-car. I have looked through the app settings, but cannot find anything related to setting camera focus; except the "keep autofocus" option, which suspiciously is greyed out:

Image

In other various camera apps, both cameras focus just fine and produce sharp clear images. The problem exists solely in Harry's LapTimer.

The phone is a Cubot KingKong Mini with Android 9.0.

Please assist.

Regards
Stoneeh
User avatar
Harry
Site Admin
Site Admin
Posts: 9985
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Rear camera does not focus

Post by Harry »

Hello,

Is the "Autofokus fixiert" disabled for the cam? Looks like. And do you get this disabled version for the front or rear cam? This means the cam does not allow the app to play with the focus. Besides this setting, LapTimer does not change any cam focus property. Often front cams (the one on the screen side) do not allow changing autofocus, but I have not seen this for rear cams...

Usually one will not fiddle with this setting. The cam will be in autofocus mode and adjust according to the field of view. The lock autofocus part has been added for users with too much of the engine hood (short distance) in the field of view (or very dirty windscreens). It allows you to fix the focus to the long distance by pointing the smartphone's cam to the horizon, press Fix Autofocus and by doing this, force the phone to stay like this independent from the field of view. You may want to repeat this (in case the button isn't disabled for the rear cam).

Otherwise the "KingKong" is probably not compatible with LapTimer. Please send a mail to Harry@gps-laptimer.de in this case and ask for a refund referring to this post.

- Harry
Image Image Image Image
stoneeh
Fewer than 10 Posts
Fewer than 10 Posts
Posts: 4
Joined: Fri Aug 07, 2020 3:27 pm

Re: Rear camera does not focus

Post by stoneeh »

Hello Harry.

Thanks for the quick reply. I love your software. I would really like to keep using it.

"Autofokus fixiert" is greyed out for both rear and front camera. If this means the app doesn't have access to the focus, that doesn't explain that the front camera finds focus just fine.

I have tried moving the camera around, or starting the video preview with the rear camera pointed in different distances. But it never does anything. The rear camera never even tries to find focus. It just stays blurred.
What I tried just now is to open the pre-installed camera app of the phone and Harry's LapTimer simultaneously; start the video in LapTimer, then switch over to the camera app to find focus, which it would then hopefully keep in LapTimer. The result was that once I switched from Harry to the camera app, the picture was blurred in the camera app too for a moment, but then would quickly re-focus; when I switched back over to LapTimer, the focus was lost again, and the picture blurry.

My intuition says this could be fixed. I may be wrong. But if you are willing, I could for example give you access to the phone via TeamViewer, so that you could maybe diagnose the problem? Or anything I can do to help.

Regards,
Stoneeh / Markus
User avatar
Harry
Site Admin
Site Admin
Posts: 9985
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Rear camera does not focus

Post by Harry »

Front cams often have a fixed focus. So instead of optimizing the focus, they use a preset valid for 1m to infinity. It is like the cheap pocket cams you have probably seen in the past. Opposed to this, rear cams have a variable focus optimized to get the field of view sharp.

I just checked the code and believe I understand what happens: LapTimer checks whether a cam has autofocus capabilities. In case it has, it triggers either the automatic mode or does a one time focus (in case you have set the setting shown in the snapshot). In case it has no autofocus capability, it does nothing - because a focussing activity is useless. Your smartphone reports it has no autofocus capability (which is wrong) for the rear cam, so LapTimer doesn't trigger a refocusing.

As there are thousand of Android models, I'm usually not able to work around device specialities. As the beta for v24 is ongoing currently, we can make an exception provided it is not getting a super complicated thing. Please join the beta version as described in viewtopic.php?f=11&t=5737. I plan to release one more version before production. I will add some logging code to this version so you can create a log as described in viewtopic.php?f=39&t=1933. You will need to enable the Video trace class when creating this log. To make sure: do not do create the log for the current beta. Wait until I release the next version. You will see a line in the change log of the next beta with something like "added additional tracing for autofocus".

- Harry
Image Image Image Image
stoneeh
Fewer than 10 Posts
Fewer than 10 Posts
Posts: 4
Joined: Fri Aug 07, 2020 3:27 pm

Re: Rear camera does not focus

Post by stoneeh »

Awesome, Harry. I will be on the lookout for the new beta and will be sending you the log.
User avatar
Harry
Site Admin
Site Admin
Posts: 9985
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Rear camera does not focus

Post by Harry »

I just recovered an expert setting I had actually forgotten about... Please try the Video Tweak "Use Fixed, Not Infinity Focus".

- Harry
Image Image Image Image
stoneeh
Fewer than 10 Posts
Fewer than 10 Posts
Posts: 4
Joined: Fri Aug 07, 2020 3:27 pm

Re: Rear camera does not focus

Post by stoneeh »

Thank you. I just tried it. No change. The setting does say though "when video focus is locked". Focus lock is disabled per default and the option is greyed out on my phone, so if I interpret the description correctly this expert setting won't even take effect in my case.
User avatar
Harry
Site Admin
Site Admin
Posts: 9985
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Rear camera does not focus

Post by Harry »

The beta with enhanced logging is online now. Follow instructions in viewtopic.php?f=8&t=5762&e=1&view=unread#p27870 and send the log to me. Beside selecting the named track class, make sure you capture when you enable video. So start logging, goto Timer, press Video, select internal cam change to Preview, return, disable video, send log.

- Harry
Image Image Image Image
User avatar
Harry
Site Admin
Site Admin
Posts: 9985
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Rear camera does not focus

Post by Harry »

Hello,

I cannot see any crash logs (as reported by mail) for your device in Google's developer system. Can you please check if you share diagnostics. On my Android 10 test device it is in Settings app ‣ Privacy ‣ Usage & Diagnostics.

- Harry
Image Image Image Image
Post Reply