"Close out the point array (store it somewhere as a found line), and now determine if the found line should be kept as valid enough for the algorithm: the number of pixels in the line must be greater than 1/3 the width of the image, and the difference between the topmost and bottommost pixel in the line must be less than 1/20 the height of the image."