Mark rendered area

Hi there,
I’m a student from China, I met a interesting way to implement fisheye control. As the image shows, the left-top marked area matched right-top projection area.
I have try to implement this, but failed. I calculate the equation of minor arc, but the result can’t match perfect. Am I right for doing this by calculate minor arc as boundary ? Or is there any API I can detect the projection area from origin image?
Thanks a lot!
[ATTACH=CONFIG]1603[/ATTACH]