|  | 
 
| 请问下版主1.OV9650摄像头采集的图像格式只能是rgb565么??可不可以设置啊??我在网上找了个rgb565转rgb888的程序 并用QT显示,但是图像颜色混乱只有个轮廓,能不能帮我看看这个转换程序是不是有问题呢?? void Rgb565ToRgb888(int w,int h,unsigned char *rgb,unsigned char *rgb888)
 {    unsigned long i;    unsigned short *rgb565;    rgb565=(unsigned short *)rgb;    for(i=0;i<w*h;i++)    {       rgb888[3*i+2]=((*(rgb565)&0xf800>>11)<<3);       rgb888[3*i+0]=((*(rgb565)&0x07e0>>5)<<2);       rgb888[3*i+1]=((*(rgb565)&0x001f>>0)<<3);       rgb565++;    }}  Rgb565ToRgb888(480,272,(unsigned char *)buf,(unsigned char *)&rgb888);  image888=new QImage(rgb888,480,272,QImage::Format_RGB888);  image888->loadFromData((unsigned char*)rgb888,WIDTH*HEIGHT*3);  ui->window->setPixmap(QPixmap::fromImage(*image888,Qt::AutoColor));2.H264编码只支持YUV格式的数据么??rgb565可以直接编码么???
 | 
 |