Hi there
@barman58 thanks for that info ==always appreciate that.
@badrobot I also have the samsung S21 Ultra -- however if you look at the 2nd example from the ist pic (the block of flats or whatever) in your corrections it seems that the width at the top of the building in the L>R direction is wider at the top than at the bottom so while correcting a bit for the Vertical (in the Z direction - assuming a classical X,Y,Z plane) it introduces a Left to right defect.
As for the leaning tower of Pisa - that's not a problem since you are "correcting" a standard pic with no "Z" axis distortion so it's easily achieved by a simple rotational correction. If the tower was leaning AWAY from you while directly lin front of it --i.e backwards leaning rather than left to right while looking at it it would be much harder to correct.
The problem with vertical correction is when you say are looking straight at a picture you need to correct the "Z" dimension
The direction I mean because it's a difficult concept to grasp is to imagine you are directly facing a Politician and you want to throw an egg at him / her. The direction of travel of the egg is the perspective that needs to be corrected. Pan and Tilt / shift lenses were (and are) used for this purpose by many pro archtectural photographers.
Cheers
jimbo