Windows 64 build with integration of lensfun

Yes.

RawTherapee_dev_5.2-168 - everything works fine.

Maybe, for the right logic, itā€™s worth to somehow connect this tool with the old ā€œDistortion correctionā€. Because now, after correction from lensfun, when you click on the ā€œAutomaticā€ button the image is corrected again, redundantly.

RawTherapee_dev_5.2-168 works here too, bravo, but with one remark: lensfun database seems to be older. The xml files are smaller, containing fewer data (my EOS 80D has gone, until I added it manually - this camera only or the complete previous slr-canon.xml file). The number in the timestamp is 1447322002, in previous version it was 1502862887.

Ciao Alberto,

works like a charm. Thank you.

Regards, Karlheinz

@Jacal
You are right. I have two possibilities to build RT:

  • using MSYS2 lensfun files and DB: the version identified 0.3.2.0 seems rather old. It uses Data base version 1.
  • using local build made with what I think the more up to date files.
    warning: it is also identified 0.3.2.0. It uses database version 2

MSYS2 lensfun is incompatible with version2 data base.

The first version 157 was built with local lensfun and, as there were problems, in the second 168, I went back to MSYS2 lensfun .

Now that 168 works, I am going to build again with local lensfun.

edit: built with local lensfun
RawTherapee_dev_5.2-169-g952ada55_WinVista_64_LF.zip uploaded at
https://drive.google.com/open?id=0B2q9OrgyDEfPS2FpdDAtMVI1RG8

2 Likes

After a brief test of 169 I would say, that this is it. Looks to work without issues; I will do some photos later.

The current testing daktable for Windows is using database version 1, but the timestamp is the same and the data seem to be the same, as much as I looked.

Thank you!

EDIT:
The problem is back, if RT is started as external editor, without the browser etc.; it doesnā€™t find the database. When restarted in full mode, it finds the database again after a click on Auto matched ā€¦
(Sorry, writing this in a hurry, with a laptop-in-the-rain issues.)

ping @agriggio

please report on github, thanks

@Jacal I tried to reproduce the problem on linux (I donā€™t have windows) but failed. Can you provide more details? Thanks!

Version 5.2-157-gf6303099_WinVista_64 had problems finding lensfun database in the RawTherapee\share\lensfun subdirectory.

Version 5.2-168-gbe2b1ed0_WinVista_64 was believed to work correctly, but the database was notably older.

Version 5.2-169-g952ada55_WinVista_64_LF:

Started in full mode, browsing to img.cr2, opening it in editor, here is the database:

scr1

Closing RT, browsing with an external editor, opening the image (or any other) with RT as external editor (no browser, queue etc.), the database is missing, no cameras/lenses available, nothing can be done:

scr2

Starting RT again in full/complete mode, choosing img.cr2 in RT browser, starting the editor. None is selected, Camera and Lens fields are empty, but after a click on Auto-matched or Manual or any of the both fields, the database is back and working.

If a copy of the database is made in %localappdata%\lensfun, RT still canā€™t find it in external editor mode.

@Jacal, what command-line arguments are you using for ā€œsingle editorā€ mode? can you set Verbose=true in the options file, run from a console like this:

rawtherapee.exe img.cr2 > log.txt

and then post the content of log.txt?

Important hint: You may need to reapply lensfun settings in rt with latest version of rt. For reference

From a command-line, everything works as expected. I only run into this problem, opening a file from a file browser or image viewer.

If it is just me, ignore me, please, could be something silly here. Iā€™ll come back, if I find something useful. Thank you!

@agriggio

Maybe the relative path .\share\lensfun in this case (opening a file in rt from windows file browser) is applied to the folder of the image-file, not to the rt-folder? Just an idea.

Setting rawtherapee-debug.exe as external editor in IrfanView does provide some information like
Loading lensfun database from './share/lensfun'...FAIL,
but I would rather include gdb.exe in the command. Just looking suspiciously at the huge GDB manual ā€¦

rt-debug1.txt (23.7 KB)

@Jacal thanks, Iā€™ll have a look. maybe @heckflosse is right, the problem is a relative path. it shouldnā€™t happen, there should be only absolute paths, so there might be something wrongā€¦

I just pushed a new branch lensfun-db-path-bundle with a candidate fix for this. It would be great if somebody on windows could test when building RT in ā€œbundleā€ mode (i.e. with BUILD_BUNDLE set) to confirm that it works as expected.

I checked out this branch and did a local build. The option ā€œAuto-matched correction parametersā€ is still unavailable. And the ā€œCameraā€ / ā€œLensā€ field is also empty if ā€œManual correction parametersā€ is selected.

Since I donā€™t know if I compiled the code correct, the script used to compile RT is presented just for your information

#!/bin/bash
cd /home/RawTherapee
rm -rf build
mkdir build && cd build
cmake -G ā€œMSYS Makefilesā€
-DLENSFUNDBDIR=share/lensfun
-DCMAKE_BUILD_TYPE=ā€œreleaseā€
-DCMAKE_CXX_FLAGS="-mwin32 -m64 -mthreads -msse2"
-DCMAKE_EXE_LINKER_FLAGS="-m64 -mthreads -static-libgcc -mtune=generic -mwindows -s -O3"
-DPROC_TARGET_NUMBER=ā€œ2ā€ ā€¦
make -j8 install

I also created a copy of lensfun folder under AppData/Local directory.

Thanks for your time and effort for this community!

thanks for testing! can you also post the console output in verbose mode (see the post above)?

@agriggio

Iā€™ve compiled RT from the dev branch without any parameter for lensfun and I donā€™t have any problems with the lensfun database.
Iā€™ve tested the database in the share\lensfun and AppData\Local\lensfun folder - no issues.