Hello. I recently used Hugin for a similar project, so here's some
notes and thoughts.
Here's an example of one of my scans:
https://dumbpic.link/manu/idp/020.png
That scan contained three source photos. I used a setup with a tripod on
a table looking down and a sheet of glass holding one section of the
sheet flat. If your documents are already flat, you may not need the
glass. I had a couple of softbox lights arranged carefully to prevent
glare on the glass.
I shot in raw and processed one shot manually in ufraw, then used that
as a template to batch process the rest of the raws with the same
settings. I went with 8-bit output since HDR was not necessary for these
documents.
Because each photoset was positioned differently, I had to do some
amount of manual processing for each document. If your rig is extremely
repeatable, you might be able to make a good starting template, but I
usually find that some level of manual correction is almost always
required.
On each image set, I place a couple of horizontal and vertical control
lines on the paper edges on two end images. These help Hugin find the
right perspective correction. I then manually placed ~10 control points
on each seam. I did this manually becuase the auto control point
generator didn't work well on these documents. You can try your luck
with the auto control points, maybe it will work better for you. You may
have to remove control points that land outside of the document.
For optimization, I used the custom parameters mode. For image 0,
optimize y, p, and r only. For the rest of the images, optimize
y, p, r, TrX, TrY, and TrZ. For the lens, I optimized v, a, b, c, d, and
e. If you have a lens model that you know is good, you can just use that
and not optimize the lens.
Because my images were shot at an angle, I ended up exclude masking the
far edges of the two end images to make sure Hugin used the
higher-resolution middle image for that section of the stitch. That may
not have been necessary, but if you're getting artifacts in the stitch
it can help.
Once the optimize came out well, I set the projection to rectilinear,
tweaked the FOV and crop of the output, and rendered the final stitch.
Hopefully this gives you some ideas to start with. Feel free to share a
.pto if you're having trouble getting a stitch to come out cleanly.
--Sean