How to use the opencv to implement the projective transformation in matlab?

 I want to implement an algorithm on Android platform. Now I have the matlab code of the algorithm. There is a function in the matlab code that I don't know how to implement in the opencv.

 How can I get the same function in opencv?