Different methods to crop images by columns in Python. They are all highly dependent on deskewed images, so my own deskewing method is also included (deskew.py).
Uses the skimage package to detect lines. The target number of columns is specified and different values of the thresh variable are attempted until the target columns is reached. Good if you have many similar images.
Sums the pixel values across the height of the image to detect the darkest (lowest mean pixel) columns.
Similar to Method 2, but looks at changes in mean pixels between columns. Will also work if columns are separated by whitespace instead of dark lines.