PinePhone camera Play RAW

Martijn Braam has the first Raw images from the PinePhone.
He got the driver to work and wrote an GTK3 App in C to make photos:

At the end of the post he writes:

If you want to try to post-process a PinePhone raw image yourself, there’s the 5-frame burst used for the images above: Index of /pinephone-burst

At the moment he does the post processing after shoting the images with this script:
https://git.sr.ht/~martijnbraam/megapixels/tree/master/postprocess.sh (stack_frames, dcraw/dcraw_emu, imagemagick, exiftool)

And here is the complete code:
https://git.sr.ht/~martijnbraam/megapixels

3 Likes

here is my result using the five garden dng in vkdt:

note that i didn’t attempt to do super resolution, i just merged the images for noise reduction. when i compare against the image on the webpage you linked this seems to actually work.

not sure there’s much to gain from super res here, the lens looks incredibly blurry. has this plastic smartphone feel to it. i did apply a round of deconvolution (“capture sharpening” like), this helped a lot.

most of the highlights are blown out and, well, the colours are off, but you get the idea :slight_smile:

has this plastic smartphone feel to it.

Perhaps because it is from a sheep plastic smartphone. :wink: The PinePhone costs just 150,-$
and has a 5MP sensor. (OV6540 from 2011).

Where does the border with noise at the top and at the left in your image come from?
And how have you merged the images in vkdt?

hm sorry i know nothing about telephones, and usually don’t accept their sensors as “camera”. wasn’t aware this one is even cheap and comes with linux, which i am way more impressed by than by the image quality :wink:

i think the border comes from my boundary handling in the deconvolution (or lack thereof). possible that it interpolates leftovers from black border cropping. need to double check, but i’m still not too worried about these “final touches”.

how have i merged them: there’s a button for that in the gui, if that’s what you mean? it uses some custom alignment code (takes 9.129ms to align these 5 relatively lores shots).

how does one program this phone? does it have a GPU?

1 Like

how have i merged them: there’s a button for that in the gui, if that’s what you mean? it uses some custom alignment code (takes 9.129ms to align these 5 relatively lores shots).

That’s what I wanted to know. (some custom alignment code)

how does one program this phone?

I don’t have one but afaik you can simply connect it to a USB-C docking bar, add a keyboard, mouse and monitor and start hacking. I just found this video:

does it have a GPU?

Yes, a Allwinner A64 Quad Core SoC with Mali 400 MP2 GPU

nice, thanks. the GPU is a 2008 build, and it does support opengl es 2.0. i haven’t done much oldschool opengl, but i think this one even doesn’t have compute shaders (afaik that’d be 3.0), so it’ll be, let’s say, tricky to implement anything on it.

Hi, i found pdf file describe white balance, it could be useful for achieve neutral colors in a photos https://www.researchgate.net/publication/308692177_A_Fast_White_Balance_Algorithm_Based_on_Pixel_Greyness