Strange clone displacement problem after adding lens profile

AfterShot Pro General Questions & Getting Started Forum
Post Reply
rainer042
Posts: 57
Joined: Mon Jul 30, 2012 7:48 am
operating_system: Linux
System_Drive: C
32bit or 64bit: 64 Bit

Strange clone displacement problem after adding lens profile

Post by rainer042 »

Hello,

I run ASP 3.2 on my openSuSE 42.2 linux system. Recently got a new camera (D750) and a new lens (Nikkor 24-85 3.5-4.5 VR). The problem was that this lens is not in the correction database and it really needs correction :-; . There is a similar variant of this lens without VR but its not the same, the name is different and the lens provider ids are different as well.

So I started to get correction data for my new lens from the lensFun project and converted it into a xml file for ASP3:

<?xml version="1.0" encoding="UTF-8"?>
<LenseDb>
<Lens raw="true" skip="false">
<Model>Nikkor 24-85mm f/3.5-4.5G IF-ED VR</Model>
<Mount>nikonslr</Mount>
<Exif provider="Nikon" id="B4 40 37 62 2C 34 B6 0E"/>
<FocalLength max="85" min="24"/>
<Aperture>3.5</Aperture>
<CropMultiplier>1</CropMultiplier>
<Converter factor="1" detected="false" />
<CorrectionCoefficients>
<RadialDistortion a="0.00771" b="-0.03274" c="0.01406" focal="24"/>
<RadialDistortion a="0.01346" b="-0.04515" c="0.04487" focal="28"/>
<RadialDistortion a="0.0165" b="-0.0444" c="0.05448" focal="32"/>
<RadialDistortion a="0.00831" b="-0.00929" c="0.02554" focal="42"/>
<RadialDistortion a="0.00581" b="-0.00104" c="0.0207" focal="58"/>
<RadialDistortion a="0.00072" b="0.01909" c="-0.00624" focal="68"/>
<RadialDistortion a="0.00148" b="0.01645" c="-0.00584" focal="85"/>
</CorrectionCoefficients>
</Lens>
</LenseDb>

I copied this file into my linux home directory into .AfterShotPro3/LensProfiles/ directory and restarted ASP. When selecting a photo that has been taken with this 24-85 lens my new profile is automatically selected and correction works fine.

Weeks later I discovered that I suddenly had a problem I never saw before. At first I did not not think of my added lens profile. The problem is that when lens correction is enabled (no matter which lens the photo was taken with) and you create a new clone layer and then a clone circle eg to map out a dust spot on the sensor the clone destination is displaced from the destination circle. Its hard to describe so here is a 1min screencast that demonstrates this problem:

https://userpages.uni-koblenz.de/~krien ... encast.mkv

When you deactivate lens correction everything is ok again. I tried around a lot and finally I found out that this effect always happens when my own lens profile resides in .AfterShotPro3/LensProfiles/ directory. It is not important which variant of the 24-85 lens I actually select in lens correction. The bug is always there if my new lens profile is in my personal LensProfile directory. If I remove it, delete any old .xmp settings and then try again, the bug has gone (the correction as well :-( ) . It also does not matter which RadialDistortion values I write into this file, I tried and copied values from an existing 24-85 lens variant and the bug is still there. I could of course use the existing correction of one of the lens variants but then I always would have to select this correction manually since it wouldn't match the lenses exif data from a photo taken with my 24-85 lens.

So after all to me it seems that the mere presence of this correction file in /home/<user>/.AfterShotPro3/LensProfiles/ triggers this problem. I am clueless why this happens and what I could do to avoid it.

Is there anyone who has an idea? It would also be great if someone could try to reproduce this problem. All the files (a D750raw file, the lens correction profile as well as the screencast) are available for download here:

https://userpages.uni-koblenz.de/~krienke/tmp/asp/

Thanks a lot in advance for any hints
Rainer
rainer042
Posts: 57
Joined: Mon Jul 30, 2012 7:48 am
operating_system: Linux
System_Drive: C
32bit or 64bit: 64 Bit

Re: Strange clone displacement problem after adding lens pro

Post by rainer042 »

Just a short update:

In between I tested this problem also with ASP 3.2 on a Windows10 virtual machine. I copied the lens profile into C:\Users\Rainer\AppData\Local\Corel\AfterShot Pro 3\LensProfiles\

And after a restart of ASP using my D750 raw photo and with lens correction activated an with activated option "crop picture" (retranslated from german version to english, so it might be called different in the english user interface. You find it in lens correction dialog top, right) the windows version also shows this "displacement" behaviour.

Did someone else already find the time to test this scenario? Were you able to observe this effect? If not, did you try to use "my" nef file and my lens profile? Perhaps this problem only occurs for my version of 24-85 lens in combination with a D750 raw file. I don't know but it might be possible....

Have a nice day
Rainer
rainer042
Posts: 57
Joined: Mon Jul 30, 2012 7:48 am
operating_system: Linux
System_Drive: C
32bit or 64bit: 64 Bit

Re: Strange clone displacement problem after adding lens pro

Post by rainer042 »

Hmm, still no answers.

It would be really great if someone would try so I could find out if something with my own ASP installation or if something with ASP itself might be wrong.

Perhaps the process of testing looked to cumbersome. But actually its really easy. All files needed can easily be downloaded here:

https://userpages.uni-koblenz.de/~krienke/tmp/asp/
Then simply follow these three steps:
  • On Windows copy the lens profile into "C:\Users\<your username>\AppData\Local\Corel\AfterShot Pro 3\LensProfiles", on linux copy it into your personal ".AfterShotPro3/LensProfiles/" directory. You might need to create the "LensProfiles" subdirectory first.
  • Now start AfterShotPro, select the photo, activate lens correction, activate "resize Image" option in lens correction dialog, create a new repair-clone layer and add a circle clone somewhere. Put the source of the clone somewhere in the photo in an area that has a lighter/darker color to better see the results.
  • Now look at the clone destination at 100%. is it completely inside the clone circle or displaced by some amount.
Please post you results no matter if it was positive or negative. Thanks.

To undo the changes simply remove the lens profile file you copied before and restart AfterShotPro. Thats it.

Thanks a lot
Rainer
Post Reply