Forums

how to apply 2D FIR filter to an image using MATLAB?

Started by fulltime January 21, 2007
Hi all, I have used remez function to design a 1D FIR filter and
converted it to a 2D FIR filter using ftrans2. However, wat commands in
matlab can i use to apply this 2D FIR filter to my image? thks..

On 22 jan, 03:35, "fulltime" <PiaoCh...@gmail.com> wrote:
> Hi all, I have used remez function to design a 1D FIR filter and > converted it to a 2D FIR filter using ftrans2. However, wat commands in > matlab can i use to apply this 2D FIR filter to my image? thks..
Hi, you can use the function filter2. In the Matlab help, you can read : Y = FILTER2(B,X) filters the data in X with the 2-D FIR filter in the matrix B. The result, Y, is computed using 2-D correlation and is the same size as X. Matthieu
hi mathhieu, thks for your reply.

I was wondering after u read in an image using imread, do i need to
convert to any particular format b4 i perform filter2?

in addition, wats the difference btwn filter2 and conv2?

thanks alot.

Matthieu Puigt wrote:
> On 22 jan, 03:35, "fulltime" <PiaoCh...@gmail.com> wrote: > > Hi all, I have used remez function to design a 1D FIR filter and > > converted it to a 2D FIR filter using ftrans2. However, wat commands in > > matlab can i use to apply this 2D FIR filter to my image? thks.. > > Hi, > > you can use the function filter2. > > In the Matlab help, you can read : > Y = FILTER2(B,X) filters the data in X with the 2-D FIR > filter in the matrix B. The result, Y, is computed > using 2-D correlation and is the same size as X. > > Matthieu