1
votes

How to filter image, or any other kind of 2D matrix via HP 2D filter in Matlab/Octave?

1

1 Answers

4
votes

If your question is "how do I filter a 2D matrix by a 2D FIR filter", the answer is FILTER2. If your question is "how do I filter a 2D matrix by a 2D IIR filter," the answer is see if this helps. If your question is "how do I design a 2D high-pass filter," I don't know.

But if your 2D filter is circular, meaning its frequency response is the same in the each quadrant, I believe you can take the middle row (or column, makes no difference if they're the same) and filter each row then each column (or, again, vice versa) of your 2D matrix. I've never done this myself though so you might want to verify it.