View Full Version : Leaning Buildings: How to correct?
mattski
16-02-2014, 5:04pm
Hi All,
I joined this community and bought my first DSLR at the end of the year, then, without giving myself much time to learn, I was off travelling for some 8 weeks.
I'm looking though some of my photos, and I'm seeing an issue I cannot ignore... manly with pictures of big buildings in big cities:
I have some buildings appearing to lean at ridiculous angles.
Having investigated, I understand that this is caused by lens distortion, and is most exaggerated using a zome lens at it's shortest. Please see the example below.
I have been saving photos in raw format (.nef) and, as yet, I haven't used any PP software other than Nikon ViewNX2 which came with my camera.
What is the best way for me to deal with this distortion?
Thanks for any advice.
Matt.
107080
ricktas
16-02-2014, 5:11pm
In photoshop there are lens correction filters to adjust perspective and distortion issues that can result from using wide angle lenses. Not sure in NX2, but will give Andrew or Arthur a holla and see if one of them can guide you on the right path, as he is our resident x-pert in the Nikon NX!
But be assured it is generally not that difficult to correct once you know how to.
What is the best way for me to deal with this distortion?
As far as I know there are no practical and efficient ways of dealing with major amounts of perspective distortion with either View NX 2 or Capture NX 2.
The built in lens correction details in Nikon programs is only specific to Nikon lenses and it will attempt to cure basic distortion based on their database measurements. Nikon build their programs to be development tools for images rather than graphics art manipulation tools such as photo shop.
There are other editing programs that will allow some perspective control and I think that you may have to do some research into them to unbend images such as that one.
mattski
16-02-2014, 5:37pm
Thanks Rick.
ViewNX2, which I have cannot fix it.
I guess now might be the time to decide what PP software to splash out on....
Matt.
- - - Updated - - -
Thanks Andrew.
I only have Nikon lenses at this stage but that may not always be the case, so I guess I should look for a solution that will work for any lens in any situation going forward.
I will research further... here and elsewhere...
How do others 'unbend' these images?
Cheers,
Matt.
Mary Anne
16-02-2014, 5:42pm
Wondering if you took any images further back because when you try to correct the Verticle Perspective you are going to lose the spire on the top of Big Ben.
Matt, some pp software vendors (incl Adobe) allow you to download their software for a 30-day free trial. So you could download and see how well it works for you before plonking down your hard-earned. The freebie "Gimp" might also have some perspective correction if you want to check it out.
Mary Anne is correct that you'll lose the top of the tower when you correct the distortion. You could try extending the canvas upward and cloning in some sky above the tower before doing the correction. That might be beyond your pp skills at the moment but the beauty of this stuff is that you can always come back to it later when your skills have developed more...
Cheers.
Matt, I haven't done much distortion correction work for several reasons:-
#1 I haven't until recently had a software program to do it with,
#2 I don't do a lot of "architecture" photography,
#3 Most of my subjects look good with some distortion, :D
But I had a clumsy play with the distortion correction tools in Photo Ninja and it took some extreme values to get it somewhere near where it looks straightish. Of course, that means a loss of significant detail and highlights that if you want to capture such scenes you need a better starting point with composition to enable the necessary cropping later.
I am sure that others with more experience could do better.
https://dl.dropboxusercontent.com/u/9582534/attachment_v1.jpeg
mattski
16-02-2014, 10:08pm
Thanks Anne,
Yep, I have a few other pics of this. I chose this one mainly because the distortion is so great as an extreme example of several photos I need to fix.
Phil: Good idea... I might trial one or 2 of the commercial apps when I can find the time.
I realized that I've had GIMP installed (on my Linux box) for some time. After just a little scratching around I found that GIMP does have a perspective tool, and I've been able to achieve results very similar to yours, Andrew - Thanks for that!
I'll be sure in future, too, to consider this correction and necessary cropping when composing similar shots.
To be honest, before researching this today I did not really know the cause of this distortion, or that this perspective distortion was quite different from the lens (barrel/pin-cushion) distortion which I had read about.
It appears that there is a plugin for GIMP to provide lens distortion correction.... Further research required...
So, at least for now, I'll stick with using ViewNX2, and GIMP when more tweaking is required.
Cheers,
Matt
arthurking83
17-02-2014, 12:54pm
......
To be honest, before researching this today I did not really know the cause of this distortion, or that this perspective distortion was quite different from the lens (barrel/pin-cushion) distortion which I had read about.
.....
Just so that you know.
Nikon assumes any user induced distortion is deliberate, or non existent. The perspective distortion comment you made is typical of most users. keep lens 'level'.
You should be able to see swings in perspective distortion through the viewfinder too.
What (both) Nikon software will do tho is to correct for barrel/pincushion type distortions. This is a setting in camera probably. Som ehave the ability to turn it on and off, I think the consumer end cameras only have it to on.
But anyhow, there may be a setting in your camera that sets Auto Distortion Control. D7100 should have it. It's in the Shooting Menu area(I think).
But this feature is only available with Nikon lenses only. Not Sigma/Tamron/etc. It is a firmware feature too BTW.
So if you do end up using it for any of your Nikon lenses .. what happens is that the bit setting in the file tells Nikon software if the file is NEF to cater to the setting(on off) and how to reset the image distortion parameters for a specific lens.
If the image is a jpg, the camera makes the adjusments permanently to the jpg image.
You can't turn the feature ON/OFF in ViewNX2 tho, and I have checked if you can via CNX2 either (I turn it off at the camera)
For any info on this distortion control feature look under Firmware Version. you have an A and a B firmware, and also an L version which is the distortion control firmware. I think the latest L version is currently 1.006.
This is updateable independently from the main camera firmware. it gets updated with new lenses added to Nikon's lineup.
Just be aware of the feature if you have it on.
Why? because you may inadvertently have it set to on, and many of the high end lens corrective software can be based upon the lens info relayed to the software via the exif data.
SO!
it could work out that if you opened an image in say ViewNX2 and had Distortion control active in camera, VNX2 will correct the image.
Then if you wanted to correct for user induced distortions and used this type of software, which could be as simple as pushing a button, just be aware that the software now may correct an already corrected lens distortion .. again!
Apart from GIMP, there are other software that is totally free to use.
I've once used a program called RawTherapee, which is quite useful, and it has distortion adjustments available in it's tool sets too. Never used it tho.
Not the greatest software available, but quite useful for some tasks. it looks overly complicated but in reality it isn't .. it just looks it as it has the ability to set all manner of demosaic options if you want.
I recommend that you at least have a peek at it, based mainly on the premise that it's free! At least you have both another raw conversion software AND an ability to distort images as you please.
mattski
18-02-2014, 10:31pm
Thanks Arthur.
I'll make a point of looking at how camera angle (up/down) effects perspective distortion at next opportunity.
Yes, my D7100 has the 'Auto Distortion Control' in the Shooting menu... However...
With my AF Nikkor 50mm f/1.8D lens fitted I can switch it on and off - no probs.
With my AF-S DX Nikkor 18-140mm f/3.5-5.6G ED VR lens fitted, the option is greyed out and I get the message 'This option is not available at current settings or in the camera's current state'
I wondered if this is because the 18-140mm is a fairly new lens and the camera does have info about it's distortion... Then I read more or your post!...
My D7100 has 'C' and 'L' Firmware. Currently C 1.01 and L 1.008
I thought I had the latest firmware: Nikon Message Centre (part of VNX2) directed my to a new 'C Firmware' which I installed in December.
Some googling tells me there is a now an L 1.009 released in the middle of last year... But it still doesn't support my 18-140mm! :( I guess I have to watch and wait.
I'll Check-out RawTherapee.
Thanks for the advice.
Matt.
arthurking83
18-02-2014, 11:08pm
Yep, I get that greyed out option too.
this is only for the thirdparty lenses tho, and I think your deduction of the lens info in the L firmware is probably spot on.
Strange that Nikon haven't yet updated the L firmware for that lens yet. :confused013
No listing for the 18-140VR in the L1.009 firmware!
And I remember RT at first and it looked a little bit daunting, but a few button pushes later and it started to make sense here and there.
wanderer51
22-02-2014, 4:37pm
Have you tried PTLens? While not free, you can download a trial version (good for 10 images) for Win or Mac. I have used it before and it does a good job. Think it is around US$25 for the full version.
http://epaperpress.com/ptlens/index.html
Warbler
23-02-2014, 12:55pm
Lens correction, including perspective correction, is a standard feature in both ACR and in photoshop. Do you not have PS or Lightroom?
ameerat42
23-02-2014, 1:54pm
...Having investigated, I understand that this is caused by lens distortion, and is most exaggerated using a zome lens at it's shortest....
...What is the best way for me to deal with this distortion?...
Just to reiterate, Matt, the "distortion" illustrated is in fact a perspective view and not really a distortion at all. It is caused by using ANY lens at
ANY focal length, but it is not always noticeable.
The best way to deal with this perspective convergence is to hold the camera (sensor) parallel to the lines you DON't want to converge.
In the example shown, hold the camera || to the vertical lines of the building. This may sometimes result in your cutting off some interesting
part of the subject you're trying to get. For the purpose of getting the whole of your subject, a wider lens may be needed. You can then
position your subject in the wider field and tilt the camera until the perspective is what you want to get. You then crop out any unwanted
parts of the scene. NB though: sometimes you just cannot eliminate the perspective convergence in situ and you may have to resort to
PP to straighten things out.
(Continued below.)
...
I'll make a point of looking at how camera angle (up/down) effects perspective distortion at next opportunity.
...
I have used Photoshop from V7 to CS2 (V9) and they all allow you to correct for perspective convergence. It is a bit of
mucking around, though, because you DO actually introduce other distortions in the process. You may well find that you have to
subsequently "stretch" the image to get things looking proportional again. From CS2 (and maybe CS1) on there's also a "Warp"
function to allow more freehand adjustments to parts of the image w/o affecting the rest of the image.
SUMMARY
It's not easy.
Am.
mattski
23-02-2014, 10:32pm
Thanks all,
I have a much better understanding of what is going on in that picture now.
The other day I took a few simple photo's to demonstrate this perspective effect and lens distortion for myself.
The 2 sides of the door in the second photo appear to converge due to the camera angle, and of course it doesn't look un-natural.
It didn't seem intuitive to me that it was 'natural' for Big Ben to be at such an angle because of the camera (sensor's) angle, but I understand that it is for the same reasons as it is with the sides of this door.
107251
The first photo below taken with my 18-140mm lens at 18mm shows barrel distortion.
The next, taken with lens at longer length - 105mm, shows pincushion distortion.
Incidentally, the 2 pics above were taken at 23mm - a length at which this this lens exhibits much less distortion.
107252 107253
I did this same test with my girlfriend's D3100 with 18-55mm kit lens. At 18mm there was similar barrel distortion, but (rather frustratingly!) switching on the Auto Distortion Correction did a good job of removing it. It doesn't make sense for Nikon not to have released distortion correcting data for their 18-140mm lens!
... still yet to try various PP software... I do see that Adobe have distortion data already for this lens, and that RT can use this data.
Thanks for all the suggestions. I'll report back once I've had a play.
ameerat42
23-02-2014, 11:20pm
That shows a fairly clear grasp of the ideas involved, Matt.
As far as the two types of distortion you showed here - pincushion and barrel - I can say tat Photoshop CS2 (and so higher versions)
has two useful tools for reducing them. (I hesitate to say remove because the tools themselves just introduce counter distortions.)
These are the Edit-Warp tool and the Filter-Distort-Lens Correction tool. I use the first almost exclusively to do such lens corrections ...
... some vague reasons ...
Now I have encountered another distortion produced by my my Σ 8-16 over and above its MILD barrel distortion. To describe it,
"the further from the image centre, the more the subject is linearly stretched". And to "correct" this I have had to try to proportionally
compress the image from the outside so that the centre is not affected much. Well, I use the Edit-Warp tool, and... ... ...
...sometimes it works...
Am.
mongo did this in about 60 seconds using the transform - distortion tool in Photoshop. Its far from perfect on the left side where Mongo did not pay much attention to - he was more interested to see if the tool could be used for this purpose and the answer is , "yes", with a little more patience. Unfortunately, Photoshop is not a quick inexpensive program so it does seat the purpose. However, Andrew has the right idea. Some simpler programs may have some peripheral tools in them that may just as easily do the job. Not sure about Picasa tools and the like which are also free.
107377
mattski
05-05-2014, 11:29pm
Thanks Am and Mongo.
I found that GIMP has a simple but effective perspective tool which allows for easy correction/adjustment of perspective the picture above.
I still yet to properly address my barrel and pincushion lens distortion....
Cheers,
Matt.
Warbler
09-05-2014, 10:50am
I believe that there is an auto perspective correction tool in CC. Here is a link to Adobe's KB article.
http://helpx.adobe.com/camera-raw/using/automatic-perspective-correction-camera-raw.html
- - - Updated - - -
I believe that there is an auto perspective correction tool in CC. Here is a link to Adobe's KB article.
http://helpx.adobe.com/camera-raw/using/automatic-perspective-correction-camera-raw.html
Thanks Am and Mongo.
I found that GIMP has a simple but effective perspective tool which allows for easy correction/adjustment of perspective the picture above.
I still yet to properly address my barrel and pincushion lens distortion....
You can fix both the perspective and the lens distortion in one go using Hugin.
Cheers,
Terry
- - - Updated - - -
Thanks Am and Mongo.
I found that GIMP has a simple but effective perspective tool which allows for easy correction/adjustment of perspective the picture above.
I still yet to properly address my barrel and pincushion lens distortion....
You can fix both the perspective and the lens distortion in one go using Hugin.
Cheers,
Terry
Powered by vBulletin® Version 4.2.3 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.