[Q] Any chance to get raw Bayer or at least non-denoised pictures? - G2 Q&A, Help & Troubleshooting

Hi,
After briefly checking available camera parameters of the LG G2 (stock), I found this:
picture-format-values=jpeg,bayer-qcom-10gbrg,bayer-qcom-10grbg,bayer-qcom-10rggb,bayer-qcom-10bggr,bayer-mipi-10gbrg,bayer-mipi-10grbg,bayer-mipi-10rggb,bayer-mipi-10bggr,yuv422sp
So I've started to work on a small app that will get unprocessed images to process them later on. But I've faced the following issues:
None of the eight bayer modes give me any callbacks for "PictureCallback raw" and "PictureCallback jpeg".
Is there any chance to get the raw image from this device's camera? With root? Different rom / kernel?
In addition the camera's images are extremely blurred due to aggressive denoise. Since I prefer to clean the noise in photoshop later on, I would like to disable the denoise filter. Unfortunately, params.set("denoise", "denoise-off") does nothing...
Is there a way to disable it?
Thank! :fingers-crossed:

Questions go in Q and A, not General - http://forum.xda-developers.com/showthread.php?t=2443934

Sorry... Now it is there.
How do I delete this thread?

Related

[Q] Any chance to get raw Bayer or at least non-denoised pictures?

Hi,
After briefly checking available camera parameters of the LG G2 (stock), I found this:
picture-format-values=jpeg,bayer-qcom-10gbrg,bayer-qcom-10grbg,bayer-qcom-10rggb,bayer-qcom-10bggr,bayer-mipi-10gbrg,bayer-mipi-10grbg,bayer-mipi-10rggb,bayer-mipi-10bggr,yuv422sp
So I've started to work on a small app that will get unprocessed images to process them later on. But I've faced the following issues:
None of the eight bayer modes give me any callbacks for "PictureCallback raw" and "PictureCallback jpeg".
Is there any chance to get the raw image from this device's camera? With root? Different rom / kernel?
In addition the camera's images are extremely blurred due to aggressive denoise. Since I prefer to clean the noise in photoshop later on, I would like to disable the denoise filter. Unfortunately, params.set("denoise", "denoise-off") does nothing...
Is there a way to disable it?
Thank! :fingers-crossed:
The denoise options you saw are just the standard android camera api...in fact, if you notice they already show as off! Which we know isn't the case LG ended up using their own (licensed) algo.
I tried to get the bayer modes to work a while back myself and met with no luck. I think the problem lies in the supplied driver. There are certainly keys for those modes, but not full driver support.
That said, I hope you succeed!
xdabbeb said:
The denoise options you saw are just the standard android camera api...in fact, if you notice they already show as off! Which we know isn't the case LG ended up using their own (licensed) algo.
I tried to get the bayer modes to work a while back myself and met with no luck. I think the problem lies in the supplied driver. There are certainly keys for those modes, but not full driver support.
That said, I hope you succeed!
Click to expand...
Click to collapse
Thanks for your reply!
Regarding denoise - will it be different if I'll flash CyanogenMod? (Since it rewrites the kernel)
Maybe the filter strength is somewhere in the system files? So setting the filter strength to zero with a rooted phone?
solfx said:
Thanks for your reply!
Regarding denoise - will it be different if I'll flash CyanogenMod? (Since it rewrites the kernel)
Maybe the filter strength is somewhere in the system files? So setting the filter strength to zero with a rooted phone?
Click to expand...
Click to collapse
If you're using the stock android/google camera that's included with CM, then it should be. I've reduced the denoising in normal photo mode on a mod to the stock camera/rom, but it didn't give me much granularity in controlling it, unfortunately. It would be nice if it had an integer value to pass to it, but it doesn't appear to.
WIth SlimKat, i was able to get a raw image, using YUV422SP.. The problem is that there isn't any YUV 4:2:2 Semi-Planar viewer or converter!!!
The raw image is 26MB vs 3,64MB the JPEG
With IrfanView, you can view the RAW, but since the app doesn't support 4:2:2 Semi-Planar import, the best image you can get is a grey scale BMP..
if you still need the Bayer data I managed to get all the supported raw sensor data
use this its setup for raw capture
www.mediafire.com/?4d723slsdlg3d1y
dissemble the apk
search for picture-format string open the one from the e.smali file
it will be in a method called PR
change locals to 4
then copy add const string v3 with desired picture format then replace v2 with v3 in the set invocation of Camera$Parameter. You need to change to change two more values and you're good to go next search for ".raw" you will find two one in addImage the Other in UpdateImage Method it will be in a.2.smali
change the const-string above equalsIgnoreCase to match the desired picture format in both addImage /updateImage methods Happy Snapping Tested on Zte Nubia Z5Sn with same sensor as G2

Camera2 api

It looks like we have full support of camera 2 api.
try snap camera from the store it have a option to enable..used the app if I was on aosp rom with the m8
Good to see
I forget where, but this was actually confirmed a looooooong time ago (well... long in tech time. Couple of weeks ago though).
I thought that since Samsung doesn't offer shutter speed control in pro mode that they didn't enable the full camera 2 api.
Dovigoldberger said:
It looks like we have full support of camera 2 api.
Click to expand...
Click to collapse
Hi,
According to the person who wrote this article, it seems that the camera2 api is not fully supported at the moment :
http://spectrastudy.com/camera2-api-on-mwc-2015-devices/
The manual camera checks would then bit too enthusiastic if this is true.
Can anyone who has manual camera installed try to take a picture in RAW and post the DNG file here?
I couldn't find any S6 DNG file on the web; it would be great if someone could confirm whether it is really possible to shoot in RAW with the S6.
With a Nexus 5, the 3 following apps can shoot in RAW :
- a better camera (there is a free version with limited number of shots in case)
- camera fv-5 (paid app)
- manual camera (paid app)
Dovigoldberger said:
I thought that since Samsung doesn't offer shutter speed control in pro mode that they didn't enable the full camera 2 api.
Click to expand...
Click to collapse
It does, but due to driver limitations, the longest shutter you can choose in Manual Camera app is 1/10. The longest shutter the S6 and edge is allowed to use (when ISO is manually set in the stock camera app) is 1/7. And when Manual Camera opens, WB is all green, so you need to long press WB to make it normal. There is now RAW support wither.
Right now the best camera SW for the S6 and edge is the stock, which is extremely fast to open, very quick to focus and snap, and offers a wide variety of options including manual settings, without shutter control. The latter is a pity, but without long exposures, you can just indirectly control it via ISO, either way, you are maxed out at 1/7. On the bright side... the lens is very bright, offering dramatically better lit details at the same SP and ISO than the S5, Note 4 or One M9, and it makes it a solid snapper indoors. Overall camera2 API is a mixed bag at it's current state and I hope full manual control comes soon with long shutter options.
Not sure this is because of camera 2 API or not, but you guys notice you can now separate auto focus from exposure point in pro mode? You can press and hold to lock the focus point, while shifting the exposure point to elsewhere on the screen. Makes it much better while shooting in situations where background and foreground are in vastly different exposure brackets.
http://spectrastudy.com/camera2-api-on-mwc-2015-devices/
"Manual camera" app doesn't work with S6
vincent2167 said:
Hi,
According to the person who wrote this article, it seems that the camera2 api is not fully supported at the moment :
... link ...
The manual camera checks would then bit too enthusiastic if this is true.
Can anyone who has manual camera installed try to take a picture in RAW and post the DNG file here?
I couldn't find any S6 DNG file on the web; it would be great if someone could confirm whether it is really possible to shoot in RAW with the S6.
With a Nexus 5, the 3 following apps can shoot in RAW :
- a better camera (there is a free version with limited number of shots in case)
- camera fv-5 (paid app)
- manual camera (paid app)
Click to expand...
Click to collapse
I Installed "Manual camera" app (compatibility app said that it would work) but it doesn't work.
"Manual camera" interface appears, turns green and freezes, and phone either reboots or app
just shuts down. Camera gets a little warm too.
Was hoping to get DNG files from S6, but doesn't look good.
Very disappointed about this.
Uninstalled app and was refunded.
Thanks for the feedback!
I tried the Manual Camera app as well and it all appeared to be working for me, until I attempted to save a RAW image. This crashed my camera and required a full reboot to resolve.
Jason_V said:
I tried the Manual Camera app as well and it all appeared to be working for me, until I attempted to save a RAW image. This crashed my camera and required a full reboot to resolve.
Click to expand...
Click to collapse
I don't think there's RAW support for any non-Nexus phone (maybe one of the Chinese ones, but not from the major OEMs).
Also, doesn't the shutter top out at 1/10 or 1/7?
Yeah when putting it into raw and gpeg you will get a crash we have to wait for Samsung to do an update . I have a feeling that the ois is the reason samsung cannot alow shutter speed variation as even dslr cameras don't use image stabilization when it's on long exposure and as ois cannot be switched of manually then this will be a problem .

[GUIDE] Workaround(s) for taking RAW Photos on Sultanxda's CAF Rom

Intro:
As many of us, (myself included), we already knew that @Sultanxda said that his ROM and Camera HAL he developed on it, doesn't support RAW picturing. Months ago, I discovered a way to get ride into it, and manage to taking RAW photos. I'm not claiming I've developed by myself, I just found it as curious I'm. As I didn't see any post or thread informing about this, I decided to start this one to discuss about it. So, let start.
Requisites:
Obvious thing, you have to root, unlock, blah blah and install the pertinent ROM from the Sultanxda's thread. It works on all CM 12.1 builds. I haven't tested it on OxygenOS 1.0.0, OxygenOS 2.1.4, or Sultan's CM 13. Try and let me know.
***ANY SUGGESTIONS OR INFO ARE VERY WELCOME, AS I SAID, I'M NOT A DEVELOPER - I'M JUST SHARING IN SOMEONE DON'T KNOW ABOUT THIS***
Update! March 28th, 2016
Now you can test and use the CM12.1 Sultanxda's Snapdragon Camera, merged with the features I will detail below in the post. The user @gwindlord, sent me this incredible app. You can try it out flashing this zip.
Also, I've just realized that, this is a DNG photo tutorial! Because, the .raw file generated is pretty obsolete in the SnapCam. And the newer Bacon Camera app, doens't generate a .raw file. It is just a .dng with a .jpeg preview file. FreeDCam, doens't generate any .jpeg or .raw, that's why you can't edit these files on Snapseed.
Steps:
1.- You have to install these two apps.
SnapCam 0.6 by @fgnm - http://forum.xda-developers.com/oneplus-one/themes-apps/app-snapdragon-camera-mod-t3210978
Snapseed by Google- https://play.google.com/store/apps/details?id=com.niksoftware.snapseed
2.- Before you open the SnapCam, make sure that the Snapdragon Camera that comes with the ROM, is already closed. When you open it, change the picture resolution to 13 MP (I guess theres a bug that makes appear a 21.5 MP resolution, maybe due the app was build to work entirely with the original CM Camera HAL).
3.- Then, go to Settings > More Settings
4.- Uncheck the Zero Shutter Lag option, and swipe down to find "Select Picture Format" option. Tap on it.
5.- Now, I'll try to explain the options that appears there, as far as I know due the results I got before;
JPEG - Normal .jpeg picture, as any camera does. Duh.
YUV422SP - This seems to be a Generic RAW codec, the camera app will crash after taking a picture, and just a .dng file will be dumped.
BayerQ10RGGB - Qualcomm codec. - A pure RAW file will be dumped, with a minor warm color temperature. *RECOMMENDED*
BayerM10RGGB - Qualcomm codec. - A pure RAW file will be dumped, with a minor warm color temperature, BUT, with a few last pixels on the right side, corrupted.
BayerIQ10RGGB - Qualcomm codec. - A pure RAW file will be dumped, with a highly green tint quality.
Select the one as you desire.
6.- Make sure that the "Save DNG raw" option is checked. If not, it will not work. (Dunno why).
7.- Take any photo. The picture will take around 5 secs to process, have a still hand!
8.- Go to the gallery app (stock one recommended), and there will be a new "raw" folder on it. All RAW photos taken will appear there. No one will have a preview, but you can read a few metadata info on the details.
9.- Now, go to the Snapseed app and open a pic normally. Select any of these pictures with no preview on it. You will have to guide using the date was taken.
10.- If everything goes right, the RAW editing welcome splash screen should appears. Pass over it, and you'll see the taken photo.
11.- Make the adjustments that you desire (you can manipulate it a lot, the quality is incredible). And then, save the picture. A progress bar should appear on the notification panel.
12.- When if finished, voilá! A processed .jpeg file will appear on you gallery. It's done!
Alternative Workarounds:
- Using the FreeDCam app by @troopii - https://play.google.com/store/apps/details?id=troop.com.freedcam
With this app, beside it can get all parameters directly from the camera driver, there's a way to take pictures in .dng format. No RAW will be generated, so you will not be able to edit it on Snapseed. The colors on this one will be totally natural and untouched, as well as exposure, contrast and sharpness.
- Using the Bacon Camera app by @fgnm (Paid app!) - https://play.google.com/store/apps/details?id=com.fgnm.baconcamera
As it is based on his deprecated SnapCam app, this app have the same method to work. But, the behaviour seems to be diferent. In case you use the BayerM10RGGB, a weird corruped picture will be dumped. I recommend the BayerQ10RGGB codec again, the result will be different; the white balance will appears 'cold' in this case, and the photo will have the normal resolution of 4208x3120. The main problem is, all pictures will be in potrait mode, no matters how you rotate the device.
Bugs - Curiosities:
I've noticed a few weird thing that I can't find an explanation, but well;
Pictures dumped will have a weird resolution; 4212x3082.
There are a few manual modes you can't use on this, like as; sharpness, contrast, saturation, and white balance.
Using the FreeDCam you can take .dng pictures using the front camera.
The .raw file is undecodable, but the .dng one is not. If you use RawTherapee for Windows, you may get able to edit your files even more.
The RAW file need the .dng one to work and viceversa on Snapseed.
Thanks to:
I want to give a lot of thanks to Sultanxda for his incredible ROM and Camera HAL, to fgnm; to develop an exclusive camera app designed for the OnePlus. And now also to gwindlord, to merge these functions into the original CM12.1's Snapdragon Camera.
Conclusion:
I remember I saw a post of Sultan saying that he got a kinda RAW picturing while he was developing his HAL, but it was undecodable. I really love this partial funtion, because I found the camera of the OPO a very good tool. And I hope that this tutotial work for all of you, or at least find it useful. I'm not have a technical knowledge of how this works, but it works. So, let's give it a try.
Good luck for everyone, and regards!
Interesting! Since Sultanxda's camera HAL was developed from the Oxygen OS's one, I wonder if this method also works on Oxygen OS? Maybe more people can try and report
FreeDCam has issues focusing on Sultanxda latest stable 6.0 and SnapCam 0.6 force closes when I tried to use it though
firenxe said:
FreeDCam has issues focusing on Sultanxda latest stable 6.0 and SnapCam 0.6 force closes when I tried to use it though
Click to expand...
Click to collapse
I had not any focus problems con FreeDCam. SnapCam 0.6 might not work on MM roms.
I'm using the latest sultan MM rom from 18/04 and can confirm that it is possible to save dng files with FreeDCam!
I didn't flashed any of the zip files or anything else.
The exposure of the photos is not correct. Everything is too bright, but I can correct that by "underexposing" in RAW postproduction.
firenxe said:
Interesting! Since Sultanxda's camera HAL was developed from the Oxygen OS's one, I wonder if this method also works on Oxygen OS? Maybe more people can try and report
Click to expand...
Click to collapse
Sultans hal was picked from caf and not oxygen os. He is using camera libraries from oxygen os. This is sth different.
Sent from my A0001 using XDA-Developers mobile app
With sultans MM rom snapseed can't see the dngs from the FreeDcam folder but you can share them into the app. A bit awkward.
While Adobe's Lightroom app does view and edit them nicely!
Sent from my A0001 using XDA-Developers mobile app

Moto G5 Plus, is camera RAW enabled?

Hello everyone,
is there anything known yet, if Moto G5 Plus camera has RAW shooting capability?
If not implemented in native camera app, does the phone support Googles' camera2 API, which would allow 3rd party apps to use full manual mode and shoot in RAW?
If information is not documented publically, could anyone already owning G5 Plus verify this, by installing a manual mode enabled camera app, e.g. "Manual Camera" and check if RAW mode can be turned on?
Thank you in advance!
siddie said:
Hello everyone,
is there anything known yet, if Moto G5 Plus camera has RAW shooting capability?
If not implemented in native camera app, does the phone support Googles' camera2 API, which would allow 3rd party apps to use full manual mode and shoot in RAW?
If information is not documented publically, could anyone already owning G5 Plus verify this, by installing a manual mode enabled camera app, e.g. "Manual Camera" and check if RAW mode can be turned on?
Thank you in advance!
Click to expand...
Click to collapse
No!
None of the camera2 API has been implemented, tested on 4GB Indian variant
Thanks for the quick check.
I had asked for RAW, as i read and heard in several reviews now, that G5 Plus camera does have some issues with overexposure and softness caused by too aggressive noise reduction maybe. This is somewhat disappointing as it seems that software processing of the pictures does not get the optimum out of sensor and lense.
An option would have been to shoot RAW and process out of the phone to get better results.
Professional mode would at least help to fix the exposure issues, but is there a way to get into the noise reduction settings?
May this advanced camera settings mentioned here be of help to that?
https://forum.xda-developers.com/moto-g/general/how-to-unlock-advanced-camera-settings-t2884035
siddie said:
Thanks for the quick check.
I had asked for RAW, as i read and heard in several reviews now, that G5 Plus camera does have some issues with overexposure and softness caused by too aggressive noise reduction maybe. This is somewhat disappointing as it seems that software processing of the pictures does not get the optimum out of sensor and lense.
An option would have been to shoot RAW and process out of the phone to get better results.
Professional mode would at least help to fix the exposure issues, but is there a way to get into the noise reduction settings?
May this advanced camera settings mentioned here be of help to that?
https://forum.xda-developers.com/moto-g/general/how-to-unlock-advanced-camera-settings-t2884035
Click to expand...
Click to collapse
maybe when custom roms hits?
siddie said:
Thanks for the quick check.
I had asked for RAW, as i read and heard in several reviews now, that G5 Plus camera does have some issues with overexposure and softness caused by too aggressive noise reduction maybe. This is somewhat disappointing as it seems that software processing of the pictures does not get the optimum out of sensor and lense.
An option would have been to shoot RAW and process out of the phone to get better results.
Professional mode would at least help to fix the exposure issues, but is there a way to get into the noise reduction settings?
May this advanced camera settings mentioned here be of help to that?
https://forum.xda-developers.com/moto-g/general/how-to-unlock-advanced-camera-settings-t2884035
Click to expand...
Click to collapse
Came here to post the same question. The camera tends to over expose the picture a lot or the softness kills it. Anyway to enable the camera 2 api?
siddie said:
Hello everyone,
is there anything known yet, if Moto G5 Plus camera has RAW shooting capability?
If not implemented in native camera app, does the phone support Googles' camera2 API, which would allow 3rd party apps to use full manual mode and shoot in RAW?
If information is not documented publically, could anyone already owning G5 Plus verify this, by installing a manual mode enabled camera app, e.g. "Manual Camera" and check if RAW mode can be turned on?
Thank you in advance!
Click to expand...
Click to collapse
try
https://forum.xda-developers.com/g5-plus/how-to/how-to-enable-camera2-shoot-raw-root-t3582392

Possible Camera2 API bug.

Hello, all!
This is a little specific, but I was hoping that perhaps other LG G6 users could help me test for this problem to figure out whether it's affecting all the phones/firmwares or is specific to mine.
Basically what happens is that in any camera app, except the native one, if you use specific manual settings (so, through the Camera2 API) there's a bug that changes the value on its own. Perhaps the easiest way to check it is using Open Camera:
1) Switch to video mode (camera choice does not matter).
2) Pick the exposure icon, set ISO to 50 and shutter speed to 1/20
3) Start recording video...
4) On my device after 5-10 seconds of recording the screen turns black (or nearly black) as the exposure speed drops to ~1/10000.
Touching the screen to refocus fixes it for a moment, then it jumps back to ~1/10000.
Basically ISO50, shutter range 1/20-1/30 will cause this. I have seen this in any app that allowed manual settings, like Open Camera, ProShot, Hedgecam 2, AZ Camera, Footej camera etc. Some of them turn black, others just crash/freeze. Sounds like an API bug to me.
I'm on Android version 8.0.0, Software version: V20c-EUR-XX installed through OTA.
Would really appreciate if someone could also try this.
My minimum shutter speed is 1/30... This with stock camera........ Stock oreo by OTA v20c.
No problem with recording.
vs0587 said:
My minimum shutter speed is 1/30... This with stock camera........ Stock oreo by OTA v20c.
No problem with recording.
Click to expand...
Click to collapse
Thanks for taking the time to check, but the stock camera works ok. It's the others that have this problem. Like Open Camera or HedgeCam2. The reason I want to use those is they recently added an option to change image processing (noise reduction, edge enhancement) so if you turn those down and film video with them you actually get nice, natural looking video and not the overprocessed watercolor look that the stock camera (and most other apps) provide. And if we go for a "cinematic" 24fps look then the Shutter speed could often be 1/24 or so.
Since I have seen some threads looking for a way to get cleaner video I'll attach two snapshots from a video - one with stock camera (and those crazy cartoon edges) and another from HedgeCam 2.

Categories

Resources