Vertical and Horizontal Straighten
This image is taken with a fisheye lens:

5 vertical curves are added. Only the first curve from the left has 2 Curve Segments:

Vertical Straighten is performed and "Set to Initial Width x Height Ratio", the result is:

Let us do a Horizontal Straighten. Add the first Horizontal curve at the top of the image. Try to accomplish a curve shape nearest to the curvature of the right beige building:

Set the number of Curve Segments to 4 and reshape the curve like this:

Add new Horizontal curve and set their shape like this:

Move down the last curve:

Duplicate curve (press Command D):

Change Curve Segments to 3:

Set curve with 3 Curve Segments:

We will use the first curve with 3 Curve Segments from the bottom to fine reshape:

This is one of a few steps:

Reshaping is finished. Select a curve with 1 Curve Segment and delete it by clicking "-" (hint: Delete Horizontal Straighten Curve). Now, the curve shape looks like this:

There are 3 new Horizontal curves in these positions:

These 3 new curves are with 3 Curves Segments.
After Horizontal Straighten and "Set to Initial Height x Width Ratio", the image looks:
