If you point your lens upwards, to capture all of a tall building for example, the resulting image will have sides sloping inwards looking towards a vanishing point in the sky. This subject was recently discussed on the Alamy (stock photography) web site where various "solutions" were considered. Perspective is a natural thing, railway lines appear to converge in the distance etc, but our mind knows that buildings should be vertical, and wants them to look that way, or almost that way.
Four solutions were proposed: -
1) Using perspective correction tools incorporated within image processing software, Lightroom, Photoshop etc. They work but there is some degradation of the image at the sides. This is my normal approach.
2) Using a shift lens - very expensive. Perhaps only for very wealthy amateurs or those pros who regularly get commissions to shoot architecture. Probably better than (1) above but still some potential degradation problems due to using a lens very near to the edge of its image circle.
3) Shoot a rising stack of images and combine as a vertical panorama using the tools within Photoshop. Not tried this, but it sounds very interesting.
4) There are some third party software solutions which will take a completed image and attempt to improve the perpective. One such program is ShiftN and it's freeware. Intrigued I decided to give it a go and here is one result.
Without correction
With correction
This is using the automatic fix provided by the software - I've not yet dabbled with the various adjustments that are available.
The photo shows Appalachian dance group Step This Way performing at Durham County Cricket Club's Chester-le-Street ground.
I've now used this software on a number of photos, and the results vary from very impressive to distinctly weird. It's not a one stop shop solution, although, in fairness I've not experimented with the adjustments that are available. It's certainly worth having in your toolbox and you can decide in each case whether or not its application is appropriate.