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.

[参考译文] CCS/TMS320DM6437:TMS320DM6437图像梯度编码

Guru**** 2589265 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/591557/ccs-tms320dm6437-tms320dm6437-image-gradient-coding

器件型号:TMS320DM6437

工具/软件:Code Composer Studio

我需要有关图像梯度滤波器编码的帮助。

是否有人知道如何启动代码?

下面是灰色滤波器、我需要梯度滤波方面的帮助。 谢谢你

void ConvertGrayscale()

int x、y;
unsigned char r、g、b、灰色;
对于(y=0、<YSIZE; y++)

对于(x=0;x <XSIZE; x++)

r =*(((unsigned char*) imgBuffer)+((((y * XSIZE)+ x)* 4)+ 3);
G =*(((unsigned char*) imgBuffer)+((((y * XSIZE)+ x)* 4)+ 2);
b =*(((unsigned char*) imgBuffer)+((((y * XSIZE)+ x)* 4)+ 1);
灰色=(无符号字符)(0.299 * r + 0.587 * g + 0.114 * b);

*(((unsigned char*) imgGray)+(((y * XSIZE)+ x)* 4)+ 3)=灰色;
*(((unsigned char*) imgGray)+(((y * XSIZE)+ x)* 4)+ 2)=灰色;
*(((unsigned char*) imgGray)+(((y * XSIZE)+ x)* 4)+ 1)=灰色;