0
votes

I have been reading DIP by Woods and Gonzalvez when I stumbled upon filtering digital images topic.

It states that take a mask of 3x3 matrix like below:

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?

1

1 Answers

0
votes

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.