Camera Development - Huawei P9 Plus Questions & Answers

Hey guys,
did any of you already had success in accessing the two cameras on the back? Using the camera app that Huawei provides I can select either the colour or the monochromatic camera (putting your finger over one of the cameras verifies that you can switch between both sensors), but when I try to access them through Java (using Android Studio) I am only able to access the colour camera. Even when I change to mono output (captureRequestBuilder.set(CaptureRequest.CONTROL_EFFECT_MODE, CameraMetadata.CONTROL_EFFECT_MODE_MONO);) I only get a monochromatic picture from the colour camera, not from the mono camera. I want to be able to switch between both cameras in my app.
Thanks in advance!

I found that the camera supports the following scene modes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 33, and 34. According to developer.android.com/reference/android/hardware/camera2/CameraMetadata.html only modes from 1 through 18 are documented. I assume that mode 33 or 34 could be the monochromatic camera, but I do not know how I switch to this mode. I am trying to switch with the following code, but somehow it does not work:
captureRequestBuilder.set(CaptureRequest.CONTROL_MODE, CameraMetadata.CONTROL_MODE_USE_SCENE_MODE);
captureRequestBuilder.set(CaptureRequest.CONTROL_SCENE_MODE, 33);
Checking with captureRequestBuilder.get(CaptureRequest.CONTROL_SCENE_MODE) confirms that the mode is 33, but I do not see any difference on my screen. Any ideas? Thanks!

Related

Camera Apps Can Tune Sharpening, Noise Reduction?

I'm considering buying the Nokia 8 but would first prefer to know whether or not the phone allows third party camera apps like Camera FV-5 or Snap Camera HDR to tune sharpening and noise reduction, or altogether switch these off.
Any Nokia 8 owners who have tried this and can tell if this works or not?
You can use any camera app you like
Thanks. I am sure that is true.
My question is specific. If I install a camera app that allows tuning post processing (sharpening and noise reduction), will this work on the Nokia 8?
Not all phone makers expose these controls in the camera APIs.
For example, Samsung's Galaxy phones equipped with Exynos chips does not permit tuning post processing while their SnapDragon models do this.
abubasim said:
My question is specific. If I install a camera app that allows tuning post processing (sharpening and noise reduction), will this work on the Nokia 8?
Click to expand...
Click to collapse
I have both Camera FV-5 and Manual Camera so I could check if such options are there if you tell me where to look as I don't recall seeing something like that in their preferences (I had Nexus 6P previously).
Thanks. I'll check when I reach home in a few hours.
revanmj said:
I have both Camera FV-5 and Manual Camera so I could check if such options are there if you tell me where to look as I don't recall seeing something like that in their preferences (I had Nexus 6P previously).
Click to expand...
Click to collapse
You can check in Camera FV-5. See my screenshots where to find sharpening. If you take a photo first before adjusting and then after with sharpening set to minimum: will you see difference in quality, when zooming in to 100% ?
abubasim said:
If you take a photo first before adjusting and then after with sharpening set to minimum: will you see difference in quality, when zooming in to 100% ?
Click to expand...
Click to collapse
Well, it is by default set to 0 here (all sliders in this window are) so I would have to manually change it to higher value in order to do any comparison.
Okay, thanks. So probably doesn't work then. I guess I need to consider other phones. ?
On my current phone (Asus PFS) it's set to almost zero but adjusting it has no effect on picture quality.
Ok, when I tried to move that slider it turned out it is impossible. So that fully answers your question
Just find an app that takes RAW images and use that. Then adjust said parameters to your heart’s content
I'd rather buy another phone that supports this.
If you have Camera2 API enabled in your phone, try Snap Camera - you can tune everything here. Just enable Camera2 API in the settings, then the noise is preserved. Adjustable sharpness, saturation etc... The only option missing here for me is long exposure mode. On my Redmi 4X it allows only 1" shutter time max (still I can get nice night pictures on ISO 250 with this interval).
Also, you can try FreeDCam and disable Wavelet Denoise in the settings to turn off noise reduction.
Finally, Google Camera port is really great camera app for daily usage, especially for HDR pictures - it uses Camera2 API by default and produces amazing shots with all details (subtle noise) preserved. Unfortunately, you can't adjust any of parameters like sharpness or saturation.
All those apps are tested on my Xiaomi Redmi 4x but it will hopefully work for you if your phone supports Camera2 API.
So you tested on a Xiaomi Redmi 4x but haven't tested on a Nokia 8?
Those features are very much dependant on whether or not the phone supports them. And no way of knowing without buying the phone and testing and then finding out the good or bad news.
So far the hints from previous posters above is that the Nokia 8 does NOT support full control over post processing.

[Guide] Wide angle Video Recording.

Dial *#*#1597#*#* on the dialer this will open the camera app. Switch to video mode, Click on the red letter on the right top Lens: Back (Dual)(0) double click on that until you get the Lens: Back (Wide)(3) . Recording works fine from there, but need to do the same every time you need the wide angle.
Thanks!! It works! You rock man!
This is actually super good alternative until Oneplus let us do it by default. Thank you.
The wide lens can only record at 1080p?
The quality in lower light is worse than default video, obviously. But great to have! Someone needs to make a shortcut or something that jumps straight into this, until OnePlus gives us the ability.
Looks like you can just double tap anywhere to switch which camera is used. Seems like this is debug mode for the Camera app. I wonder if this has been includes since 9.5.0 or recently added. Indicating OnePlus indeed started working on this feature.

Google camera 6.1 for Mate 9 (emui 9.1)

Guys I have tried a few versions of Google Cam and found a working version from celsoazevedo gcam portal.
The google cam version is 6.1 and works perfectly in emui 9.1 except night sightand portrait mode.
[MGC_6.1.021_BSG_Arnova-TlnNeun_Urnyx05-v4.4.apk ]
* Working - photo, video, photo sphere(to replicate wide angle images), lens blur, raw images, hdr+(its enabled but not too sure if works perfectly)
* Not Working - Night sight, Portrait (need to check configuration)
** make sure to change viewfinder format to YUV_420_888 and disable motion photo (if camera crashes after any changes and shows black screen restart phone and change config)
** Base config- back camera Pixel 3XL
Front camera Pixle 2XL
config Pixel2018 HW Zsl HDR
Great tip, FYI NightSight can work (not crash) if you enable Advanced->FIXES->Buffer fix....BUT it doesn't actually capture a picture
I can see a difference when I enable 36 frames for HDR+ else....not that much.
Also, the secondary back mono camera is never used
Licaon_Kter said:
Great tip, FYI NightSight can work (not crash) if you enable Advanced->FIXES->Buffer fix....BUT it doesn't actually capture a picture
I can see a difference when I enable 36 frames for HDR+ else....not that much.
Also, the secondary back mono camera is never used
Click to expand...
Click to collapse
yeah even I realized the HDR+ mode has only a slight difference even with 36 frames, unfortunatly the mono cam cannot be used just used only by the emui cam

How To Guide Camera hidden settings and features

Hi Everyone,
I love the camera of my MI11U. but there are a few tunings that I REALLY HATE!!! one of them is default beautify in selfie and portrait. taking photos of black objects (tried with GCAM which took a perfect shot). and a few minor others.
Searching here and there, I found a way to turn off and on some additional settings like beautify and some other functions. this will help whoever understand all these settings (not me ), so I thought to share this simple method and see your thoughts and outcomes. ***note that there are some settings are in Chinese***.
1 . go to file manager and go to phone storage....
2 . go to DCIM/camera
3 . make a new folder with the name mentioned below....
lab_options_visible
4 .save and exit.....
5 . go to settings and force stop the miui camera app....
6 . now launch the app.....
7 . go to camera settings menu of the app.....you will see new options available in there....
8 . just turn off beautify in portrait mode....
9 . come back....change to selfie mode....tap on the blue star.....now tap on clear.....
Hope this helps everyone to take better photos.
would much appreciate if we can share the benefits of these settings in order to get best results.
Wow, this is amazing. Thx
Hi Hassanaliyeh , which version of gcam do you use?
hassanaliyeh said:
Hi Everyone,
I love the camera of my MI11U. but there are a few tunings that I REALLY HATE!!! one of them is default beautify in selfie and portrait. taking photos of black objects (tried with GCAM which took a perfect shot). and a few minor others.
Searching here and there, I found a way to turn off and on some additional settings like beautify and some other functions. this will help whoever understand all these settings (not me ), so I thought to share this simple method and see your thoughts and outcomes. ***note that there are some settings are in Chinese***.
1 . go to file manager and go to phone storage....
2 . go to DCIM/camera
3 . make a new folder with the name mentioned below....
lab_options_visible
4 .save and exit.....
5 . go to settings and force stop the miui camera app....
6 . now launch the app.....
7 . go to camera settings menu of the app.....you will see new options available in there....
8 . just turn off beautify in portrait mode....
9 . come back....change to selfie mode....tap on the blue star.....now tap on clear.....
Hope this helps everyone to take better photos.
would much appreciate if we can share the benefits of these settings in order to get best results.
Click to expand...
Click to collapse
Thats great ...one Problem i dont Inderstand what are the Settings do...or make
adverglobal said:
Hi Hassanaliyeh , which version of gcam do you use?
Click to expand...
Click to collapse
I am using GCam Wichaya 8.1.101 V1.4
it is not perfect, original xiaomi camera is impressive with all functions and control of device way better than GCam. but GCam is better in some conditions and scenarios like taking a photo of a far black object or photos of people. with Xiaomi, far black objects will be like a void in a photo and no details at all in it, and beautify is so annoying. with GCam, both are better, but colours are less vibrant and saturated.
gorillalaci said:
Thats great ...one Problem i dont Inderstand what are the Settings do...or make
Click to expand...
Click to collapse
gorillalaci said:
Thats great ...one Problem i dont Inderstand what are the Settings do...or make
Click to expand...
Click to collapse
The reason I made this thread is to share experience and understand what exactly they do. I really do not know any other that beautify in portrait disables it for all camera modes and not only portrait.
I found the following over internet by someone tested them on Mi10 devices, and some features are not mentioned or were disabled with previous devices. hope it helps at a start.
Internal magic tools : activates internal tools to improve the quality of photos and videos.
Face detection : the mobile camera can recognize the face and frame it in a box to improve the result.
Hide face detection frame automatically : this option hides the box that appears when activating the previous option but keeps the improvements.
Beautify in Portrait mode : Activate beauty mode in all camera modes.
Turn on dual camera : turn on dual camera to enhance photos.
Turn on dual SAT camera – currently does not have a user function.
Turn on MFNR : when activated, the device takes 6 consecutive shots which when superimposed and eliminate the noise from the photo.
Turn on SR : with this option the resolution of the image is enlarged as if the sensor of the mobile were larger.
Turn on quick shot animation : activate the quick shot animation in the app.
hassanaliyeh said:
The reason I made this thread is to share experience and understand what exactly they do. I really do not know any other that beautify in portrait disables it for all camera modes and not only portrait.
I found the following over internet by someone tested them on Mi10 devices, and some features are not mentioned or were disabled with previous devices. hope it helps at a start.
Internal magic tools : activates internal tools to improve the quality of photos and videos.
Face detection : the mobile camera can recognize the face and frame it in a box to improve the result.
Hide face detection frame automatically : this option hides the box that appears when activating the previous option but keeps the improvements.
Beautify in Portrait mode : Activate beauty mode in all camera modes.
Turn on dual camera : turn on dual camera to enhance photos.
Turn on dual SAT camera – currently does not have a user function.
Turn on MFNR : when activated, the device takes 6 consecutive shots which when superimposed and eliminate the noise from the photo.
Turn on SR : with this option the resolution of the image is enlarged as if the sensor of the mobile were larger.
Turn on quick shot animation : activate the quick shot animation in the app.
Click to expand...
Click to collapse
Thanks for explaining the features.
Thanks for the tip. One of the options I really like to see is the ability to pick the metering type (full frame average, center weighted average or spot metering). Can be quite useful. Seems like center weighted is the default.
hassanaliyeh said:
The reason I made this thread is to share experience and understand what exactly they do. I really do not know any other that beautify in portrait disables it for all camera modes and not only portrait.
I found the following over internet by someone tested them on Mi10 devices, and some features are not mentioned or were disabled with previous devices. hope it helps at a start.
Internal magic tools : activates internal tools to improve the quality of photos and videos.
Face detection : the mobile camera can recognize the face and frame it in a box to improve the result.
Hide face detection frame automatically : this option hides the box that appears when activating the previous option but keeps the improvements.
Beautify in Portrait mode : Activate beauty mode in all camera modes.
Turn on dual camera : turn on dual camera to enhance photos.
Turn on dual SAT camera – currently does not have a user function.
Turn on MFNR : when activated, the device takes 6 consecutive shots which when superimposed and eliminate the noise from the photo.
Turn on SR : with this option the resolution of the image is enlarged as if the sensor of the mobile were larger.
Turn on quick shot animation : activate the quick shot animation in the app.
Click to expand...
Click to collapse
Where those options appears exactly?
I can't find after adding the folder and forcing close camera app
rowihel2012 said:
Where those options appears exactly?
I can't find after adding the folder and forcing close camera app
Click to expand...
Click to collapse
Just go to camera settings and scroll down.
hassanaliyeh said:
Just go to camera settings and scroll down.
Click to expand...
Click to collapse
Yes this way not working with android 12
rowihel2012 said:
Yes this way not working with android 12
Click to expand...
Click to collapse
Seems like you got a different device.
Bart3n said:
Wow, this is amazing. Thx
Click to expand...
Click to collapse
Got it working, not really sure what to change tho....
is it no longer available on android 12?
EvertonnDuarte said:
is it no longer available on android 12?
Click to expand...
Click to collapse
Tried on xiaomi.eu latest weekly and didn't work. There is a modded miui cam in a Telegram group. Can't give TG links since some butthurt people hate me and sharing TG links appears to be against the "rules". Just search up "Sevtinge's Mods". That cam got many more options to tweak for, especially the Leica stuff.

Question Any open source camera alternatives that support Note 10 Pro lenses

I've looked into this before, but curious if anybody's found any decent open source, or free, camera alternatives with support for the Note 10 Pro lenses. Not the decompiled ports of gcam, anxcamera, or leica camera.
There's Open Camera, but it doesn't support the lenses. The only one I've found so far that supports the lenses is FreeDCam, though the lenses are just numbered Front 1, and Back 0 - Back 6. And if you choose Back 6, it hangs.
david003 said:
I've looked into this before, but curious if anybody's found any decent open source, or free, camera alternatives with support for the Note 10 Pro lenses. Not the decompiled ports of gcam, anxcamera, or leica camera.
There's Open Camera, but it doesn't support the lenses. The only one I've found so far that supports the lenses is FreeDCam, though the lenses are just numbered Front 1, and Back 0 - Back 6. And if you choose Back 6, it hangs.
Click to expand...
Click to collapse
I have been using open camera and it does support all cameras in my device. They are indeed just numbered, and there are a few glitches, but it does work and takes great shots.
Make sure you have enabled camera2 api in settings.
I've installed OpenCamera again and selected camera2 api (I've tried that before, too). But I still don't see the lenses. Where do you select them?
A while ago i've used Snap Camera. Found it quite useful und extremely customizable.
Snap Camera HDR - Apps on Google Play
A Fast, Full Featured HDR Camera App, Gallery and Photo Editor.
play.google.com
I dont know if there is a free version available, since I thought this after testing it.
Does it support the extra lenses on the Note 10 pro?
I'm testing LineageOS now, and Open Camera does show the extra lenses with it, which I couldn't see with xiaomi.eu. It has a button to cycle through the lenses, though it still hangs on the last lens. I'll try using it for now, since I've used Open Camera before on my Note 4x, so I'm familiar with it.
From what I can see, these are the cameras/lenses available on the Redmi Note 10 pro that are exposed to Open Camera.
0 Main Back Camera
1 Front Camera
2 Depth Sensor (B&W) - not useful
3 Macro
4 Ultra Wide
5 Main Back Camera Better Quality Photos
6 unusable
7 unusable
8 unusable
Both 0 & 5 are the main back camera, but ID 5 produces significantly better photos. I'm not sure, but I suspect when accessed through ID 5 there's some internal pixel binning happening. ID 5 won't work for videos, though.
I was able to modify the source code to ignore ID's 2, 6, 7, 8 and change the order the cameras are cycled. So it cycles in this order when the multi-camera button is pressed:
0 Main Back Camera
5 Main Back Camera Better Quality Photos
3 Macro
4 Ultra Wide
The front/back camera toggle button still works as usual (and resets the back camera to 0, as usual).
This was the change I made to MainActivity.java. It requires Android Studio to change, build, and generate a new apk.
$ diff MainActivity.java MainActivity.java.new
402c402,415
< for(int i=0;i<n_cameras;i++) {
---
> int i=0;
> switch( preview.getCameraControllerManager().getFacing(i) ) {
> case FACING_BACK:
> back_camera_ids.add(i);
> break;
> }
> i=5;
> switch( preview.getCameraControllerManager().getFacing(i) ) {
> case FACING_BACK:
> back_camera_ids.add(i);
> break;
> }
> for(i=0;i<n_cameras;i++) {
> if(i != 0 && i != 2 && i < 5) {
413a427
> }
I did some more testing with Open Camera and cameras 0 & 5. I'm still not sure what the difference is, but camera 5 has a longer exposure in auto mode, and results in a brighter picture that seems to have less noise. But the lighting/exposure is not always accurate. It can be much brighter than the actual scene. It does work well for night shots, though (better than HDR).
I also found "Photon Camera" that is open source and does nice HDR shots.
[APP][CAMERA][ANDROID 8.0+][ARM64] PhotonCamera - Enhanced algorithms camera
PhotonCamera is ongoing alpha project what developed by our team including Urnyx05, Savitar and others developers. It is aimed at making advanced algorithms for photos available and able to be modified. Description: Shooting opportunities: -This...
forum.xda-developers.com
It was crashing at times, but setting the battery to unrestricted seems to be helping, so far. It has some sort of "Unlimited" mode that crashes, and I'm not sure what that's supposed to be. There is a video mode, but it's fixed on 4k resolution in portrait with no way to change it that I can find. Also, there's no way to set the storage to the SD card.
It does have access to the different lenses on the Redmi Note 10 pro.
I'll attach some comparisons: Open Camera ID 0, ID 5, and Photon Camera. The Photon Camera lighting is most realistic compared to the actual lighting in the room.
Here's a few shots at night with Open Camera. You can see the dramatic difference between camera id 0 and id 5. Camera id 5 is better at night; even better than using hdr. Maybe id 5 is an internal night mode?
Just wanted to add: I tried adjusting the exposure compensation in Open Camera, currently to -1.00 EV, and it makes a big improvement. By default photos seem over exposed. Maybe it's just a sensor configuration with the Note 10 pro, and it needs to be adjusted with this setting.
With exposure compensation, comparison to Photon Camera HDR usually favors the Open Camera shot.
Using a camera2 api app, I found some more information about the cameras in the Note 10 pro.
Camera ID 5 reports as a "LOGICAL_MULTI_CAMERA" for physical camera ID's 0 and 2. So it's the main back camera that is also using the Depth Sensor (id 2). If I manually focus on a certain spot, it does produce a nice bokeh effect. The depth sensor also seems to help with night shots.
Interestingly, Camera ID 6 also reports as a "LOGICAL_MULTI_CAMERA" for physical camera ID's 0 and 4, which would combine the main camera with the Ultra Wide camera. I haven't been able to get that one to work with Open Camera, though, and not sure of it's purpose. There are also others, not sure of their purpose, but they also don't work with Open Camera.
I'll attach the text report with the camera2 api info.

Categories

Resources