我在网上闲逛,我读过的教程都没有我真的不明白。如何为 .pgm 图片实现高通 3 过滤器?我有图像结构:
struct Image {
char* file_name; //name of .pgm file
char header[3];
int max_grey_value;
int height;
int width;
int **pixels; //pixels matrix
struct Image *next; //next element in the list
};
现在如何开始?据我所知,我必须计算一些总和,但我完全不知道如何计算,这个总和是针对整个图像还是针对单个像素?好的,然后呢?我需要将它除以某个商。是函数的那个参数还是它应该自己计算它。我真的很困惑这个。有人可以用初学者可以理解的简单术语向我解释该过滤器的实现吗?