我试图实现一个retinex过滤器之后发布here之一。刚开始,他定义:如何在C#中处理ImgData?
#define pc(image, x, y, c) image->imageData[(image->widthStep * y) + (image->nChannels * x) + c]
,做高斯卷积时,他正在使用它作为:
v1 += kernel[k] * (unsigned char)pc(temp, i, source, 0);
及更高版本:
pc(img, i, j, 0) = (char)int2smallint(v1);
我不能把这种到C#,我也不明白他在做什么。 C#中没有无符号字符,并且访问图像数据的方式也完全不同。那么,在C#中实现这个最好的方法是什么?
http://www.aforgenet.com/framework/docs/html/f074e0dd-865c-fd5f -ba0a-80e336a0eaea.htm –