Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.91k stars 325 forks source link

LCP profiles don't work on any RT version > 4.2.36 when there is no lens information in exif #2895

Closed xileffelix closed 8 years ago

xileffelix commented 9 years ago

Version 4.2.1 and below works as expected. Every version greater 4.2.1 simply ignores the LCP profiles.

You can select and load the LCP profile but vignetting and distortion wont be applied to the RAW picture. RT behaves like normal and applies something without throwing exception or error message. After applying the LCP profile the resulting JPEG has the same checksum as converting the same RAW without a LCP profile.

Tried on three different maschines, Linux & Windows.

Any hint? Something seemed to be changed between version 4.2.1 and 4.2.162 that leads to this behavior...

heckflosse commented 9 years ago

works fine here with 4.2.345 Win7/64

Beep6581 commented 9 years ago

'Every' version since 4.2.1 has correctly working LCP here in Linux. What is your preview zoom level? Furthermore it is quite unlikely that you would have gotten the same checksum even if you processed the same image twice in a row, so I'm inclined to think this is a user error.

Sample raw files and LCP file not provided. http://rawpedia.rawtherapee.com/How_to_write_useful_bug_reports

xileffelix commented 9 years ago

Thanks for your answers! Sorry for the missunderstanding, the resulting files of course do not have the same checksum, they have exactly the same size which indicates that no changes have been applied.

Meanwhile i found out, that all LCP profiles work if I take a RAW file from a different camera model. It seems to be a problem with the RAW file of a Sony Alpha7 and RT > 4.2.1

Attached please find the RAW and LCP file:

https://www.dropbox.com/s/0dcap9okmohwcto/DSC01851.ARW?dl=0 https://www.dropbox.com/s/p3iymy7vooasz8r/Leica%20Camera%20AG%20%28Voigtlander%20VM%2015mm%20f4.5%20Super%20Wide%20Heliar%20III%20Aspherical%29%20-%20RAW.lcp?dl=0

If you need anything else please let me know...

heckflosse commented 9 years ago

I can confirm that up to 4.2.36 with your files vignetting correction worked (kind of). But in my opinion it doesn't make much sense to use vignetting correction with a lcp when there is no lens data available in the raw file. So I vote to make no changes in code for this case. For reference: https://github.com/Beep6581/RawTherapee/issues/2581

Beep6581 commented 9 years ago

Review your workflow to find what's causing your raw files to lose Exif and MakerNotes. RT works correctly.

xileffelix commented 9 years ago

Workflow:

Not an unusual case to attach a manual classic lens to a digital camera. The camera can't even know what focal length the lens has. For RT <= 4.2.1 missing focallength in exif data wasnt a problem, now it is and there seems to be no way to use a Digital Camera + classic lens + RT without additional exiftool step?

michaelezra commented 9 years ago

Can you set the focal length in this camera when attaching a manual lens?

heckflosse commented 9 years ago

I use a lot of manual classic lenses on my digital cameras. Fortunately D200 and D700 allow to set max aperture and focal length in camera ;-) For xileffelix's cam it seems that it's possible to set the focal length but it's not stored in exif http://www.dpreview.com/forums/post/55268617

Just an idea: We could pass 1 in case it's zero for this cases...

heckflosse commented 9 years ago

Btw: I just detected that vignetting correction using lcp lacks the clip control we have when using a flat field for vignetting correction...

xileffelix commented 9 years ago

right, unfortunately exif data is only stored if you attach original lenses... I would be happy to see a solution like heckflosse proposed

heckflosse commented 9 years ago

xileffelix, I already tested the solution I proposed. It works with vignetting correction. Do you also have a lcp file which corrects distortion for that lens? Without such a file I'm not able to test the 'distortion correction' part.

xileffelix commented 9 years ago

sorry my fault, i thought distortion correction was included in the lcp file. But it seems that distortion correction is not necessary and/or availible for this lens.

heckflosse commented 9 years ago

Ok, I'll create a pull request with the fix (and with the clip control feature) soon

midluk commented 9 years ago

You can (and imho should) always use exiftool to add the missing lens information to the raw file. Especially if you stop down the lens you likely have to do this to get the correct vignetting correction. That way you will also have correct exif information in the exported jpegs and you can still do lens corrections in the future when you have forgotten what lens you used for the picture.

heckflosse commented 9 years ago

midluk, I absolutely agree! But it's only a 4 liner to get old behaviour back and (that's more important) I'll use this case to implement the clip control feature (which we already have for flat field vignetting correction) for vignetting field correction using lcp too.

midluk commented 9 years ago

Heckflosse, this was not meant as an objection to the patch, but a suggestion to xileffelix.

xileffelix commented 9 years ago

you are right, its always a good point to add missing exif information. In my case (and obviously there could be other RT users) i simply tried to apply the correct lens profile not knowing that the missing exif information leads to the problem that RT ignores the LCP profile. So I am glad heckflosse applied a patch and of course using exiftool to add missing information will be usefull for various reasons. Its a pitty Sony did not implemented this into the camera...

heckflosse commented 9 years ago

midluk, I know :-) I just wanted to mention that to get some tests for the clip control feature as soon as the patch is completed (probably tomorrow) ;-)

RawConvert commented 8 years ago

hi Ingo, @heckflosse , I was wondering what the outlook is for this issue as I had it yesterday with RT win64 4.2.880. I'm using a manual Samyang 14mm and this has quite a lot of geometric distortion. I have a .LCP which works with P/shop and works in RT if the file has a lens named, e.g. canon 85mm was fine, RT applied the samyang LCP. But the Samyang files have "Unknown" lens and though the progress bar at the bottom looks like it's processing, the image is unchanged both on-screen and in the output file. Regards, Andrew.

heckflosse commented 8 years ago

Fixed