should be doable. There are probably a number of ways you could solve it with OpenCV.. line detection sounds like a good choice. I haven't played with the line detection but the other parts that I have used (mostly face detection) were pretty easy to work with. Great library. Good luck!
Fat Messiah Brewing