i am using a photoscanner and DIY transport device to get high quality scans of old Super/Normal 8 films. 
I wrote the free software that automates the transport of the film using a stepper motor over the scanner pane and do the scanning of the strip; free software exists to extract the frames out of that strip and allows generating a movie out of it. We put up a [wiki](http://hosting.aktionspotenzial.de/CineToVidWiki/index.php/Hardware:Filmf%C3%BChrung#Film_Guides_.2F_Format_Holder) describing the whole process and software.

The problem i'd like to solve are bended/twisted scans of the strips caused by the film sitting not 100% flat in the filmguide or even jumping out of it.

Here is a example image of a bend stripe:
![](https://i.stack.imgur.com/FOSOO.jpg)

What would be the best approach to detect the bending using the geometry of the sprocket holes or frame borders and getting a aligned image? Often the errors builds up gradually towards the beginning/end of the strip where the film is entering/leaving the filmguide, which can lead to jumps in the output film.

I'm favouring a strip based correction over a frame by frame correction but i don't know what would be the most promising approach to detect if there is a bending and then correct it.

Any input of you gurus would be great!