Here’s what Lollipop’s raw image support can do for the Nexus 5 camera

by: Bogdan PetrovanOctober 20, 2014
1.9K
l camera app

PkmX’ L Camera experimental camera app

Lollipop is here and one of its most important new features isn’t visible to users at all. It’s the all-new camera API, which opens up hardware features that were simply inaccessible to app developers until now.

One of the biggest features enabled by the new Camera API in Lollipop is support for raw image formats. Raw images are the closest thing we get to the full, uncompressed information output by a camera sensor. The typical JPEG file, in contrast, contains just a small portion of that information, in order to minimize file size.

Up until Lollipop, app developers only got access to JPEG images, even if the camera hardware could support raw formats. That drastically limited what apps could do with the image.

The introduction of raw support in Lollipop opens up a world of possibilities when it comes to camera apps, as well as the possibility to get better shots by editing raw images with a specialized tool.

A Taiwanese developer going by the handle PkmX created an experimental camera app that takes advantage of the new APIs and used it to capture a few samples in the DNG raw format, using a Nexus 5. He then edited some of the images with a desktop tool called RawTherapee and uploaded the samples to Imgur.

First, here’s the JPEG image taken by the Nexus 5 on auto exposure with PkmX’s app:

02 - Auto Exposure JPEG

Here’s the JPEG image taken by the Nexus 5 on a tripod at ISO 100 and ½ second exposure time:

04 - ISO 100 JPG

And here’s the image obtained by editing with RawTherapee the raw DNG file taken with PkmX’s camera app:

05 - ISO 100 Edited

For comparison, here’s the image you’d normally be able to get using the Google Camera:

06 - Google Camera

To be clear, to obtain the excellent result seen above, PkmX used a manual exposure setting and manual editing in a desktop app. Still, the difference between the DNG file and the “default” image taken with the Google Camera is striking. As PkmX put it, the edited DNG is the absolute best the Nexus 5 camera is capable of.

The Nexus 5 is known for its mediocre camera, but the good news is it could get much better once apps that use the new Camera API come out. Even if results won’t be as drastically improved as in PkmX’s samples above, the difference will probably still be visible in most situations.

For more samples, including explanations of the settings, check out the Imgur album, as well as this thread on Reddit. If you’re interested in the experimental camera, you can get it from Github.

  • Nikesh Sharma

    Wow…. Just wow…

  • lukas77

    Impressive

  • dodz

    daaaaaamn! that image quality is impressive! too bad no matter how good that image is, 90% of us will just upload it to social networking sites where it will get compressed and its quality reduced.

    • Still, though, compression on a better image will still result in a better image after the compression. I do get what you mean, though.

      • Sequoia46.2

        Not even. Facebook mutes the colours too on mobile uploads and it drives me crazy that there’s no way to upload in high quality.

      • dodz

        If images turn out to be always like this, I think Im gonna consider buying those gimmicky clip-on lenses. like wow just open the whole image and look at the amazing details, hard to believe this is a phone camera sensor.

    • Hodraghar

      except for Google+ ;)

      • Cole Raney

        Yeah no kidding. I never noticed how much facebook compresses photos until I took a trip to Chicago. I took 300 pictures and put them on google+ and facebook. The google+ pictures look better. Especially for panorama pics.

      • Jason

        They both compress to the same size but google does a far better job. To get the best upload you have to compress it before you upload it via lightroom, photoshop and the like. I think it’s 2048 on the long edge and you’ll have much better results.

        • Ant

          Hey, Jason, 2048 px? What’s the max file size? @disqus_gkEpW481sK:disqus

  • Bk Rnc

    Can’t wait

  • Victoria

    The main reason I didn’t buy the Nexus 5 was its camera, nice to see that’s improving now.

  • ABS333

    That means the cameras on the Moto products, which have been a sore point, will have this same capability for improvement. Nice to know…

  • MY

    Daaaaaaaaaaamn daaaamn! Can’ wait for CyanogenMod Lollipop to be released so I can upgrade my Nexus5 :-) Impressive

  • He mostly tweaked the white balance

  • Andreas Stefanou

    If you’re actually going to sit down and process a raw image then just take a camera with you and take the picture. Cameras on phones suck anyway and if you’re enthusiastic enough about your photography to use external software to edit raw images then why take them on a phone.

    Most people have no idea what a raw image is and when they see one before processing they dismiss it instantly. Do we really expect people that just want to snap photos with their phones to shoot raw and then go process them?
    Did someone say niche market?

    • sachouba

      You’re so pessimistic…

      • Andreas Stefanou

        Sort of :)

    • hoggleboggle

      there are many an occaision where I wouldn’t want to carry my “proper” camera around with me, so anything that will improve the image quality from my phone gets a huge thumbs up from me. I’d be happy to pay up to £10 for an app like this.

      • Andreas Stefanou

        I agree with you 100%! Having raw support on our smartphones is great! I was just thinking about the majority and that’s why I said niche market. But then again it very well might be a niche market where I live and not all over the world :)

    • David Onter

      MrMagoo
      “Understood but that being said, if software in the phone is capable of taking and editing the RAW image, then saving the edited file as a JPEG it should still dramatically improve the photo quality. Rather than saving a JPEG and adjusting that. The possibilities for apps to get better is on it’s way.”

      • Andreas Stefanou

        100% agreed!

    • Ant_Knee

      Niche market? With the prices of DSLR’s dropping from what they were years ago, there are tons of fair-weather photographers with pirated copies of Lightroom and Photoshop to quickly fill this “niche”.

      But back to the main topic, I don’t carry my DSLR everywhere I go. Having the capability to take out my phone and snap a one-in-a-million shot quickly in RAW is a nice feature. I’d rather have more nice features that I might never use than no features I want to use. You never know when opportunity arises….

      • Andreas Stefanou

        There are a few pocket cameras out there that far surpass the quality of cameras on phones. I also don’t lug around my DSLR everywhere I go but I always have an RX100 or a Fuji X series or something in the micro 4/3 world to get those pictures.

        Having said that your point is actually quite valid. I’m with you all the way, having raw support is great but maybe it’s a cultural thing because people over here have no idea what a raw file is.

        • KayEss

          Actually with a nokia 808 and great manual control, I have taken some really incredible shots. I’m all for the raw option.

  • paul michael

    is it applicable in nexus 4?

    • derapage

      it’s a lollipop’s API feature…. just wait for the update!

  • Maranello Santiago

    Now let me see what the Note 3 can do (probably gotta wait for CM12 yeah)

  • JayMars84

    The most important thing is how good the picture looks immediately after taking it, not how good it looks after transferring it to a PC, and editing it.

    • MrMagoo

      Understood but that being said, if software in the phone is capable of taking and editing the RAW image, then saving the edited file as a JPEG it should still dramatically improve the photo quality. Rather than saving a JPEG and adjusting that. The possibilities for apps to get better is on it’s way.

  • Oobiewan

    How can some hardware not support raw formats? The camera sensor itself compresses the images? There is a point somewhere between the capturing and the compression. You just have to stop there.

    • The RAW->JPEG conversion could happen in the proprietary driver for the camera chip. OS sends the shutter command, driver spits out a JPEG – no amount of software updates will get a RAW out of that situation, unless the driver provides the option.

  • tooshea

    Simply amazing!!! And yet another thing the iFone can’t do! Lol

  • Omar

    WOW!

  • sushant parab

    what kind of jitsu is that?

    • Android Developer

      raw-jitsu ?

  • Mr.Yakobo

    But I already got RAW in my phone

  • Android Developer

    Can anyone explain this to me:
    I thought that RAW is just a (lossless) way to store the image data. Why does is have any advantage of making a good image?

    • Andreas Stefanou

      RAW files store all the image data as is. JPEGs actually create a preview by processing these in they way that the manufacturer has told the camera to process it.
      When you import a RAW file in Lightroom or any sort of processing software you get to tweak the image to a much higher level because you are actually changing the raw data which would have been dismissed by producing a JPEG from the camera. Working with a JPEG is far more difficult because the picture starts falling apart after some changes.
      A simple explanation would be: RAW files allow you to create a JPEG with your rules and adjustments and not let the cameras software decide for you. You set contrast, colour temperature, saturation and so on.

      • Android Developer

        So what’s the difference between RAW and other lossless file formats, like BMP and PNG ?
        Also, I don’t get what’s the difference between now and before. See, we could already handle raw data:
        http://developer.android.com/reference/android/hardware/Camera.html#takePicture(android.hardware.Camera.ShutterCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback)

        It’s just that they warn you that not all devices support it, but if the device does support it, you can use it.
        Also, about handling the original image, that’s not how you should handle it. You shouldn’t save an image as a replacement of the previous one. You should handle the original one alone.
        That’s also why there are special file formats for Photoshop and others, so that the original data will stay and won’t lose its quality over saves.

        I think that maybe, from now on, RAW will be supported for all devices. Maybe now Google decided that the hardware of all devices should be able to handle it nicely.

        • icwhatudidthere

          Lossless image format is still a processed image format. It’s an image that’s been sharpened, highlighted, etc. RAW should be the raw data from the sensor, no sharpening, no white balance, no processing at all.

          • Android Developer

            I see, but what’s the difference between now and then ?
            Look at the link I’ve put. They write:
            “The raw callback occurs when the raw image data is available (NOTE: the data will be null if there is no raw image callback buffer available or the raw image callback buffer is not large enough to hold the raw image).”

            Isn’t it the same raw data as talked about here (aside from not always being able to use it) ?

          • I am not sure what that is, but I am sure that support for DNG (raw format) was only added in Camera2.

          • Android Developer

            Ok, thank you all !
            :)

        • Andreas Stefanou

          “Also, about handling the original image, that’s not how you should handle it. You shouldn’t save an image as a replacement of the previous one. You should handle the original one alone.”
          In a sense you are absolutely right and I always duplicate images so that the original remains untouched. Then again there is always the option to go back through the History tab in Lightroom, or any other software.

          • Android Developer

            ok, I am not familiar with Lightroom. I just pointed out a general thing…

  • Pawel C

    Buy OnePlus One, you’ll have raw files right now, without lollipop :)

  • eric Soulliage

    is that a raspi by the camera ? i’m starting to like the guy already ;)

  • Harvie Galenzoga Boles

    This API is what I’ve been waiting for the whole time <3

  • Tony Hoffman

    How about getting the software on the phone right like Apple does so you don’t have to make a bunch of edits… I’m sorry but apple is killing the competition when it comes to pulling your phone out, sensor decting the scene properly and the phone software properly balancing colors accurately.

    Until an API allows developers to over ride the poor work done by OEMs, I will continue to not be impressed. However, it was my understanding that this API may do just that. Let’s hope so because so far Android OEMS seem to put half ass work out for the cameras automatic mode, or maybe Apple is just that good.

    Signed. An Android enthusiast.

  • frhow

    Lollipop just keeps on getting better!!

  • Marc Malilay

    I’m not really sure what API means and don’t know a lot about app developing either. But I’m really hoping that this gives Instagram the ability to put their Hyperlapse app on Android. Have you seen what it could do on IOS? It uses the phone’s gyroscopes and accelerometers to make the video super smooth. I’m talking professional film making level stabilization. Well, that’s a bit of an exaggeration, but look it up. It’s really, really good.

    Personally, I’m hoping for this feature to come embedded within the stock Google camera but letting app developers play around with it and making something even better out of it is good too. I know that it might be scoffed at but sometimes I like to make little YouTube videos of my holidays for friends and stuff using my phone. Now its camera isn’t exactly top of the line (A first generation Moto G) but its…okay.

    Besides I’m planning on getting something like the OnePlus Two or Xperia Z4 next year. And the quality of those phone’s camera with their highly likely OIS coupled with something like Hyperlapse would be a real treat :)

    I know, I know. TL;DR but when I’m excited about something I go of topic quite easily #DealWithIt

  • crutchcorn

    This is amazing! As for all of you people who are hating and stuff, I am a student with little to no money but am an avid photographer. This is great for people like me who want their phone to act as a DSLR (which is just another cost to me)!

  • Abdelrahman Abounegm

    Is this hardware or software related? I mean, can any camera capture RAW if it has the software for it? Or does it require some specific sensors? Will the Samsung Galaxy S5 support RAW images with Lollipop, or is it just the Nexus 6 and OnePlus for now?

    • K

      I have it :) on my Nexus 5

  • René Stout

    I never thought that I would end up editing raw images taken with my phone in Lightroom. One more reason to leave my DSLR at home during a hiking trip…

  • Oliver Thomas Cervera

    THIS IS AWESOME PEOPLE

  • VAVA Mk2

    If they can release a camera app that does all of this automatically with help of the new APIs, this will be my new default camera app. Amazing how much better it looks than the default Nexus 5 camera. WOW

  • Yug Shende

    “He then uploaded samples to imgur” BAHAHAHAHAHAHAHA. Yes let’s upload raw images on a website that CONVERTS IT INTO JPEGS and then compare it to JPEGS. #fucklogic

  • aj photoartist

    Will Lollipop help any Android based up-gradable camera phone to shoot in RAW?

  • DR E XXXXX

    Android Kit-Kat can also capture images raw but outputs them as .draw files which can only be manipulated using a command line software called dcraw. I have yet to figure out how to recover shadow detail with it but the captures even from a 4MP HTC one M8 are still superior to jpegs produced by just about any other smart phone. Here goes one. I converted it to a 16 bit uncompressed .png https:[email protected]/15678375398/in/photostream/lightbox/