Ask Your Question

joeh's profile - activity

2013-11-06 14:14:32 -0600 commented answer [Rotate image 90 Degrees] Strange color after using cvTranspose

@Kirill: can you elaborate on how to "call OpenCV functions on individual planes"? The problem here is that the default preview format from an Android camera is in YUV420sp format (NV21), and as the OP noted, calling cvTranspose() on that IplImage causes strange green/purple color corruption (for the reasons you point out). But there is no clear example anywhere on how to achieve this with a YUV pixel format and OpenCV. Even attempting to convert to RGB with cvCvtColor() fails in all attempts I've made. cvFlip() works correctly on the YUV image, but not cvTranspose(). You also mention calling cvTranspose "two times" and "three times" -- what does that mean? Each call to cvTranspose simply corrupts the image even further.