5,606,297 Members 33,052 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
solfx
Old
#1  
Junior Member - OP
Thanks Meter 2
Posts: 18
Join Date: Oct 2012
Default [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!
 
xdabbeb
Old
#2  
xdabbeb's Avatar
Senior Member
Thanks Meter 1645
Posts: 448
Join Date: Sep 2010

 
DONATE TO ME
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!
 
solfx
Old
#3  
Junior Member - OP
Thanks Meter 2
Posts: 18
Join Date: Oct 2012
Quote:
Originally Posted by xdabbeb View Post
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!
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?
 
xdabbeb
Old
#4  
xdabbeb's Avatar
Senior Member
Thanks Meter 1645
Posts: 448
Join Date: Sep 2010

 
DONATE TO ME
Quote:
Originally Posted by solfx View Post
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?
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.
 
SnakeHaveYou
Old
#5  
Senior Member
Thanks Meter 84
Posts: 271
Join Date: Sep 2010
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..
Ericsson DH318 > Motorola c353 > Motorola e380 > Nokia 6560 > Motorola RAZR V3 > Nokia 6131 > Nokia N73 > Apple iPhone 3G 16GB > Samsung SGH-I897 Captivate (very dead) > Samsung Galaxy S3 > Motorola Razr HD XT925

- Actual device: LG G2 D806 32GB
 
defcomg
Old
#6  
defcomg's Avatar
Senior Member
Thanks Meter 1716
Posts: 2,229
Join Date: Dec 2006
Location: Port Elizabeth

 
DONATE TO ME
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
Tags
bayer, raw format
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...