Great photography is hard to locate and even harder to capture yourself. So whenever you can obtain a beautiful photo it's often better to fix problems with the shot digitally instead of trying to capture another one.
A common problem with landscape photography is a slanted horizon line. Landscapes can be useful for any number of projects like photo compositing, digital painting, banners, backgrounds, or even 2D/3D rendering. The horizon line sets the perspective of the landscape and is a very important piece to the photo.
In this quick tip I'll demonstrate how Photoshop users can hastily level the horizon line of any photograph. This can work even with shots of people, animals, or objects, as long as there is a horizon or some type of “straight” object somewhere in the shot.
1. Prepping the Document
First you'll want to locate a photo with a crooked horizon line. I'll be using a shot of Osaka, Japan taken from the bullet train in 2014.
You can download the full image by clicking here and saving it to your computer.
Next open up Photoshop and bring this photo into a new document.
Some designers like to go with alternative options for rotating the horizon line such as the image rotation method. This can be applied using free transform and selecting “rotate” from the context menu. However I advise against this method because it can be tricky and overall it's much less accurate.
Instead let's use the ruler tool to create a level horizon line automatically.
2. Laying Down the Ruler
With the photo in a new document select the ruler tool from the toolbox. It should be located under the eyedropper tool so you'll either need to click+hold the eyedropper icon, or right-click the icon to open the toolbox context menu.
This ruler tool can be used as a measurement device to find the distance, height, or X/Y coordinates between two points. But the ruler is even more useful when straightening a photo.
Simply click+hold anywhere along the horizon line and drag the mouse cursor along the image. You don't need to follow the entire horizon but it's wise to capture as much as possible.
Afterwards you should have something like this:
Now go to Image > Rotate Canvas > Arbitrary. This will open a dialog box with automated fill options for rotating the canvas to be perfectly 180 degrees. Leave the default value then click OK and your image will adjust itself automatically.
3. Final Clean-up
You'll notice that the photo will adjust itself according to the horizon, but this leaves gaps of empty space in the document. Now you'll want to crop it down to remove these gaps OR resize it larger to fill them up.
By cropping the photo you retain the same quality but lose some of the outer areas in the shot. By resizing larger you can fill the gaps by enlarging the photo, but this may or may not create a poor-quality shot.
It all depends on the resolution and if you actually need anything located in the outer edge areas.
For this example I'll just crop it down smaller and voila! Picture-perfect horizon line in record time.
4. Vertical Method (optional)
If your image doesn't have much of a horizontal horizon you can go with a vertical ruler instead. Just find any landmark which is supposed to be completely straight up & down, then draw a ruler alongside it.
From this photo I might choose one of the telephone poles or light poles in the distance. Simply draw a ruler along one of the poles and follow the exact same steps as before.
You may get slightly different results depending on how prominent these vertical alignments are. This is why for landscape it's usually better to measure a long horizon line, but for photos of people or close-up shots it may be a good idea to find a vertical object instead.
Either way the final photo looks great and this shouldn't take you any longer than 2-3 minutes at most.