简体   繁体   English

过滤器:如何确定采用哪个掩模矩阵

[英]Filter : how to determine which mask matrix to take

I have been reading DIP by Woods and Gonzalvez when I stumbled upon filtering digital images topic. 当我偶然发现过滤数字图像主题时,我正在阅读Woods和Gonzalvez的DIP。

It states that take a mask of 3x3 matrix like below: 它声明采用3x3矩阵的掩码,如下所示:

w=[0 1 0; 1 4 1; 0 1 0];

But then further on for edge detection it states to take below mask: 但随后进一步进行边缘检测,它指出要在遮罩以下:

w=[-1 -1 -1; -1 8 -1; -1 -1 -1];

I am not sure on what basis of a image we should take mask as - cause different mask matrix values is yielding different images as output of the original image. 我不确定我们应该基于哪个图像蒙版-因为不同的蒙版矩阵值会产生不同的图像作为原始图像的输出。

Is there a generic way to categorize mask matrix to be taken for filtering an Image - I mean take this filter matrix for smoothing, for sharpening for edge detections etc? 有没有一种通用的方法可以对用于过滤图像的蒙版矩阵进行分类-我的意思是将这个过滤器矩阵用于平滑,锐化以进行边缘检测等?

there is no generic way to decide the best mask filter, it depends on the target picture, 没有通用的方法来决定最佳的蒙版滤镜,它取决于目标图片,

for example: 例如:

the size of the edge detection mask may very, from very small masks for small sharp edges, to larger masks for filtered pictures (slow edges changes). 边缘检测遮罩的尺寸可能非常大,从用于小的小边缘的小掩膜到用于过滤后的图片的大掩膜(慢的边缘变化)。

and indeed each mask will yield a different result. 实际上每个遮罩都会产生不同的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM