Help - Search - Members - Calendar
Full Version: Sailfish and the camera module
OESF Portables Forum > Model Specific Forums > Gemini PDA > Gemini PDA - Sailfish OS
vader
The camera module accessory is detected by sailfish, however the camera app shows the image upside down. I made a quick hack of the camera qml file to get it displaying correctly, however it needs some work. I also noticed that the resolution of the photos is 1280x720 - obviously some default resolution. I am looking in to setting this properly and will create a patch/app/workaround when I get it working. Other than that it seems to work well.

Will post when I get it working.

Meganerd
Thanks for posting about this!

I was very curious since I am debating on getting the camera addition.
vader
Update: I have the rear camera displaying correctly, and the image is stored with the correct orientation (hard coded to landscape inverted). I have also managed to add the full sensor resolution. The only thing left is to select the rotation based on which camera (front/rear). Simple, but I ran out of time last night. The images are in line with what others have posted, however if you decrease the exposure, they seem to improve. I'll post the howto tonight and maybe Meganerd can add them to the list smile.gif
Meganerd
Definitely! I will credit you as well on the Gitlab repo

Did you compile the code from the SDK or was it a QML file you just modified to hard code the orientation?
vader
QUOTE(Meganerd @ Jul 4 2018, 08:04 AM) *
Definitely! I will credit you as well on the Gitlab repo

Did you compile the code from the SDK or was it a QML file you just modified to hard code the orientation?

I just had to modify the qml file, and change some settings in dconf. I've attached the camera qml file.

rename the attached CameraPage.txt to CameraPage.qml, then copy to

/usr/share/jolla-camera/pages/CameraPage.qml

remember to make a backup first.

Then change some settings to enable the full sensor, and make sure focus works. To change settings, in the terminal use:

dconf write /apps/jolla-camera/primary/image/imageResolution "'2560x1920'"
dconf write /apps/jolla-camera/primary/image/focusDistanceValues "[8, 4, 16]"

you can see all the modes with:

droid-camres -w /tmp/a.txt

Add/set the values as per this file to change things like video res etc. Remember the " around the ' character otherwise you will get an error.

Click to view attachment
Meganerd
Thanks Vader, I added it on my gitlab for anyone who comes across any of the other tutorial/info there.
vader
Update 2: the focusDistanceValues should be [ 8 ] instead of [ 8, 4, 16]. This disables continuous focus and means that when you focus with either the button or tapping the screen, then the focus stays where you set it.

4 = infinity
8 = autofocus
16 = continuous autofocus
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.