Update DetectLineImage.py

Optimized algorithm, now takes a lot less time to process =)