Now usable as external library (LineDetector class).