专家好,
遇到的问题是这样的: dm365平台, LCD是竖屏的时候, 比如 240x320,但是图像采集出来是横的(1280x720), 采用缩放功能可以达到 320x240 ,但是怎么调整为屏幕能够使用的图像? dm365应该没有硬件做 Rotate的功能, 是否要用软件完成旋转功能?
谢谢了!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
专家好,
遇到的问题是这样的: dm365平台, LCD是竖屏的时候, 比如 240x320,但是图像采集出来是横的(1280x720), 采用缩放功能可以达到 320x240 ,但是怎么调整为屏幕能够使用的图像? dm365应该没有硬件做 Rotate的功能, 是否要用软件完成旋转功能?
谢谢了!
最后,我用软件旋转的方式暂时解决这个问题, 附上旋转的代码,希望有人可以用上.
void rotateYUV240SP(Uint8 * src, Uint8 * des,int width,int height)
{
int i, j;
int wh = width * height;
int k = 0;
for(i=0;i<width;i++) {
for(j=0;j<height;j++)
{
des[k] = src[width*j + i];
k++;
}
}
for(i=0;i<width;i+=2)
{
for(j=0;j<height/2;j++)
{
des[k] = src[wh+ width*j + i];
des[k+1]=src[wh + width*j + i+1];
k+=2;
}
}
}