Images for processing should be without black borders and without rotation.
That conditions can be fulfilled with ScanTailor software which is excellent tool for preprocessing scanned images.