Use the Adaptive Wide Angle filter to correct lens distortions due to using wide angle lenses. You can quickly straighten lines that appear curved in panoramas, or photos taken with fish-eye and wide angle lenses. For example, buildings seem to be leaning inwards when captured using a wide-angle lens.

The filter detects the camera and lens model and uses the lens characteristics to straighten the images. You can add multiple constraints to indicate straight lines in different parts of the picture. Using this information the Adaptive Wide Angle filter, removes the distortions.

From an expert: Adaptive wide angle filter

Nicole is a food & stock photographer living in Seattle. She is an author with Peachpit Press

You can also use this filter on images that do not contain camera and lens information, though it's some extra work.

If you want to edit the filter settings later, convert the layer to a smart object. Select the layer and choose Layers > Smart Objects > Convert to Smart Object.

Focal Length

Specify the focal length of the lens. This value is automatically populated if the lens information is detected in the photograph.

Crop Factor

Specify a value to determine how the final image is cropped. Use this value in combination with Scale to compensate for any blank areas that are introduced while applying the filter.

Choose Filter > Adaptive Wide Angle.

Choose a correction type:

Fisheye

corrects extreme curvature caused by a fisheye lens.

Perspective

corrects converging lines caused by angle of view and camera tilt.

Panorama

corrects a Photomerge panorama.

Full Spherical

corrects 360 degree panoramas. The panoramas must have a 2:1 aspect ratio.

Auto

detects the appropriate correction automatically.

Specify additional settings for filter. If the image has lens data, these values are automatically detected, and some options are not displayed.

Scale

Specify a value to scale the image. Use this value to minimize the blank areas that are introduced after applying the filter.

Focal Length

Specify the focal length of the lens. This value is automatically populated
if the lens information is detected in the photograph.

Crop Factor

Specify a value to determine how the final image is cropped. Use this value
in combination with Scale to compensate for any blank areas that are introduced while applying the filter.

As Shot

Enable this option to use the values as defined in the lens profile. This option is disabled if no lens information is found.

Define the constraints to indicate straight lines in the picture.

Do one of the following:

Choose the Constraint tool, and drag a line across a key object to straighten.

Choose the Polygon Constraint tool, and draw a polygon along the object to straighten.

The filter detects the curvature and draws a line that follows the contour of the object.

To constrain vertically or horizontally, press Shift while dragging the line. To define the orientation for an existing line, right-click constraint line in the image, and choose an orientation from the pop-up menu.

After the wide-angle correction is complete, the picture may have several blank areas. You can crop the image to remove such areas, or even use Content-aware fill to add content into that area.