Calculate angle of image and Median/Standard deviation

Job ID: 33100527

Budget: €8 – €30 EUR

I need to measure the angle of a page in an image, I can measure the angle on a 2D plane but I need to measure the angle in a 3D plane, So basically how much the image is rotating. Now the image can be of any page from any angle so need to come up with a way that would sort out the angle( Maybe using trigonometry or using 4 points of a page or something along the line).

The second part is I need to measure the Entropy/ Luminance and Gradient of the page only and not the background and get the Mean and Standard Deviation of them.

The project needs to be done in python on OpenCV.