If you're looking for a way to automatically remove parallel distortion from photographs, you might try ShiftN by Marcus Hebel. ShiftN supports batch mode operation and includes command-line parameters.
ShiftN
http://www.marcus-hebel.de/foto/links.html
Here is a quick test I performed.
FWIW,
MFM
ShiftN
http://www.marcus-hebel.de/foto/links.html
Here is a quick test I performed.
FWIW,
MFM