Four Corner Vertices of a deformed rectangle are given i.e. p1(x1,y1), p2(x2,y2), p3(x3,y3) & p4(x4,y4).
How to find position of all co-ordinates i.e. which one is upper left, upper right, lower right and lower left?
I am working with MATLAB.
Clarification: The rectangle is not necessarily axis aligned. It may be slightly tilted.