Pages: [1]   Go Down

Author Topic: help correcting distortion  (Read 4920 times)

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
help correcting distortion
« 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.
Logged

francois

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 13769
Re: help correcting distortion
« Reply #1 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
« Last Edit: June 17, 2013, 11:57:47 am by francois »
Logged
Francois

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: help correcting distortion
« Reply #2 on: June 17, 2013, 11:57:48 am »

Tnx. What settings did u use?
Logged

francois

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 13769
Re: help correcting distortion
« Reply #3 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
Logged
Francois

AFairley

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1486
Re: help correcting distortion
« Reply #4 on: June 17, 2013, 02:01:28 pm »

Wow, the existence of that filter had completely escaped me.  Great tutorial, too.  Thanks, Francois.
Logged

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
pardon my density
« Reply #5 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.
Logged

madmanchan

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2115
    • Web
Re: help correcting distortion
« Reply #6 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.
Logged
Eric Chan

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: help correcting distortion
« Reply #7 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
Logged
== If you do what you did, you'll get what you got. ==

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: help correcting distortion
« Reply #8 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.
« Last Edit: June 17, 2013, 06:32:36 pm by bwana »
Logged

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: help correcting distortion
« Reply #9 on: June 17, 2013, 06:43:28 pm »

well I just used good old fashioned 'warp' and got the best result so far.
Logged

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: help correcting distortion
« Reply #10 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??    :)
« Last Edit: June 17, 2013, 10:58:32 pm by bwana »
Logged

Oldfox

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 82
Re: help correcting distortion
« Reply #11 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.
Logged

francois

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 13769
Re: help correcting distortion
« Reply #12 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.
Logged
Francois

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: help correcting distortion
« Reply #13 on: June 18, 2013, 09:12:05 am »

Francois

Merci.

Stefan
Logged

francois

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 13769
Re: help correcting distortion
« Reply #14 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!
Logged
Francois

Alan Gilbertson

  • Newbie
  • *
  • Offline Offline
  • Posts: 16
Re: help correcting distortion
« Reply #15 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.
Logged
Pages: [1]   Go Up