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