Linear Panorama Transform
No transform is required for that kind of thing except making sure that the rays of light hit the lens head on.

This is only possible when the subject is far away enough from the camera and for a narrow range of its field of view.

In other words, the end result image we are talking about here is composed of vertical projections of 3D points right on the back of the camera. As if you had a one pixel lens which you scanned across the full apperture of your scene to sample exactly what is right at the focus point of that lens. Head on.

But what really happens is that for every picture you take, the light goes through a single lens. The only pixel that is vertically sampled (or projected, from the world to the sensor) in this case is the one at the centre of that lens. Everything else is imaged at an angle that is proportional to how far away from the center of the lens the sampling pixel is located.

Take the picture of a very tall multistorey building for example. At eye level, straight ahead, the windows appear rectangular. But as you raise your gaze upwards, you "sample" the windows higher up at an increasing angle to the point that some of the windows might even start to appear square (their perceived height, approximately equal to their perceived width).

If you do not have a 3D mesh of the scene, there is no transform that will correct for this change in perspective.

So, what you do is to "fake it".

You crop a patch from the acquired images that given the size of the subject, its distance from the camera and the focal length of the lens, it appears to be imaging the subject head on. And you take lots of images.

No further reprojection is required except of course to correct for the relative camera poses between takes as the camera is not on a leveled rail but that's scaling and rotation only.

Depending on the application this is sometimes called the Pushbroom camera model.

Provided that you have taken care during acquisition, Hugin can do that type of stitching.

Hope this helps.