kunzmi / ImageStackAlignator

Implementation of Google's Handheld Multi-Frame Super-Resolution algorithm (from Pixel 3 and Pixel 4 camera)
GNU General Public License v3.0
392 stars 65 forks source link

how to populate ExtraCameraProfiles.xml #6

Closed alex-111-gh closed 4 years ago

alex-111-gh commented 4 years ago

Hi Michael @kunzmi, I've tried to test run this project on a set of converted DNG raw files (from canon's CR2). I'm getting a null exception right after loading a few images: basically at the point of getting a value from the null profile (absent in ExtraCameraProfiles.xml): DNGfile.cs L306:


ExtraCameraProfile profile = profiles.GetProfile(make, uniqueModel); 
// profile is null for everything besides PENTAX K-3

Question: what is the suggested way to generate or get one for my camera?

Thank you very much!

kunzmi commented 4 years ago

The ExtraCameraProfile is mostly necessary for my Pentax PEF files to fill in missing information that is not part of the RAW file (color matrix etc...). I also use it for noise profile parameters as they are not always present in all DNG files. So if you have a DNG file that contains the noise profile tags you can just ignore the error (it is in a try/catch block, or even better check for null before accessing...). If your DNG files do not have the noise profile tags you need to determine that first and fill in the XML. You need a series of images of an equally illuminated white surface with varying exposure times to measure the standard deviation for different brightness values and then fit the noise model to these values which gives you the alpha and beta values. Or you could search in some open databases as given by RAWTherapee, Darktable...

alex-111-gh commented 4 years ago

@kunzmi thank you that was very helpful!

The next one: Exception at ImageStackAlignator\PEFStudioDX\ImageStackAlignatorController.cs L2336:

_imageToShow = new NPPImage_8uC4(_pefFiles[0].CroppedWidth, _pefFiles[0].CroppedHeight);

System.DllNotFoundException: 'Unable to load DLL 'nppisu64_100': The specified module could not be found. (Exception from HRESULT: 0x8007007E)'

I'm on CUDA 10.2 (it has C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\nppisu64_10.dll), seems like there should be NuGet package for 10.2 managed cuda and associated libraries (NPP etc.) I checked that the latest published managedCuda is at 10.0.0 and this project is shipped with 10.1 (if I'm not mistaken). Please advice.

Would it make sense to bump dependencies to 10.2 and update this repo to 10.2 too? I'd do it myself and create pull request, but for better or worse I've not developed in windows for a long time :)

Thank you!

kunzmi commented 4 years ago

I haven't managed to release managedCuda for Cuda 10.1 and 10.2 yet. I use here the NuGet package in version 10, which itself relies on Cuda toolkit 10.0. So to get it to run you need either the toolkit in version 10.0 to be installed, at least the Cuda libraries (npp, cublas, etc), or as I'm about to release ManagedCuda for Cuda 10.2 soon, you just wait a bit :)

alex-111-gh commented 4 years ago

Sure, np, thanks! I'll wait for the release. Do you also plan to push dependencies update into this repo?