Generate projection image by OpenGL or Matlab I want to generate the "projection" image described as bellow. The left picture is the original picture and the right image is what I want. But, I have no idea about how to generate the right image. I know that OpenCV can only generate affine effect, so I know that only OpenGL or Matlab can generate this effect. However, I have no experience about OpenGL combined with Visual C++, so I don't know how to generate the right picture by OpenGL. Besides, according to other webside, I know that function "affine3d" in Matlab can achieve this effect, but my Matlab doesn't provide this function. Is anyone who can help me? Please. Thank you.
You would not need OpenGL for such perspective transforms. 

First create a 3D cylinder with Coca-Cola texture on it. (This is found even in 3D warehouse).

Then, start by creating a pseudo-camera matrix $\mathbf{K}$ and then generate arbitrary rotation angles with desired range for each axis. Then compose the final rotation by $\mathbf{R}=\mathbf{R}_x\mathbf{R}_y\mathbf{R}_z$. Also synthesize a translation $\mathbf{t}$. Your projection matrix then reads $\mathbf{P}=\mathbf{K}[\mathbf{R} | \mathbf{t}]$. Project your 3D points with this matrix and you will get the warping effect.