Closed NicolasHumann closed 9 years ago
Nicolas is correct as I observed recently as well. The main problem is that the projection matrix that the rotating cube sample was based on was quite messed up. To accommodate this, it appeared the original programmers defined the vertices and UV's backward to match, such that the image appeared correct on the cube. This was improved for the OpenCV version of ImageManipulation, but is still inverted (and remember DX11 is left handed so matrix operations must be flipped). Then the vertices and U,V's are not what you'd expect. According to my notes, looking at the screen, Lower left corner is -1,-1. Upper left is 1,-1. Upper right is 1,1. Lower right is -1,1. Worse, the UVs are: Lower left (1.0,1.0), Upper left (1.0, 0.0), Upper right (0.0, 0.0) and (0.0,1.0). So it's not an OpenCV issue per se, but should really be improved.
Patch referenced above provides a partial fix for winrt-universal/PhoneTutorial sample. This update hasn't yet propagated to other samples.
This issue is no longer applicable to the recent set of samples. Closing.
Hi,
You inverted the height and the width when creating the cv::Mat on all your samples. Your sample works because Lena.png is a square image ^^
Thanks