amirzaidi / DNGProcessor

Bring out the best in your phone's camera
GNU Lesser General Public License v3.0
131 stars 18 forks source link

Apply Gainmap #3

Closed make-stronger closed 5 years ago

make-stronger commented 5 years ago

Hi @amirzaidi, how to apply lenshadingmap with opengl version?

amirzaidi commented 5 years ago

The lens shading map is not saved in many devices' DNG files so there's currently no support for parsing it

make-stronger commented 5 years ago

I guess currently this project missing lens correction step so the result seem to be brighter in the center and darkened out.

make-stronger commented 5 years ago

If have lens shading map, how to convert gainmap function from RS version to OpenGL version? @amirzaidi .

Thanks,

make-stronger commented 5 years ago

Hi @amirzaidi, i was make a comparison between 2 version of DNGProcessor and apply in https://github.com/googlesamples/android-Camera2Raw to process DNG to JPEG:

RS version OpenGL version JPEG output from device

In RS version, I applied lens shading map and the result is more better.

amirzaidi commented 5 years ago

I know that it is better, the problem is that the gainmap is not included in the output DNG file for the phones where I'm testing on, and is only available as metadata from the Camera2 API. I'd have to make a database of gainmaps for different lenses before I could implement it using these DNG files

amirzaidi commented 5 years ago

https://github.com/amirzaidi/DNGProcessor/commit/b26469a1888c54c4d8ef4585bc4d53ab04902802

Implemented it, but it won't work on many OEM Camera apps

amirzaidi commented 5 years ago

https://github.com/amirzaidi/DNGProcessor/commit/a4cc750c6e84e8adeb88eaa0665bd142ba63ae18

This change fixed the coordinate sampling, so now it actually works...