Assuming that at least some of the grid lines are accurate or almost exactly vertical, a fairly simple approach may work.
I used PIL to find all the columns in the image where more than half the pixels were darker than some threshold value.
code
import Image, ImageDraw
results
shows detected vertical lines in red to illustrate


As you can see, four grid lines have been detected, and with some processing to ignore the left and right sides and the center of the book, there should be no false positives of the desired type.
This means that you can use the code above to detect black columns, discard those that are near the edge or center. If any black columns remain, classify it as a βdifferentβ unwanted class of images.
source share