yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] EarlyMon:
I used the M8 stock camera linked from the OP, Camera2.apk, downloaded a few hours ago, and got dcraw from here for OS X - http://www.insflug.org/raw/

Here's a file it can't decode - https://www.dropbox.com/s/7ylimb8dqim4qma/IMAG0002.draw

Can anyone share a working draw file so I can test my dcraw installation?

Am I using the wrong apk?

By the way, the draw options for the M8 in the op aren't right, "- q1" is really "-q 1"

In any case, dcraw -i IMAG0002.draw gives the the cannot decode file error.

Sorry if it sounds like just complaining - I really appreciate the effort and want to become a user.

PS - I just built my own dcraw from source using the OP suggestion (minus the library reference) - still no soap.

Then I tried -

gcc -o dcraw -O4 dcraw.c -lm -DNO_JPEG -DNO_LCMS -DNO_JASPER

http://www.image-engineering.de/index.php?option=com_content&view=article&id=576&Itemid=210

I've also downloaded everyone else's dcraw I could find and then Rawker as well (dcraw embedded).

No luck.

Viper 1.6

BTW (new edit) -

Using Rawker - http://www.raifra.de/Mac/index-en.html

And using the FreedCamRawTest.apk with Rawker, I was able to grab a raw and convert to a 16 MB tiff, no problem.

Scratch that - when I put Rawker in dcraw only mode, it's broken again.

I tried grabbing other draw files listed in the thread, but they've all been pulled down already (which, certainly makes sense, I'm not complaining).

When I run dcraw with no parameters, it reports that it's v9.21 and lists its parameters, per normal.

I'd sure appreciate any draw file that worked for someone on their Windows draw here so I can test that part out on my side, thanks!
[Android Apps and Games] defcomg:
Are You using The Source Code in the O.P If so I'm not sure I updated it with M8 support for as I just posted compiles binary anyway Search for 16424960 Duplicate the entire line starting with the open curly brace ending with ,

The Duplicate line should be look like this

{ 5107712,2688,1520, 0, 0, 0, 0, 1,0x61,0,0,"HTC","M8" },

that line is what identifies the raw file so it might be missing I'm the dcraw.c in the O.P

about the dcraw option its probably a typo will correct it thanks.
[Android Apps and Games] beserker15:
Are you using freedcamera or nubia? Which Note 3 do you have and which rom are you using? It doesn't seem to work for my Note 3 =(
[Android Apps and Games] EarlyMon:
Who da man?

*You da man!*

Many thanks!

My tiff came out way dark - but - I'm pretty sure that I can hose around with parameters and cure that.

Thanks again, I can't wait to really try it now!!!
[Android Apps and Games] defcomg:
Year Linear 16bit are like that have a look at this www.guillermoluijk.com/tutorial/dcraw/index_en.htm should help you work out demosaic params for the m8 ones posted were just what seemed right at the time of testing.
[Android Apps and Games] EarlyMon:
I just wanted to say, this is one of the best and most informative threads ever, despite being focused on a specialty topic.

Bravo, thank you. :)
[Android Apps and Games] defcomg:
dcraw -v -4 -T -f *.draw

Found a method that corrects the colors no more green or magenta color cast

Open Image in Photoshop

Curves Adjustment select eye dropper for black point choose the darkest part if the image is even use threshold adjustment layer next change the color channel to green change eye dropper to white point choose the whitest part of the image works best on the edges of blown highlights voila no more color cast tested it with 4 different images under different lighting works well
[Android Apps and Games] Svenskaslynan:
My phone crashes when i choose raw format..:( to bad. don't know why..

lg optimus g
[Android Apps and Games] defcomg:
Post a logcat and is this with the freedcam in the OP or previous page if previous page its because device not added to the decoding list if So try the one in the op tell me the format or post sample file then will see how it goes from there
[Android Apps and Games] hakhater:
xperia z

Hi, I also tried on Xperia Z

Unfortunately there is nothing other than jpeg

Here is lib file
[Android Apps and Games] turko9999:
hey guys, im super super confused. i have m8, and i use stock rom. i download apk from first thread(not stock one), it force closes.

and so many apks here. I dont know, whick apk to install to capture and decode raw. please help me.
[Android Apps and Games] defcomg:
you try this xdaforums.com/showpost.php?p=53559894&postcount=180 ?
[Android Apps and Games] turko9999:
Yes i use it, but i never take a picture *.raw or *.dcraw format with it, and i never decoded too.

HTC One_M8 cihazımdan gönderildi
[Android Apps and Games] defcomg:
So wait it does not produce tiff and .raw file when you select bayer-mipi-10grgb ?

and the reason the other apk Nubia camera fc is because system language must be in English.

Managed to cut Raw Decode time from 40 sec to 25 by Enabling OpenMP in libraw so its kinda multi threaded now need to implement some sort of queue to account for the 25sec delay
[Android Apps and Games] turko9999:
Thank you my friend, i think i install different apk, yep i can take tiff picture over 20 mb, thank you again :D
[Android Apps and Games] dibblebill:
I don't seem to be able to shoot in RAW on the PadFone X. I've tried using FreeDCam. WHat information do I need to give you to help diagnose?

For example, the video from the camera freezes when I tap a part of hte screen to focus. It doesn't seem to save a photo after making a shutter sound. I get a 160KB RAW file in DCIM. My choices for picture format are jpeg and yuv422sp.
[Android Apps and Games] kosako17:
What do you use to get working RAW in LG G2?

Enviado desde mi LG-D802 mediante Tapatalk
[Android Apps and Games] defcomg:
FreedCam from Previous Page Should Produce TIFF + Orginal Raw

FreedCam From Op Will produce Raw which you can Decode with Dcraw from Op

Use bayer-

mipi-10bggr

You Can Mod it into Stock App if you want
[Android Apps and Games] kosako17:
What settings should I use to produce TIFF + original Raw?

Do you reccommend FreedCam from OP or the one from previous page?

Enviado desde mi LG-D802 mediante Tapatalk
[Android Apps and Games] defcomg:
Rather use the one from OP and Decode on PC the one from the previous Page was just a test version but it was a bit slow to encode the tiff but managed to cut down the time by almost half but still far from perfect plus on a PC you can enable median filter which fixes interpolation errors.

the raw is far from perfect but Dave the creator of dcraw I should do the following should give us correct color matrix

"For a proper calibration, I'll need a photo of a gray-

scale strip and a standard color chart in direct sunlight.

The Wolf Faust chart is cheap and suitable for both purposes."

http://cybercom.net/~dcoffin/dcraw/#card

for the moment we use auto white balance works but require more Photoshop work

So if anyone with G2/N3/Mi3 m8 has Wolf Faust chart do the above so we can have perfect raw will look around in local camera shops see if they have one
[Android Apps and Games] defcomg:
Working on a YUV Filter will update when it's done
[Android Apps and Games] dibblebill:
I may have got it working and saving to RAW. Will let you know
[Android Apps and Games] the playa!:
No raw capture for the M7?
[Android Apps and Games] defcomg:
try this should give you a ppm file that can be read in Photoshop

usage *.yuv *.ppm

yuv is processed but it may give better quality that maybe lost in jpeg compression

select yuv422 in picture format
[Android Apps and Games] dibblebill:
I'll give it a try. The jpg pictures this device takes are gorgeous. But I like shooting in RAW
[Android Apps and Games] defcomg:
can you upload these files from padfone x libcameraclient.so camera.msm8970.apk and stock camera app
[Android Apps and Games] EarlyMon:
Ok, so here's what I'm doing with the M8 camera -

dcraw -v -4 -q 3 -m 40 -a IMAG0005.draw

And also trying as advised by my bud Granite1 over at AndroidForums.com -

dcraw -v -4 -q 3 -m 40 -a -r 2.132583 1 1.480864 1 IMAG0005.draw

That produces a PPM file - and allows for the -q 3 spec to go to AHD interpolation.

And we're getting really good results. In fact, excellent results.

And the secret seems to be just adjust exposure with the curves tool (we're both using gimp, so open the ppm as layers) and then exporting to a 24-bit color png.

No other adjustments (depending on the picture) - just that.

Don't be afraid to play with the curve, but overall, you want to take the upper right corner and bring it to the left (increase exposure, the mid-point is a full stop) and then sort of eyeball that exposure point and the amount of curve up it needs, seems to vary a little by picture.

Here's Jishnu's camera mod for the HTC One M8 with 95% jpeg compression, followed by the converted raw (I'm still playing with the curve on that one, it's a bit tricky) -

When I have that really zero'd in, I may post the flattened comparisons again but anyway -

It's really hard to compare those two while working on them.

I had to move for a truck coming through and they are displaced in time, just by minutes, but at sunrise that can be a big light change.

I do note far better color in the various window panes on the right half of the picture.

And yes - you can see people through those windows. :D

PS - Jishnu's camera is very pleasing and I really like the shots I'm getting from it.

They're vibrant and fun.

The raw pictures above are actually far more true to the color of that building - and especially that red sign.

I also noticed an improvement in the sky.

BTW - those are all full-sized. You can right-click to view the actual images.

So - I think getting PPMs and just adjusting the curves is the answer, fwiw.
[Android Apps and Games] defcomg:
Nice Jishnu's Camera images are very warm the raws seem cold to get 100% accurate colors check this link it shows how to make an ICC camera profile ninedegreesbelow.com/photography/dcraw-float-command-line-options.html after having an ICC profile you shouldn't need to guess the -r multipliers if you need the source code for dcraw I can attach a link maybe you can build on stock HTC camera functions into it as most are in the hal and not app. by Function I mean like Manual Controls depth information maybe it could be used to generate this planetphotoshop.com/controlling-depth-of-field-with-tonal-maps-in-adobe-photoshop.html
[Android Apps and Games] EarlyMon:
Trust me boss -I was all about getting into a city to shop, buying a test card and working out the right numbers, that was also in another link you provided.

Although - those other methods are intriguing as well to me. I have no trouble with matrix math, I'm going to look into that route. Pretty interesting.

I agree 100% that the raw images are on the cool side - but - that really is far more like that building than the regular jpg camera.

I do have the dcraw.c and I'm good with that.

Let me try to get a bite out of the r numbers and let's talk then about other functions.

BTW - here's a picture of my buddy's dog - http://androidforums.com/one-m8-all-things-root/854215-raw-camera.html#post6630688

Pretty good picture I think.

I really can't thank you enough for this mod - it's one of the most fun mods I've dealt with in LONG time - and plus, it's useful as all get out! :)
[Android Apps and Games] defcomg:
lol how did your Buddy get the dog pose for the picture I could never get my dog to sit still haha great picture by the way .

there's also rawtherapee which I think the source could be made to support the m8 I have just been lazy to look at the source lol http://rawtherapee.com/shared/source/ enjoy

got a flickr account with your raw images?
[Android Apps and Games] EarlyMon:
Yeah, those are the pngs from my Flickr account, you can right click those to get to them.

If you want my draw and ppm files, no problem, but please give me a bit to get to my desk and upload them to my Google Drive - I think that will be better for those.

And I agree completely - what a great dog, what a great pose! :)

---------- Post added at 12:58 PM ---------- Previous post was at 12:08 PM ----------

OK, I'm new at Google Drive, let me know if you can see this one -

https://docs.google.com/file/d/0B2MPU5MqABTXYXdES3E3M1VfM0U/edit?usp=docslist_api
[Android Apps and Games] defcomg:
thanks
[Android Apps and Games] defcomg:
dcraw -v -4 -T -f -m 40 -a

ACR in PHOTOSHOP CC

+79 TINT

-69 HIGLIGHTS

+100 SHADOWS

HDR TONE

FREAKY DETAILS PLUGIN

NOISE NINJA DENOISE

DXO Distortion - Failed

dcraw -v -q 3 -4 -T -f

edited on my tv - not profiled was too far from my monitor which is profiled not sure how it looks on a monitor

it seems all you need todo is add magenta tint in ACR so the-r multipliers are not required on my device it's not that easy i think M8 is partially corrected try freedcam from op and in picture options try the other rae formats ie bayer-qcom and bayer-qcom-ideal ideal should be lens corrected on my device it has some weird watermark attach the samples

lol i swapped the file names around my bad
[Android Apps and Games] EarlyMon:
Based on your observation that mine were coming out a bit cool, I adjusted the red ever so slightly.

Curve, slight red adjustment - that's it - what do you think?

PS - the thanks button disappeared.

But thanks for the above, let me check those out.

I'm going back to that building in the morning at sunrise again tomorrow.

My laptop is at least gamma corrected.

I'll try to give an impression if any of these are really as close to reality as I'm thinking.
[Android Apps and Games] defcomg:
do you have the raw of the dog?

the highlights need to be toned down a tad bit it seems like there is a gigantic spotlight on the building unless it was facing the sun then i suppose the highlights would look like that. imo reducing the highlights and raising the white point would make the image more balanced
[Android Apps and Games] EarlyMon:
I don't have a raw of the dog, just the ppm. I can ask for it.

The red chair in the background was painted and is oxidizing now, so my original may have been closer (although still wrong).

That building is fairly close to facing the sun, not exactly, but close.

That's at nearly a mile in elevation (around 1600 meters) and very dry - and I want to strongly suggest that the color temperature at dawn there is not the same as you see near sea level.

Hmmm... I wonder if I can find a reference for that...

Anyway, I think it's actual color is between the two I've posted.

PS - thanks button is here in the app lol so thanks again for your working my picture.
[Android Apps and Games] defcomg:
Ah i see lol whenever i can't get the raw colors correct i just make the image black and white lol thats the tip this dude gave https://www.youtube.com/channel/UCs4S07E5NC0R7pVuzBJ0e8Q :D
[Android Apps and Games] defcomg:
S5/ Exynos raw save test

So I got the s5 camera app and looked at how the rt-hdr capture mode was activated it was set("rt-hdr","on") so I'm thinking raw mode must be the same so I made parameters. set("raw-save","on"); instead of the original set("capture-mode","raw-save"); so all you need to do is goto settings and try the exynos raw if it fc logcat if not try capture see if theres a raw output somewhere on the SD card maybe in DCIM/FreedCam
[Android Apps and Games] defcomg:
About Sony Devices

I think i might have found why Sony devices only have JPEG it seem to be disabled in the kernel in the sensor driver

Xperia Z and all the other Variants

https://github.com/DooMLoRD/android...rs/media/video/msm/sensors/sony_camera_v4l2.c

static struct v4l2_subdev_info sony_sensor_subdev_info[] = {
{
.code = 0x00 ,
.colorspace = V4L2_COLORSPACE_JPEG,
.fmt = 1 ,
.order = 0 ,
},
{
.code = 0x00 ,
.colorspace = V4L2_COLORSPACE_JPEG,
.fmt = 1 ,
.order = 0 ,
},
/* more can be supported, to be added later */
};

the .code line should equal the Bayer format

same case with z2

https://github.com/cjd/android_kern...tform/msm/camera_v2/sensor/sony_camera_v4l2.c

on my device

static struct v4l2_subdev_info imx135_subdev_info[] = {

{

.code = V4L2_MBUS_FMT_SBGGR10_1X10,

.colorspace = V4L2_COLORSPACE_JPEG,

.fmt = 1 ,

.order = 0 ,

},

};

https://github.com/syhost/android_k...ia/platform/msm/camera_v2/sensor/imx135_069.c

perhaps adding V4L2_MBUS_FMT_SBGGR10_1X10, should do the trick on xperia Z ZL + other variants for xz1+ I dunno the order Ask kernel dev for your device to give it a try
[Android Apps and Games] hakhater:
What about stock kernel?

Because what I understand that it's (maybe) only possible for custom kernel.. Correct me if I'm wrong
[Android Apps and Games] EarlyMon:
Lookie what I got!

Here's the draw - go ahead and process it.

https://drive.google.com/file/d/0B2MPU5MqABTXa2xaVnRWRmZFblE/edit?usp=sharing

Now - here's that same thing, adjusted just for a little more exposure and contrast using that tool (not curves), and then added in just a bit of saturation -

And with this morning's overcast sky, that is just about EXACTLY how that appeared according to comparing the final results on my gamma-adjusted Mac laptop and the real deal.

I have no idea how my others got two-toned.

The one big trick - add +1 EV to the raw camera before shooting. (I also tried playing with saturation but exactly as I expected, that is a post-processing thing and had no effect.)

So - leave your raw M8 camera set to +1 EV, auto, auto white.

And - defcomg turned me on to Elle at Nine Degrees Below photography - and wow! what a great help and really giving! - she's given me a lot of good pointers about zeroing in the right numbers for adjusting to white that I hadn't read before.

As soon as time allows, I'm going to adjust even further.

BTW, processed using:

dcraw -v -4 -q 3 -m 40 -a -r 2.132583 1 1.480864 1 IMAG0007.draw

I don't recall my exact Gimp brightness/contrast additions (I think in the neighborhood of 39/26) nor my saturation adjustment (ummm - up some ok) - and I wasn't sweating that because -

1. Those will likely change once I try for better input numbers.

2. Those are things that we often like to play with anyway because sometimes final effect is more fun that dead-on accuracy.

PS - the above image was not made with the same attempt to steady the camera as last weekend. I was pressed for time, I just wanted to get some quick snaps and check color.

BTW - here's my buddy's dog in draw - https://drive.google.com/file/d/0B1xiIlbIPKFDYkVNYkRJN2w0U2s/edit?usp=sharing
[Android Apps and Games] EarlyMon:
BTW - even though Gimp doesn't handle 16-bit layers doesn't mean that's all there is.

Added -T to get 24 MB TIFF, opened in Mac Preview, made the same exposure, contrast, saturation adjustments, saved without compression.

LOL - you can see the difference. :D

https://drive.google.com/file/d/0B2MPU5MqABTXVmR1VzFnZ3hlYjg/edit?usp=sharing

---------- Post added at 11:40 AM ---------- Previous post was at 11:23 AM ----------

Wow.

And it goes a long way from there, including not needing -m 40 because there's not a lot of noise in the images to begin with. :p

Ok - back to the drawing board.
[Android Apps and Games] defcomg:
I see did you give rawtherapee a try rawtherapee.com/blog/rawtherapee-4.1-is-out I think it may work better than gimp to handle the 16bit I use PS CC and the raws don't look underexposed but when viewing with windows viewer they do look underexposed.

when using dcraw -4 -T -q 3 *.raw

give the trial version of Photoshop a try for M8 raw all you need to do is drag the tint to the magenta side and gets rid of the green cast. Tried same method with raw from front cam which is also an OmniVision Sensor.
[Android Apps and Games] starbase64:
Hi,

I correct in Photoshop the color always with gradation curve

It's the best method.

regards

starbase64
[Android Apps and Games] Carlos_EVH:
Nubia cam doesn't work on my Motorola Moto G running CM11, It gaves me Gallery FC when I open the camera
[Android Apps and Games] EarlyMon:
I just used a built-in Mac tool. I'm looking at a few others for Linux. If I settle on something better, I'll say.

According to Elle, applying -4 may be wrong here so I'm going to play with that on different subject material.
[Android Apps and Games] Granite1:
Absolutely amazing gentlemen!!

Thank you so much for this, it's really opened my eyes. I'm taking better photos, and I actually like editing them with these mods. :)

PS: it is rather difficult to get my dog to sit still. There's a pile of blurry / half head shots in my recycle bin trying to get that! :p
[Android Apps and Games] EarlyMon:
Yeah, that's Granite's dog. :)
[Android Apps and Games] defcomg:
try freedcam Settings>Quality>Picture Format see if there's anything else other than jpeg
[Android Apps and Games] defcomg:
Glad to hear that by the way never asked this are you able to control shutter speed on FreedCam?

On Stock Camera While recording video do manual controls work and does HDR video work at 1080p?
[Android Apps and Games] Granite1:
I haven't found any options to select shutter speed yet. Maybe EarlyMon has found something I haven't.

I've loaded up Jishnu's camera, and when I select HDR video, it has the resolution settings grayed out. It says "Full HD 1920 x 1080". Manual settings seem to work.I'm not well versed on the camera settings, so I may be holding it wrong. :o

I don't recall if there were any differences from the stock camera, since I didn't mess with this stuff until after I loaded Jishnu's.

PS: I checked out the RawTherapee editor, works good, and it will allow you to save 16bit .tiff & .png's. Still need to play around with it more to get a better understanding. :)
[Android Apps and Games] Carlos_EVH:
Nope, I only can choose jpeg format :(
[Android Apps and Games] EarlyMon:
-6 gives 16-bit layers, Elle said that -m 40 seemed unnecessary given that the images didn't look noisy - I couldn't resist, so I went for 10 iterations on the -m.

Note that -4 = -6 (16 bits) -W (suppress lightening) -g 1 1 (linear gamma)

And -q 3 (AHD interpolation) is the default - which I had stuck in my head wasn't, so just leave that off.

So, I did -

dcraw -v -m 10 -r 2.132583 1 1.480864 1 -6 -T IMAG0003-puppy.draw

Result, with no changes or edits -

Actual tiff - https://drive.google.com/file/d/0B2MPU5MqABTXbWNWdXBJcl9rQmM/edit?usp=sharing

And I believe that you'll find the above is the same as -

dcraw -v -m 10 -r 2.132583 1 1.480864 1 -6 -T -H 2 IMAG0003-puppy.draw

Where -H is the highlight modifier.

PS - pretty sure that Granite is using the M8 cam, like me.

---------- Post added at 03:00 PM ---------- Previous post was at 02:43 PM ----------

Here's a recap of the heavily processed photo from my earlier post, followed by the same using -

dcraw -v -m 10 -r 2.132583 1 1.480864 1 -6 -T -H 2 IMAG0007.draw

I think the additional sky detail makes it pretty obvious that Elle was only 100% right (thank you Elle!).

Here's the full tiff of the second one, no other processing done.

https://drive.google.com/file/d/0B2MPU5MqABTXemRnWHJQdURReWM/edit?usp=sharing

Note - the building was shot with +1 EV because I'd thought from last week's trials it would need that. So, that's why it's a bit overexposed.
[Android Apps and Games] starbase64:
[MENTION=2682748]EarlyMon[/MENTION] nice, thanks
[Android Apps and Games] EarlyMon:
defcomg - would you please shoot me the dcraw.c mod for the One S camera from your first post?

I need to build a copy for myself.

Thanks!
[Android Apps and Games] defcomg:
done
[Android Apps and Games] EarlyMon:
Thanks!

---------- Post added at 08:56 PM ---------- Previous post was at 08:49 PM ----------

Yeah, another buddy of mine tried your One S camera with his One SV.

Looking at the file size and resolution, I tried -

{ 6746112,2592,1944, 0, 0, 0, 0, 0,0x61,0,0,"HTC","OneSV" },

But - it's not working.

I suggested he try another camera.
[Android Apps and Games] defcomg:
{ 6746112,2592,1944, 0, 0, 0, 0, 0,0x16,0,0,"HTC","OneSV" },
[Android Apps and Games] EarlyMon:
Yeah, that didn't work - I think he was off on what he told me about the resolution, and...

...so I tried -

{ 6746112,2592,1552, 0, 0, 0, 0, 0,0x16,0,0,"HTC","OneSV" },

Still no go.

And then -

{ 6746112,2592,1552, 0, 0, 0, 0, 1,0x16,0,0,"HTC","OneSV" },

Nope.