Detect corner points of rectangle

Does it have to be an Arduino with light sensors?

A camera connected to a Pi running image recognition software sounds like an easier solution to this problem.