If anyone is familiar with this, or even if you aren't, could you take a look at my attempt to implement Zhang's "Single-View Geometry of A Rectangle With Application to Whiteboard Image Rectification" to work in Python.
I've posted it to stackoverflow, but the problem may not be with the code, it may be with the math.
Here is the stackoverflow link: http://stackoverflow.com/questions/29559608/white-board-rectification-with-python-throws-error
Here is the sage link: https://cloud.sagemath.com/projects/a8af3fd5-1390-4e80-a12a-13f18f77fdc0/files/Sage Whiteboard rectification.sagews
Here is the sage link to the python version: https://cloud.sagemath.com/projects/a8af3fd5-1390-4e80-a12a-13f18f77fdc0/files/Python rectification that throws error.py
Thanks