It looks this lens has built-in correction parameters that are applied automatically by software like LightRoom and Nikon Capture/NX View. I’m wondering would it be possible to do something similar with RawTherapee? Without this correction I see large geometric distortions just like described on DXO Mark site:
“So it isn’t really surprising to see that without its built-in corrections, the Nikkor Z zoom has rather high barrel distortion at 24mm and displays high pincushion distortion at 70mm.”
Great news! Last time I did not find this command even though I have lensfun package installed. I guess I’ll download the source code and build the lib myself.
OK, downloaded the latest lensfun sources, built and installed. Ran the update Python script. Now I can see my lens in 2 files:
~/.local/share/lensfun/updates/version_1/mil-nikon.xml: Nikkor Z 24-70mm f/4 S
~/.local/share/lensfun/updates/version_2/mil-nikon.xml: Nikkor Z 24-70mm f/4 S
But the lens is not recognized automatically in RT and when I tried to select it manually I don’t it listed. I guess I need somehow to tell RT to look for the new lensfun database?
Then I got sources for RT Release 5.7, but cmake does not see lensfun:
t_build$ cmake -DCMAKE_BUILD_TYPE=“release” -DCACHE_NAME_SUFFIX="" -DPROC_TARGET_NUMBER=“2” -DBUILD_BUNDLE=“ON” -DBUNDLE_BASE_INSTALL_DIR="$HOME/programs/rawtherapee" -DOPTION_OMP=“ON” …/RawTherapee/
– The C compiler identification is GNU 9.2.1
– The CXX compiler identification is GNU 9.2.1
– Check for working C compiler: /usr/lib64/ccache/cc
– Check for working C compiler: /usr/lib64/ccache/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/lib64/ccache/c++
– Check for working CXX compiler: /usr/lib64/ccache/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– CMAKE_BUILD_TYPE: release
– Found PkgConfig: /usr/bin/pkg-config (found version “1.6.1”)
– Checking for module ‘gtk±3.0>=3.16’
– Found gtk±3.0, version 3.24.11
– Checking for module ‘gtkmm-3.0>=3.16’
– Found gtkmm-3.0, version 3.24.1
– Checking for module ‘glib-2.0>=2.44’
– Found glib-2.0, version 2.60.7
– Checking for module ‘glibmm-2.4>=2.44’
– Found glibmm-2.4, version 2.60.1
– Checking for module ‘cairomm-1.0’
– Found cairomm-1.0, version 1.12.0
– Checking for module ‘gio-2.0>=2.44’
– Found gio-2.0, version 2.60.7
– Checking for module ‘giomm-2.4>=2.44’
– Found giomm-2.4, version 2.60.1
– Checking for module ‘gthread-2.0>=2.44’
– Found gthread-2.0, version 2.60.7
– Checking for module ‘gobject-2.0>=2.44’
– Found gobject-2.0, version 2.60.7
– Checking for module ‘sigc+±2.0>=2.3.1’
– Found sigc+±2.0, version 2.10.2
– Checking for module ‘lensfun>=0.2’
– Package ‘lensfun’, required by ‘virtual:world’, not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:457 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:642 (_pkg_check_modules_internal)
CMakeLists.txt:322 (pkg_check_modules)
– Configuring incomplete, errors occurred!
See also “/home/andrew/soft/rt_build/CMakeFiles/CMakeOutput.log”.
See also “/home/andrew/soft/rt_build/CMakeFiles/CMakeError.log”.
I am not sure how good of an idea is to copy a ‘version_2’ file in a ‘version_1’ lensfun DB. Just check that some other things are not broken or that you really get the things you want corrected and not something else.
I have a problem building RawTherapee when lensfun is also built from source code. By default lensfun built from source code is installed in /usr/local. So I run cmake for RT as:
Checking for module ‘lensfun>=0.2’
– Package ‘lensfun’, required by ‘virtual:world’, not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:457 (message):
A required package was not found
So how do I specify lensfun location for RT when lensfun is installed in /usr/local?
I cannot point RT to lensfun if it is installed in /usr/local when lensfun is built from source code. Something in RT cmake configs insists on having lensfun-devel package to be installed. Otherwise I have this error:
– Checking for module ‘lensfun>=0.2’
– Package ‘lensfun’, required by ‘virtual:world’, not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:457 (message):
A required package was not found
But the official lensfun-devel package is not the latest and does not have the lensfun-update-data command. So I have to have another lensfun installation, this time built from source code.
Then I can run /usr/local/bin/lensfun-update-data which updates data files in my home directory:
Successfully updated the database in /home/andrew/.local/share/lensfun/updates/version_1.
Successfully updated the database in /home/andrew/.local/share/lensfun/updates/version_2.
Then in RT I can manually select Nikon Z6 and 24-70 f/4 S and corrections are applied.
Phew! That’s a long process and now I have 2 installations of lensfun, but it seems it works. Maybe I need to talk to lensfun maintainers for Fedora and ask why the command to update the database is not included in the official package.