I capture video image from UVC camera with YUY2 format,but after the conversation from YUV2 to RGB,the color is not correct.
The red becomes green. And other colors are not right. I have no idea with this situation.
So, I doubt with the algorithm , it is copied from web, check it again and again, but nothing is found.
Final,I found a short detail in StackOver, it is said that the windows's bitmap pixel format is not RGB,it's BGR.
I changed it, all errors were cleaned.
by zhangshaoyan May 24,2015.