What's new

Getting rid of perspective distortion


G

Guest

Guest
If you look at shot #1, you'll notice all the objects in the upper half of the shot hanging over to the middle.
To correct this in Photoshop;

a) Select All (CTRL + A)
b) Click on the "Move Tool" (V)
c) Make sure that on the options bar "Show Bounding Box" is selected
d) Zoom in, so that you see the grey area surrounding the canvas (this will make it possible to move the corners of the selection out of the canvas area)
e) Move your cursors to one of the upper corners, until you see a double arrow (not the siccors)
f) When you hold CTRL and click on hold the left mouse button, you can move the corner. To the same with the right corner and point in the middle of the upper line.
This needs some experimenting.
g) When you're done; double click inside the marquee
h) Select All (CTRL + A)
i) Crop your image.

(image has no copyrights)
 
S

Stroker1

Guest
Getting rid of barrel distortion

My trick is Edit > Transform > Perspective.

Start a new Layer above the target pic. Then put a vertical reference line on the new Layer. Usually 1px, but nice and bright. For your example, I would use the pine tree on the left. I would drop a vertical line just beneath the tree and take it straight up with some help from Shift.

Back to the target and Edit > Transform > Perspective. Then it's just a matter widening the top and maybe fiddling with the bottom to get the tree to line up with the reference line.

edit: That was short version. Somebody is hungry and I'm duty.
 
G

Guest

Guest
Getting rid of barrel distortion

If you really want a fast way;
  • select crop tool
  • select perspective
  • drag corners while holding shift
  • double click inside marquee[/list:u]

    BTW, if you use the tree as a reference point, you will still see perspective distortion in the church, just try it out.
    If you really want good reference lines, you should press CTRL + " (grid), it's faster and you will always have a reference line where needed. In your example when you change the perspective, you will move the object away from the reference line anyway.

    I want to add that this particular perspective distortion is caused by photographing an object under an angle when using wide angles. I made a mistake by calling it barrel distortion, because the common way to call it is perspective distortion.

    After this small adjustment, it's sometimes necessary to do some minor adjustments with the filter/distort/spherize tool to correct the barrel or pincushion distortion of the lens itself.
 
S

Stroker1

Guest
Getting rid of barrel distortion

Yeap. Perspective Crop. Gotta love it.

For the distortion in your example, using Displace is rather simple. Not really necessary with the other tools available. Going with this technique has only one major advantage, but it's usually not worth it.

I can show you how to use Displace to correct pincushion and barrel. Pretty neat trick. Interested?
 

theKeeper

Guru
Messages
2,313
Likes
63
Getting rid of barrel distortion

Ya please do Stroker.

Would help people better understand how Displace works. And also show a practical use for it.
 
S

Stroker1

Guest
Getting rid of barrel distortion

Just past 4 am and the little one finally went back to sleep. This is yet another discussion that I've been meaning to add to Tech-Slop. Well, our new daughter put a stop to those plans for the time being. :sigh:

I don't think this will explain how Displace works. How this technique works is a real mind-bender. It came to me in a flash of inspiration after a week of frustration and I can't even begin to explain it. The best I can do is run you through it.

Plan of Attack!

Move the corners. Either bring them in or push them out depending on the distortion (pincushion or barrel). It is possible to move the sides, but the D-Map is a monster with very limited tweakability compared to this one. This way of doing it is so much more elegant.

This D-Map is universal. One D-Map works for both types of distortion and on photos with a non-1:1 width:height ratio. I've tested it inside-outside-upside-down and it works like a charm everytime.

Let's Build!



1) This is channel one. In my case: Red.
2) This is channel two. In my case: Green.

Use your favorite gradient methods to create those. I did mine by filling with Black, then using Circular Grad set to Screen. All four corners are White and the middle is Black. Then I used Levels to bring the Black point up to Grey. Then I selected the appropriate half and Image > Adjust > Invert (ctrl + i). I also had some help from Grid. Once I had one Channel done, I C&P into other Channel and rotated it.

3) Add a Curves Adjustment Layer like so. Pardon the sloppiness of my free-hand skills. Those should be perfect 1/4 circles. The better your Curve, the better your results. (See AMP.)

4) Composite. I do my D-Maps in RGB and I fill the Blue channel with 50% Grey. This is what it looks like by the time I save. Make sure you have Save Composite turned on or Flatten and save out as a different file (I prefer the former). Either way, make sure it's a PSD.

Grab your problem photo and start using the D-Map. Use Stretch to Fit and make sure you use the same value for Horizontal and Vertical. Positive values will fix one type of distortion and negative values will fix the other. Just take it easy on the first few tries. The highest value that I've used is 15%, and that was on a 1200x1600 picture.

I wish I had some samples to show, but I don't. I wasn't in the habit of archiving everything when I developed this technique, so all of that is gone. If you do a search with "pincushion barrel distortion", you should be able to find some good ones to play with. Maybe you'll find a few other nuggets as well.

Time for this exhausted user to sleep.

You know what to do -
play.fiddle.learn
 
G

Guest

Guest
Getting rid of barrel distortion

Thanks for your efforts Stroker. It's always nice to see new ways to tackle a problem, very interesting. :)
 

sfm

Guru
Messages
1,163
Likes
4
Getting rid of barrel distortion

great tips here guys I for one thank you keep em comming :perfect:
sfm
 

Top