Update DetectLineImage.py

Optimized (Thnx Dennis ;))