- #1
Addez123
- 199
- 21
I got an image called img and I want to sharpen the vertical spatial lines.
I created this matrix:
hp = [-3 -2 -1 12 -1 -2 -3];
hp= rot90(h_lowp);
Then I do this to get the new image:
newimg = uint8(conv2(single(hp), single(img)));
It SORTA works, but I'm not so sure why it works.
I mean all I do is multiply or substract neighbouring pixels, I don't see how that could do anything else but blur the image.
I understand how a blurring lowpass matrix works, but I don't see how a highpass filter would work.
Any one care to explain it in abit more detail?
I created this matrix:
hp = [-3 -2 -1 12 -1 -2 -3];
hp= rot90(h_lowp);
Then I do this to get the new image:
newimg = uint8(conv2(single(hp), single(img)));
It SORTA works, but I'm not so sure why it works.
I mean all I do is multiply or substract neighbouring pixels, I don't see how that could do anything else but blur the image.
I understand how a blurring lowpass matrix works, but I don't see how a highpass filter would work.
Any one care to explain it in abit more detail?