• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Raw camera

EarlyMon

The PearlyMon
Yes.

The Holy Grail may be near.

Stock camera modified to save raw Bayer sensor data into draw files, co-exists with your existing stock camera that outputs jpgs.

You then post-process the draw file on your Mac/Linux/Win PC into high quality output files - png (yes! lossless!), jpg or even 16 bit linear tiffs for best results with Photoshop (I don't use Photoshop so I don't know what I just said there).

There are very good raw image post-processors for our phones but they don't understand these draw files (yet) so for now, conversions have to happen on a PC. They have a test camera app up at the end of thread that does the conversion on the phone but danged if I could figure it out.

http://forum.xda-developers.com/showthread.php?t=2753946

This and others are linked from the thread but I thought it especially important to call this out, you want to read it if you're interested in this.

http://www.cybercom.net/~dcoffin/dcraw/

dcraw is pronounced d-c-raw.

I am so sick and tired of always having to deal with insanely compressed jpgs any time I pick up a new phone.

While I'm on that subject - anyone have a link to a modified stock camera where we can set the output quality mode, as in, highest?
 
I didn't realize that this is for Sense.

Jishnu's Camera Mod™

Flashing that in a little while. Jpg compression raised to 95%. Why not 100? No idea.

And - he's planning on adding a raw mode.

That would be ideal - selectable high quality jpg or raw in the stock app.
 
Awesome find EM!!

I can't mess with this today, might have to be a Sunday project.

If I read that right , the modified stock camera outputs a raw data file in addition to the actual picture. Once taken we can use a conversion program on our PC/MAC/Linux machine to merge the files together to get the really high quality pictures we want. Correct?

If that's the case, we have to help this guy get the auto conversion working in house on the phone. These things have the processing power, should only be getting the code to automagically convert.

This is really exciting news! :)

EDIT: Please let me know how the modified camera from your second post works when you flash it. :)
 
Awesome find EM!!

I can't mess with this today, might have to be a Sunday project.

If I read that right , the modified stock camera outputs a raw data file in addition to the actual picture. Once taken we can use a conversion program on our PC/MAC/Linux machine to merge the files together to get the really high quality pictures we want. Correct?
Not quite.

Right now, the raw camera installs alongside your regular one and due to magic, they don't conflict.

1403369516595.jpg

The one on the left is pure stock, the one on the right is exactly identical except it outputs draw files.

Move the draw to the pc, run dcraw, pick your high quality output. If you choose a high quality jpg over there, be prepared for some surprises on the new jpg file sizes, depending on your settings.

I have to compile dcraw for my use, will post samples asap.

Jishnu's camera - replaces the stock on the left in my app drawer example, adds a few user features, not a lot, but ups the ante with constant bit rate video (not variable) at 35 Mbps. Your video files will skyrocket in size but that's the price you pay. The jpg only output is still there but the quality is higher than stock.

Once my dcraw build is done and I can translate the draw I took, I'll post a 3 way example of stock, Jishnu, and raw-to-lossless.

Eventually, Jishnu is going to add raw into his and I expect to see that as a save option, so you can have a jpg to look at right away on your phone, and a draw file to convert later for maximum results.

I've gone through every app I can find, I don't think that a way to view or preview draw files exists for our phones - yet. Other raw formats, yes, but not this one. No on-phone converter either - yet. :)
 
Oh hell, here's a preview.

Stock -

14287128718_cf63f45130_o.jpg


Jishnu's -

14470352821_5e685b7494_o.jpg

Read the lighter.

I know it's not perfect in the second, but go full size and try - I think the difference is obvious.

All auto / default in both. Only thing that I tried to pay attention to was the camera at the closest possible position for me each time and steadied for no shake.

I've been lecturing for almost a year and a half that megapixels don't matter without owning an Ultrapixel camera, and that the issue is jpg compression, not resolution.

There's proof, right there, and that's without a complete compression solution.

Can't wait to see the translated draw.

I'm sure that the scene above will be considered a terrible picture or offensive content by many.

I'm here to explain compression and I make no apologies. :D

Caution - view on best screen you can, and don't bother with Tapatalk. Dolphin is fine, expand the images first.
 
I can see the difference in those photos EM. For some of the photos I take, I can see an advantage of having the better detail / compression, as the devil can be in the details.

I'll try to play around with this if I have time this evening, or tomorrow. If you get anything from XDA let us know.

Super awesome you found this my man!! :D
 
I think that you're going to find a big difference in color details too.

Don't know if you caught that from the red on the lighter - so check this out.

http://forum.xda-developers.com/showpost.php?p=52470579&postcount=1331

I wish that he had better side by sides but I think that helps show it as well.

I have that Windows laptop sitting closed on the other side of the den. I have to use Windows at work, I'm doing all I can to not have to go try it on that. It's Saturday.

And I got my mind right on the file formats.

dcraw can produce tiff or an intermediate format that you can use to get to the other codecs.

I know that's not going to be a problem.
 
I'm sure that the scene above will be considered a terrible picture or offensive content by many.
Nothing wrong with being a fan of the Doctor.... :D

Don't think anyone here will judge you for that!

Don't know what else you could be referring to. :smokingsomb:
 
Ok, no help yet - so - I reinstalled the generic test camera he has for M8, and at the end of the chain, produced a 16 MB tiff out of a raw snapshot.

But only using Rawker methods, not dcraw. :(

Anyway - I'm as far as producing (crappy lmao) 8+ MB png files so far...
 
Ladies and gentlemen, we have the corrected c source code for the M8 courtesy of defcomg, have translated two files successfully (although, my color balance is off, that's something that I can sort out - it's a bad input parameter on the command line, I already know that) and the rocking and a rolling is about to commence!!!
 
The Windows version of dcraw is fine.

Most of you want that and you want the Camera2.apk from the OP.

If you need to build dcraw for something else, see the OP's advice to me there and ask questions in either thread. I'm more likely to see them here fwiw.
 
Just to be sure I'm understanding whats what here, Jishnu's camera will replace the stock camera (which is just the stock camera with extra goodies) and the Camera2.apk is the Draw file camera to get the post processing magics correct?

I've downloaded the dcraw application, need to set it up. Might have to pour a glass of Jameson and get comfortable. :)
 
Just to be sure I'm understanding whats what here, Jishnu's camera will replace the stock camera (which is just the stock camera with extra goodies) and the Camera2.apk is the Draw file camera to get the post processing magics correct?

I've downloaded the dcraw application, need to set it up. Might have to pour a glass of Jameson and get comfortable. :)

Yes.

You can get great shots just using Jishnu's camera, get Version 2.

You're going to flash it from TWRP and it replaces your HTC camera in /system/app. Because it is your HTC camera on steroids.

Then get just like draw Camera2.apk and install it, it's going to go in like any other user app into /data/app.

Camera 2 only produces draw files.

Useless until you get them in front of dcraw on your pc.

For lighter pictures, drop the "-4" from the dcraw command line.

We'll have to tinker with the "-r" numbers to get the full benefits - unless you're a Photoshop genius because that's who the "-4" input for dcraw is for.
 
To run dcraw we need to open the CMD prompt and navigate to the program correct?

Otherwise the .exe I downloaded from the XDA thread starts to open the immediately closes. :confused:
 
To run dcraw we need to open the CMD prompt and navigate to the program correct?

Otherwise the .exe I downloaded from the XDA thread starts to open the immediately closes. :confused:

OK, I've got a case of the Monday's. :mad::p

CMD prompt driven compiler, duh.

Getting this far, and can't get anywhere:

Code:
C:\Users\Rocky\Desktop\fone\M8\Dcraw>dcraw -v -4 - q 1 -T -m 15 -h 5 -r 2.132583
 1 1.480864 1 IMAG0001.draw
Unknown option "- ".

Any suggestions EM?
 
- q1

Is really

-q 1

Good god, I saw that post over at XDA, and I still screwed up the code. :p

Thanks EM. :)

Once I get a photo compiled, I'll give a go at editing the file with Gimp. Should be able to do everything that Photo Shop does, or close to it. :)
 
That did it! :D

Here's my first attempt at modifying an image with Gimp2:
Pre-edit:


Post-edit:


[/Hide]

Seems to work really well. I'll need to learn how to use the editing effects in Gimp a little better. I'm loving the way this works!! :D
 
How about I straighten that house in the background up for you some?

14473254596_d05da2f107_b.jpg


Check out "Photo Editor"

https://play.google.com/store/apps/details?id=com.iudesk.android.photo.editor

HA!!

I never noticed before, that house does look really crooked. :p

Going to grab Photo Editor now.

I really need to research how to use Gimp better. If you zoom in on my Misses face, there's a lot of "noise" going on. I'm going to maybe try anti aliasing, if that will work? This is completely new territory for me, so I'll need to play around. Lastly I know next to nothing about photography, so the settings in the camera almost never get adjusted. Time to fix that as well. :o
 
HA!!

I never noticed before, that house does look really crooked. :p

Going to grab Photo Editor now.

I really need to research how to use Gimp better. If you zoom in on my Misses face, there's a lot of "noise" going on. I'm going to maybe try anti aliasing, if that will work? This is completely new territory for me, so I'll need to play around. Lastly I know next to nothing about photography, so the settings in the camera almost never get adjusted. Time to fix that as well. :o

Well, scratch my idea about coming to you as a my GIMP expert! :D

I'm running an older version. When I load mine (open as layers) it complains that it can't handle 16-bit layers and knocks then down to 8.

Does yours do that?

I didn't study your picture for detail because of the photobucket compression. I loved what you got for colors!

And yeah - I'm pretty jazzed about being able to knock off some of the small camera wide angle distortion.

At least the next time someone tells me that his cell phone takes perfect pictures because of the megapixels... :rofl:

Wish HTC would have doubled the size of the camera app and kept the rest of the editing tools - the actual tools, like for levels, etc. Oh well, means I have to run another app. The old one sure was easy though.
 
Using Gimp for drawing, I'm good. Using Gimp for photo editing, I'm learning. :D

No, mine does not complain about 16bit at all. Let me open the layers tool and see if thats happening on mine. If you're using an older version of Gimp, you should upgrade. Gimp2 is really nice.

Once I get a few more photos under my belt, I'll post up what tools to use, and how to adjust for color and brightness. :)

Here's the users manual for Gimp: http://download.gimp.org/pub/gimp/help/windows/2.8/2.8.1/gimp-help-2-2.8.1-en-setup.exe

Install that on top of Gimp2 EM. It's the ursers maunal that is accessable through the Help menu. Go under Chapter 10, it's for digital photo editing. Starting to read now, but I'll have to finish later, work beckons!
 
My GIMP is ancient. Definitely going to upgrade. I'm expert at manipulating gifs but I'm new to this whole area of manipulating layered photos.

Plus, I'm with you, there's no substitute for just RTFM! :D
 
Back
Top Bottom