We have moved to a new Sailfish OS Forum. Please start new discussions there.
146

[Xperia X] Camera autofocus or picture sharpness seems non-optimal

Tracked by Jolla (In release)

asked 2017-10-15 02:07:43 +0300

ajalkane gravatar image

updated 2017-10-19 23:41:29 +0300

pawel gravatar image

First the good parts, the pictures taken with Sony Xperia X are much better than previous Jolla 1/C at least in regards to color reproduction.

However, while on first glance the pictures look quite a bit better, but when you inspect them a bit closer (like zooming slightly) they're quite blurry.

To me it seems like camera's autofocus doesn't choose optimal setting, because when I manually tap the screen to refocus there seems to be a sharper version before it settles to what is chosen for taking the picture with. I should note that the pictures I've compared with so far have been in-doors, so that may play part.

But I don't know about the details of camera magic. All I know is that I've compared pictures taken in same conditions with Sony Xperia X, Jolla C and some Huawei Android phone. The Huawei produced crisp detailed picture. Jolla C provided what it could, but it was crispier in details though more grainy than Xperia X. Xperia X gave good color reproduction but the picture was blurry, like it was slightly out of focus.

Since the camera in this device should be top-notch, I'll categorize this as a bug. But it'd be good to hear other's experiences as there's possibility it's just a problem with my device.

edit retag flag offensive close delete

Comments

I'm probably wrong, but I remember reading back in the days something like the top-notch image quality of the phone comes from limiting the resolution to lower than the maximum to kick in Sony's proprietary image enhancing technology that is available only on Android and requires the phone to have DRM-keys to work and if you lose the DRM-keys, the image quality goes down little bit due to missing the Sony's image enhancing.

avhakola ( 2017-10-15 02:37:07 +0300 )edit
2

That is true. The missing DRM-keys knock the resolution down from 23Mpix to 16Mpix, but that doesn't explain the lack of sharpness in the pictures I'm witnessing. Jolla C had 12Mpix, the Android phone had also 16Mpix.

I don't think the missing megapixels are the culprit.

ajalkane ( 2017-10-15 02:40:36 +0300 )edit
8

Simply the focus doesn't work well, if you try to focus manually sometimes (not every time) you can get the focus work properly... And this is just 1 issue of the lots with the camera. I noticed also if you change the light options maybe you can get better results, but this seems like a gambling. The thing is, most of the times in android I could get the best result with the automatic option, now I need to change the light settings + tap for the focus even more times until I get better result, but still nothing similar then before... + Video recording no comment...

liqquid ( 2017-10-15 03:07:30 +0300 )edit
3

Same here. Somehow the autofocus simply doesn't work as it should. Focus is slightly off in all test images I took so far. Especially at shorter distance where focus errors are more visible than at near infinity. In fact, the images of the front camera look sharper.

ziellos ( 2017-10-15 10:57:11 +0300 )edit
8

Jolla should pay somebody afap to get all the camproblems fixed. IMO its the biggest show stopper for sailfish. Ever wondered if its just the hardware which is crap or also the software. in the case of Xperia X its the software for sure...

h.berd ( 2017-10-15 15:23:14 +0300 )edit

14 Answers

Sort by » oldest newest most voted
0

answered 2018-06-03 16:55:58 +0300

jimjamz gravatar image

Not really the long-term answer you're looking for, but a temporary workaround if you're in a bind and need a fast and better result than what you're currently receiving.

  1. Just before taking your photo, switch to Video-Mode. The Video-Mode is much more capable of selecting a correct and continuous auto-focus from my experiences with it.
  2. Once the Video-Mode has auto-focussed, switch back to Photo-Mode.
  3. There will be a brief (and much better effort) from the auto-focus. Quickly, take your photo.

The better auto-focus from the Video-Mode carries over to the Photo-Mode for about 2 seconds. Once it settles and the lens idles, the Photo-Mode auto-focus will have another attempt. Make sure you take your photo before this happens!

edit flag offensive delete publish link more

Comments

its not only about the autofocus but the quality as well!

makarch ( 2018-06-03 21:56:10 +0300 )edit

In 2.20 there is no CAF for pictures anymore. This seems te be more reliable .

yomark ( 2018-06-03 23:17:29 +0300 )edit
0

answered 2018-06-03 15:51:21 +0300

makarch gravatar image

Any progress here?

Does anyone know if there is an Android or SFOS App, which brings a better result? I wanted to make some pictures this weekend during a music festival. I forgot my cam at home and the pictures I took with my Xperia X are really really dreadful.

edit flag offensive delete publish link more

Comments

1

I heard about Android's Opencam. You could try this.

wosrediinanatour ( 2018-06-03 16:08:56 +0300 )edit

Thx. I will!

makarch ( 2018-06-04 12:10:15 +0300 )edit
33

answered 2018-03-11 22:11:56 +0300

leszek gravatar image

updated 2018-03-23 16:13:58 +0300

As this issue was bothering me it got me experimenting with different default settings to improve the camera focussing with the default Jolla camera app. I can now confirm that disabling continuous focussing helps to imrprove the aquired focus with tap to focus dramatically. With this mode also half pressing the shutter button will refocus image. So you basically are getting the same as normal digital cameras call single autofocus mode. Only on half-press or tap to focus it will focus. Notice: This is just a workaround. Despite the fact I am in favor of adding a "single focus" mode so that continuous autofocus is not active all the time. Fixing the switching between autofocus and tap to focus would be also a nice addition for most users.

I created a demovideo also giving instructions on how to disable the autofocusing. You need developer mode enabled for it to work and I don't recommend it for novice users who don't know how to use vi :)

You can find the video here: https://youtu.be/KviNGJgUFFE

edit: Unfortunately this workaround has the down side that autofocus in video mode or focusing in general is disabled for video recording. So be aware of that if you also want to make videos to undo this workaround.

edit2: Here the instructions as requested (for those who don't like to watch the whole youtube video). Open a terminal on the device or connect via ssh to it. Open the configuration file with devel-su vi /etc/gst-droid/gstdroidcamsrc-0.conf and comment out

#6 = continuous
#7 = continuous

under the section [focus-mode]. Save the file (:wq!) and to make absolutely sure it works restart the mm-qcamera-daemon (ps aux | grep camera -> copy the pid from mm-qcamera-daemon and devel-su kill -9 PID)

UPDATE: There is a way better fix thanks for Andrew for mentioning it which set the camera to disable AF for Image taking but does not affect AF for video mode.
What you need to do is revert any changes from above. Edit the file /etc/dconf/db/vendor.d/jolla-camera-hw.txt with devel-su.
Within the file set focusDistanceValues to only 8 for the two image sections in the file. So it looks like this:

focusDistanceValues=[8]

Save the file and run devel-su add-oneshot dconf-update. Finally you need to restart the phone for the changes to apply.

edit flag offensive delete publish link more

Comments

Nice!! Thanks for the trick ;)

carmenfdezb ( 2018-03-12 10:01:17 +0300 )edit
5

I can confirm that the hack works as expected. Finally the Xperia X's camera behaves like a camera: half-pressing the shutter button triggers focusing, and focusing is locked once aquired.

Thanks for sharing.

What makes me thoughtful is why Jolla wasn't able to apply this simple fix since releasing Sailfish X?

It would be very nice to document the fix (commenting out two lines in a configuration file) here. I know about gathering clicks on youtube, but not everyone needs to watch 11 minutes of video for this.

ziellos ( 2018-03-12 11:07:57 +0300 )edit

Thanks for sharing! It is more usable for now.

poddl ( 2018-03-12 22:51:26 +0300 )edit

@leszek: In your video there is an 8 = manual. Maybe you should add it in your description when it is necessary, because it was not in the file on my Xperia?

SaimenSays ( 2018-03-12 22:57:44 +0300 )edit

@SaimenSays It is not necessary and is just a leftover from testing.

leszek ( 2018-03-12 23:13:48 +0300 )edit
0

answered 2018-01-27 23:28:35 +0300

LVPVS gravatar image

updated 2018-01-30 13:34:51 +0300

Hei,

These DRM certificates(?), do they have effect without the Android system on the device? I mean, are they used by the low level drivers(?) which we still have(?) under Sailfish? Or do the Android OS and the proprietary Sony applications use them?

I have the original TA partition of my Xperia X. If I could flash it back somehow, would my camera performance improve?

Just a few thoughts.

EDIT

Converted into an answer to get more attention.

/EDIT

LVPVS over.

edit flag offensive delete publish link more

Comments

I don't own Xperia, but if I have understood things correctly the DRM certificates works only with Sony's stock Android systems, but the benefits (or at least all of them) aren't limited to Sony's apps only. The keys are also wiped when you flash other OS' to the phone and they shouldn't even exists anymore on the phone if you flash SFOS or any custom Android version to the phone and you lose the benefits.

avhakola ( 2018-02-07 23:53:23 +0300 )edit

long story short, you can't restore TA without losing Sailfish.

lolek ( 2018-03-19 22:26:30 +0300 )edit
2

answered 2018-01-24 15:19:26 +0300

stef gravatar image

Does anyone have a colour problem on top off the focusing problem as well? Besides being unfocused, my indoor pictures all have a distinctly greenish tint to them. This is especially bad when usingvt

edit flag offensive delete publish link more

Comments

Didn't notice any colour problem so far. May be this is also related to the fact that I have immediately deleted most pictures due to missed focus.

ziellos ( 2018-01-24 16:46:52 +0300 )edit
1

When using the flash indoors the white balance is way off for me in Auto Mode (greenish like in your case). Setting it to Neon Light does give a lot better result in most cases.

seiichiro0185 ( 2018-01-24 17:32:04 +0300 )edit

Yes, for me, indoor pictures with flash also have a clearly off white balance in auto mode (yellowish I would say).

birefringence ( 2018-01-24 21:27:59 +0300 )edit

Yes, I have greenish/yellowish pictures, ugly, and focus problems as well. Sometimes the sharpness is better than with my Jolla 1, but the colours with the Xperia are worse. It is not only due to a malfunctioning of the campera: I have the same pictures on my Xperia as on my Jolla (SD cart). A red jacket becomes a pinkish red on the Xperia. Colours are now more candy colours, cheapish, not saturated. Green and yellow dominate.This is a huge disappointment, because I really wished to have a better camera on my phone. Now I take my ipad with me when I am going to make photos.

Kea ( 2018-01-25 02:34:40 +0300 )edit

seiichiro0185 - thank you for the tip! playing with the white balance does help. I don't seem to have a neon setting though, is that an extra you installed?

stef ( 2018-01-25 10:35:40 +0300 )edit
13

answered 2018-01-23 17:04:34 +0300

ghling gravatar image

Sony updated their AOSP blob which hopefully also fixes the camera issues:

2018-01-19: Update of AOSP Nougat binaries (Android 7.1 – Kernel 4.4) for Xperia X and Xperia X Compact, Xperia XZ Premium, Xperia XZ1 and Xperia XZ1 Compact, Xperia XZ, Xperia XZs and Xperia X Performance. The following updates has been done for all devices: Adreno update, Vulkan update and various improvments; camera AF, AEC, AWB, and AGPS enhancements; configuration is loaded from vendor/etc.

Let's hope Jolla will publish an update with the new blob soon.

edit flag offensive delete publish link more

Comments

2

I do hope it will help. I'm willing to sacrifies a lot to get sailfish x as my daily driver, but not the camera quality.

gmelchett ( 2018-01-23 21:10:34 +0300 )edit
1

That update has kernel 4.4 and current SailfishX has 3.10. That is a bigger step

binutzu ( 2018-01-24 17:44:25 +0300 )edit
1

answered 2018-01-23 16:29:33 +0300

zash1958 gravatar image

updated 2018-01-23 16:30:05 +0300

As I read on the german SFOS Forum the problem resides in the camera driver. And if this is true NO camera app can give You better results. I have tested a bunch of camera apps forward and backwards. All with the same result: Ugly and unfocussed pictures. And the problem is way bigger in bad ambience light. Quality like a 75€ shit-android phone.

So it may be uncertain if we EVER get a better camera result. It depends on the SONY driver from their Open Devices program.

edit flag offensive delete publish link more

Comments

2

Of course you can adjust picture quality in software and correct slight autofocus issues. It's probably just not as effective as when you do this with the hardware itself. But a lot of the actual picture quality from the Sony devices are archived via software enhancements (which is why we lose them when unlocking the device). But there is nothing preventing us from recreating those features (except probably knowledge).

Regarding the Sony drivers, there has been a recent update for AOSP (see my recent post). So let's hope we will see an update from Jolla soon.

ghling ( 2018-01-23 17:09:55 +0300 )edit

It is possible to slightly enhance soft pictures by sharpening. But it is not possible to compensate for missed focus by software corrections.

The current implementation of the autofocus algorithm (in the main camera's driver) results in missed focus in nearly all pictures. In my tests the situation is the same with all camera apps (native and Android-based).

It's interesting that the results of the front camera are far better regarding to focus accuracy. This also indicates that the problem is in the driver, not in the apps.

ziellos ( 2018-01-24 16:06:26 +0300 )edit
5

answered 2018-01-23 10:48:34 +0300

tomtom gravatar image

I use the Android app "Camera" from simplemobiletools.com, installed though F-Droid.

The previous version hat to much JPEG compression and the quality suffered. The developer is a great guy. I asked if he could make a setting for the JPEG quality and he did :)

The new version has bugs and gliches, but the quality is acceptable for me when setting quality 95%.

The format is 5984x3392 versus 5312x2988 of the Sailfish camera app. And it takes 4K videos.

I made a small donation, seemed to be fair.

Comparison: image description

edit flag offensive delete publish link more

Comments

The differences are huge !! I´ll give it a try.

campeon ( 2018-01-23 10:59:46 +0300 )edit
1

Tested it. Works nearly as bad as the original Camera. Focussing is a big problem and did work 1 time out of 10. Sharpness and picture quality is FAR away from that what the camera from Sony con deliver. Up to now camera in SFOSX is a big shame and neraly unusable

zash1958 ( 2018-01-23 14:04:18 +0300 )edit

@zash1958

Ah! That's interesting. I get the focus every time right, although the auto focus is very nervous between the moment I press the shutter and the picture is taken. And I never get it 100% right on 4K videos. Are they differences in the hardware, or something else? I have the F5122 dual sim.

And, yes, I agree, the picture quality of the original Sony Android camera app is far better.

Could somebody please take pictures with the app "Camera" from simplemobiletools.com on the original Xperia X before installing Sailfish?

tomtom ( 2018-01-23 16:24:07 +0300 )edit

I'm running Android Nougat right now, and tried the app... It looks the same even if i took the photo with the stock camera app

appcamera

carmeloferso ( 2018-01-23 23:10:29 +0300 )edit
8

answered 2017-12-10 17:07:46 +0300

Loenneberga gravatar image

updated 2017-12-10 17:09:17 +0300

Well, I'am having the same problem with the stock camera app. At least for photos I found a solution. The app MiracuCam from the Jolla store makes much better photos on my Xperia X. It's supposed to be a filter app, but it also saves the original photo. So frankly I'm wondering why the dev of this app is able to build a well working software, but Jolla seems to be unable to do so. Somehow the MiracuCam dev seems to have found a solution for the focussing issue. Why not implement it in the stock app? For the videocamera there is still no solution. I would like to have manual focussing and focus lock, but I don't know if this will ever come true on Xperia X.

edit flag offensive delete publish link more

Comments

5

As a technical explanation. The issue is actually in the driver not the software. You just experience a difference in miracucam as it has autofocus deactivated and locks focus on whatever you tap. The default camera app does not have this feature. it will autofocus all the time even if you tap to focus on something it adjusts accordingly if necessary. So yes I can reproduce misfocussing with miracucam aswell.

The underlying driver optimizations (is the aosp driver for the cam even opensource?) or fixes are necessary. Also Jolla however could ease the pain by providing a feature that allows locking focus. So if we find a good focus we can lock it for taking the picture. In general the camera app does need an expert mode.

leszek ( 2017-12-10 23:39:18 +0300 )edit

Thx for your expalantion, which could be considered an answer on it's own: "Also Jolla however could ease the pain ... "

Loenneberga ( 2017-12-11 18:30:38 +0300 )edit
1

answered 2017-11-27 15:12:59 +0300

TomC gravatar image

Sample pictures with different focus settings:

https://together.jolla.com/question/171108/sample-pictures-from-xperia-x/?answer=174965#post-id-174965

edit flag offensive delete publish link more

Comments

The Xperia is much brighter than Jolla 1. That is the first thing I noticed. But all the icons are less saturated in colour than the icons on the Jolla 1. They are bigger of course. But also the colours itself have changed: more pink, more yellow, greenish. Blue is difficult. A red jacket on a picture on Jolla 1 becomes a pink one on the Xperia. A blue ambiance on Jolla 1 becomes greenish on the Xperia. Not good. About taking pictures: the autofocus on Xperia is a bit slow. Pictures that I made indoors are better than the pictures made by Jola 1, but , again, they are yellowish, not natural. I think the software should be improved in order to get really better pictures.

Kea ( 2017-12-27 22:16:11 +0300 )edit
Login/Signup to Answer

Question tools

Follow
36 followers

Stats

Asked: 2017-10-15 02:07:43 +0300

Seen: 10,004 times

Last updated: Jun 03 '18