Add check for noisy lines and remove them.

This looks for mostly gray lines by checking to see the count
of pixels that qualify as white or black in each line.
If the number of white and black pixels is low, the line must be
mostly gray.