Is there a ready-made tool (preferrably a Photoshop filter) to correct for geometric distortion caused by finite focal length of the lens?
This is in the context of using a camera to "scan" documents, or photographing a painting or any other flat objects. It is not about barrel distortion or perspective correction (although it is related to the latter): let's assume all these corrections are already made by traditional means and we have a perfectly straight image of (say) our favourite model: a brick wall.
The problem is: that's not enough. Ideally, such an image should be made from an infinite distance by an infinitely long lens. Or, we should be "scanning" it by sliding along both axes, so that the view angle to each point was always right.
Otherwise, if we use a normal lens, and especially, of course, a wide-angle lens, the edges will be stretched compared to the centre. Even if the brick lines are perfectly straight and perpendicular. This stretch is what I want to correct, thereby simulating an infinitely long lens (but again, only in the context of flat subjects).
It is very easy to express what I need mathematically: each point of the image should be compressed with the ratio cos(a) : 1, where a is the angle of view of this point from the camera with respect to the perpendicular from the camera to the subject plane.
Before the image is cropped and otherwise corrected, this sort of correction could be almost completely automated (given the EXIF lens info). However, I haven't seen such correction in the common software. The Photoshop's Adaptive Wide Angle filter is not that. It could be somewhat emulated by warping, but that's unnecessarily complicated yet not accurate.
The correction may be said to be insignificant (<5%) for lens angles 2 * acos(0.95) ≈ 36°, which is about 65 mm focal length (35 mm eq.) (assuming perfectly central positioning of the camera). This is rather moderate, but sometimes one is physically limited to a wider lens, or needs greater accuracy... Given the simplicity of correction, I'd expect it to be common, yet apparently it isn't... Or am I missing something?