Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

new FP2 camera: Pictures and Videos captured with the front camera will be rotated by 180 degrees #370

Closed
mariogrip opened this issue Dec 19, 2017 · 12 comments · Fixed by ubports/qtubuntu-camera#2

Comments

@mariogrip
Copy link
Member

mariogrip commented Dec 19, 2017

New camera module on FP2: Pictures and Videos captured with the front camera will be rotated by 180 degrees

@Flohack74 Flohack74 changed the title new FP2 camera: Pictures and Videos captured with the front camera will be rotated by 180 new FP2 camera: Pictures and Videos captured with the front camera will be rotated by 180 degrees Dec 19, 2017
@Flohack74 Flohack74 added this to the 16.04 OTA-4 milestone Dec 19, 2017
@NeoTheThird NeoTheThird modified the milestones: 16.04 OTA Backlog, 16.04 OTA-4 Jan 11, 2018
@derkleinemannvomfeldweg
Copy link

For Sailfish OS, new camera is working now. Could this possibly help?

@Flohack74
Copy link
Member

Yes it could, can you get infos what they did?

@Flohack74 Flohack74 added this to Accepted in Ubuntu Touch May 4, 2018
@NeoTheThird NeoTheThird modified the milestones: 16.04 OTA-4, 16.04 OTA-5 Jul 13, 2018
@wayneoutthere
Copy link

this was filed on Dec 17th... any hope in sight?
i'm on 16.04 with a FP2 and I get upside down selfies! boo hoo.

@mariogrip mariogrip modified the milestones: 16.04 OTA-5, 16.04 OTA-6 Sep 24, 2018
@5kup
Copy link

5kup commented Oct 13, 2018

Same here... 16.04 stable, and I also tried rc...

@wayneoutthere
Copy link

someone said if you remove the cam from phone and re-insert it can fix it... i haven't tried this but.. I'm getting close :(

@dark-eye
Copy link

is the rotation in the viewfinder or in the final capture? (or both? :))

@5kup
Copy link

5kup commented Oct 15, 2018

someone said if you remove the cam from phone and re-insert it can fix it... i haven't tried this but.. I'm getting close :(

I just tried... no effect. I was assuming that you meant taking of the cam the regular way, so turning off the phone and removing the battery first. Or should this be done with the phone turned on?

is the rotation in the viewfinder or in the final capture? (or both? :))
In both... and it s pretty annoying as you have to revert your moves to target your face! First reflex is to turn the phone 180 degrees from you hands, and of course that has no effect :-D.

@wayneoutthere
Copy link

lol! i thought it was just me suffering with that 'move'
yeah - both.
but... if you take the photo with the camera UPSIDE DOWN - the photo is correct in the captured image. pretty hard to make a handsome selfie that way :)

@mariogrip mariogrip modified the milestones: 16.04 OTA-7, 16.04 OTA-8 Dec 29, 2018
@luksus42
Copy link

someone said if you remove the cam from phone and re-insert it can fix it... i haven't tried this but.. I'm getting close :(

Nope, that did not fix it.
(And it is also not possible to turn around the camera within the camera-module, if you plan to put it all together afterwards ;-))

@peat-psuwit
Copy link
Contributor

After some digging in different codebases, I've found the following conclusions:

  1. The FP2 cameras' orientation: I can confirm that the new FP2 front camera is rotated differently than the old one, and it's reflected in Android's camera API, which is passed onto libhybris & QT (but more on this later) (1).
  2. Ubuntu Touch's support for camera orientation: it seems like the QT pathway of Ubuntu Touch's camera support always assume that the back camera is rotated 90 degrees counter-clockwise (2) and that the front camera is always rotated the other way around (3). Worst of all, both assumptions are made in different places (the first in camera-app, the latter in qtubuntu-camera).
  3. The special cases for BQ Aquaris E4.5 & E5: after asking with a QA member with an E5, it turns out that the reported orientation from it is the same as the new FP2 front camera module (4), yet photo & video captured from it does rotate correctly. Turns out, the orientation reported from the Android API is a lie and Ubuntu acknowledges this in Oxide source code (and also reveals that this applies to E4.5 as well) (5).
  4. Different schematic for Android's and QT's orientation: Android's camera orientation is defined as "the angle that the camera image needs to be rotated clockwise so it shows correctly on the display in its natural orientation" (6). However, QT's orientation is defined as "the physical orientation of the camera sensor" (7). qtubuntu-camera currently passes this value as-is from Android API and has to be fixed.

So, the following work is required:

  1. Update qtubuntu-camera to report orientation correctly, add the exception for E4.5 & E5, and remove the assumption about the "other way round" rotation (this should be done in the app).
  2. Update camera-app to take the corrected orientation into account, and revert the device's orientation for the front camera.

I'll take care of the first work, and may work on the second one if no one else does it after I finished the first one.

@peat-psuwit peat-psuwit assigned peat-psuwit and unassigned ricmm Jun 15, 2019
@peat-psuwit peat-psuwit moved this from Accepted to In Development in Ubuntu Touch Jun 15, 2019
@peat-psuwit peat-psuwit added this to In progress in OTA-10 Jun 15, 2019
@peat-psuwit peat-psuwit removed this from the 16.04 OTA-8 milestone Jun 15, 2019
Ubuntu Touch automation moved this from In Development to Quality Assurance Jun 26, 2019
OTA-10 automation moved this from In progress to QA Jun 26, 2019
@blaubaer01
Copy link

blaubaer01 commented Aug 5, 2019

I confirm after update to release package (OTA-10), the front camera works fine....
But with the main camera I have now an new issue, there I see only purple stripes.
After go back to OTA 9, main camera works fine... Update... it should be an failure by my camera.

@Dave1152000
Copy link

FP2
After OTA 10 both cameras orientation seems to be OK. Extreme slowness seems to be an issue and flash still not working

@jezek
Copy link

jezek commented Aug 10, 2019

FP2 (2019-W32) - Upside-down rotation fixed, inconsistency spotted. Extreme slowness and non working flash confirmed.

Inconsistency:
In camera app, after switching to front camera mode the picture I see is a mirror like picture. (This part is ok)
After making a photo, the resulting image has left and right sides flipped. (And here is the inconsistency)

@peat-psuwit
Copy link
Contributor

New FP2 camera's flash issue is tracked in #448. For the non-mirrored front camera image, that's expected. The captured image from the front camera will not be mirrored and will look like if someone looks at you.

For the slowness, I guess we can file a separated issue for that.

@UniversalSuperBox UniversalSuperBox moved this from QA to Done in OTA-10 Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Ubuntu Touch
  
Quality Assurance