Luminous Landscape Forum

Raw & Post Processing, Printing => Digital Image Processing => Topic started by: bwana on June 17, 2013, 09:20:14 am

Title: help correcting distortion
Post by: bwana on June 17, 2013, 09:20:14 am
This IR photo taken with Fuji X100S displays some lens distortion. Because the camera was angled upward a little, the street is relatively straight however the building becomes progressively distorted. I try to correct this image but when I get the building right, the street is bent. I would appreciate some pointers on the best way to approach this problem.
Title: Re: help correcting distortion
Post by: francois on June 17, 2013, 11:08:46 am
This IR photo taken with Fuji X100S displays some lens distortion. Because the camera was angled upward a little, the street is relatively straight however the building becomes progressively distorted. I try to correct this image but when I get the building right, the street is bent. I would appreciate some pointers on the best way to approach this problem.

I'm not a specialist of PP but have you tried Photoshop's Adaptive Wide Angle filter? It's a lot of work, without knowing whether the results will be OK or not.

Edit: typo correction
Title: Re: help correcting distortion
Post by: bwana on June 17, 2013, 11:57:48 am
Tnx. What settings did u use?
Title: Re: help correcting distortion
Post by: francois on June 17, 2013, 12:02:32 pm
Tnx. What settings did u use?

There's no "settings" in the adaptive filter. You need to define horizontals and verticals.
Here's a Youtube tutorial: http://youtu.be/0LUlpj4DqIo

The process can be frustrating and tedious but for your image, although it's far from perfect, it took me about 2 minutes.

More advanced users could provide expert input because I rarely use Photoshop and, as said above, I'm not a specialist.

HTH
Title: Re: help correcting distortion
Post by: AFairley on June 17, 2013, 02:01:28 pm
Wow, the existence of that filter had completely escaped me.  Great tutorial, too.  Thanks, Francois.
Title: pardon my density
Post by: bwana on June 17, 2013, 02:03:25 pm
corrections in the dropdown include
Fisheye, Perspective, Auto, Full SPherical
Three sliders exist
Scale, Focal length, crop factor

Using Fisheye correction and the parameters For the Fuji focal=23mm, crop=1.5.
 I dragged some horizontals. Then I dragged a couple of verticals. I tried to adjust the verticals by dragging the midpoint but I got the message:
"Failed to calibrate. You may need to adjust the constraint..."
So I reset the image, started with using perspective correction but the results were even worse.
Using these does not correct the image like you obtained. As you can see my conversion falls far short.
Title: Re: help correcting distortion
Post by: madmanchan on June 17, 2013, 02:13:13 pm
Are you sure the road was really straight?  I tried to apply the lens profile in Photoshop (Filter -> Lens Corrections -> X100S) and this seemed to take care of the building fine, but left the road curved.
Title: Re: help correcting distortion
Post by: Bart_van_der_Wolf on June 17, 2013, 02:49:53 pm
Are you sure the road was really straight?  I tried to apply the lens profile in Photoshop (Filter -> Lens Corrections -> X100S) and this seemed to take care of the building fine, but left the road curved.

I have the same suspicion. I tried correcting in a Pano stitcher and everything gets straight and neat, except for the road. It's either a bending road or the building is on the top of an elevation.

Cheers,
Bart
Title: Re: help correcting distortion
Post by: bwana on June 17, 2013, 03:22:21 pm
Is the road straight? Well, I thought it was. Guess I'll have to go back to Cambridge to check it out .

But why cant I at least get the same result as Francois. His verticals are better and mine is even cropped.  hmmph. Auto has no profile for the X100S.

I updated to camera raw 8.1. In the bottom left of the adaptive wide angle window, it shows the camera model (X 100S)but not the lens model. Auto corrections are not available. However, the profiles do exist in my computer
If I look in
C:\ProgramData\Adobe\CameraRaw\CameraProfiles\Adobe Standard
there is
Fujifilm X100S Adobe Standard.dcp

Similarly, I downloaded lightroom 5 and There is No Fuji entry in the dropdown menu for lens corrections.
Title: Re: help correcting distortion
Post by: bwana on June 17, 2013, 06:43:28 pm
well I just used good old fashioned 'warp' and got the best result so far.
Title: Re: help correcting distortion
Post by: bwana on June 17, 2013, 10:33:47 pm
well, after some reading i learned that the lcp files represent the lens corrections and these are properly located at
C:\Program Files\Adobe\Adobe Photoshop Lightroom 5\Resources\LensProfiles\1.0\Fujifilm

I guess the dcp files are camera profiles that take the sensor into account for things like color,etc.

And the source of my confusion is that the fuji lens correction only appeared for .raf files but I was working with Tiffs and jpgs.
The lens corrections available for jpgs and tifs are limited to Apple, Canon, Leica, Nikon, Sigma, Sony, Tamron.
When I look into the actual folder containing all the lcp files- there are some labeled 'RAW' and some not. I assume the ones lacking the RAW designation are those that appear in the dropdown for jpegs. However, there are such profiles for Zeiss lenses but they do not appear in the dropdown with jpgs so I really don't know when adobe decides to enable a profile-probably something in the lcp file.

So I really do not know how Francois and Chan actually got 'Auto' to work with the jpgs I posted. Unless they are using lens profiles not included with the standard installation of the application.

Still, I think the kind of mustache distortion in my picture is reminiscent of the Zeiss 21mm f2.8 It would have been fun to try and apply the geometric correction of that lens to my image, but I cant.

I tried copying a profile from the above folder to this one:
C:\Users\USER\AppData\Roaming\Adobe\CameraRaw\LensProfiles\1.0\Downloaded

but it still didnt appear in the dropdown.

Of course there is a way to edit .lcp profiles ...
Open the .lcp in an editor and find all 8 (!) lines
stCamera: CameraRawProfile = "true"
and change to
stCamera: CameraRawProfile = "False"
Save the file. ( Possibly has Administrator permission required...)Maybe this is what Francois and Chan did to enable lens corrections to jpg files using the stock x100S lens correction profile??    :)
Title: Re: help correcting distortion
Post by: Oldfox on June 18, 2013, 02:21:07 am
With that image and my CS6 (13.0.1 x64) I can choose X100 as Camera Model and Lens Model. There is no X100S. I am not familiar with Fuji cameras, so I dont know if it is the same thing.
Title: Re: help correcting distortion
Post by: francois on June 18, 2013, 03:27:27 am
Sorry to be late to answer your questions…

I didn't use any lend profile at all. Here's a couple of screenshots that show the Adaptive Wide Filter with constraints and mesh.

This time (I had to redo it), It took me just five minutes but it isn't yet good enough for a large print.
Title: Re: help correcting distortion
Post by: bwana on June 18, 2013, 09:12:05 am
Francois

Merci.

Stefan
Title: Re: help correcting distortion
Post by: francois on June 18, 2013, 09:46:35 am
Francois

Merci.

Stefan

You're welcome, Stefan.

With the weird distortion in your photo I avoided horizontals from one side of the building to other other side (same for verticals, no top to bottom). Instead, I used shorter segments. I devised this trick when I had to correct an old log cabin, nothing was really straight…

Good luck!
Title: Re: help correcting distortion
Post by: Alan Gilbertson on June 27, 2013, 03:22:56 pm
There are so many misleading visual cues in the image (that tree, and the lamp post!) that it's hard to read, but given the very low camera viewpoint and the wide angle, the image seems to work if I apply lens correction, using auto and then correcting manually only for keystoning, followed by a top-down and bottom-up warp that's stronger on the top (dragging the middle of the top center division straight down and the bottom center straight up).

Adaptive Wide Angle really doesn't cope with this image all that well, as it tends to under- and over-correct in different parts of the image.