Recognizing hand-written shapes programmatically: find the key points of a rectangle-1

Recognizing hand-written shapes programmatically: find the key points of a rectangle-1