comp.soft-sys.matlab
[Top] [All Lists]

conv2 != filter2 using ftrans2

Subject: conv2 != filter2 using ftrans2
From: "micromysore"
Date: 29 Sep 2005 19:35:11 -0700
Newsgroups: comp.soft-sys.matlab, sci.image.processing
  I = imread('cameraman.tif');
  hx = firpm(10,[0 .4 .6 1],[1 1 0 0]);
  hy = hx;
  J = conv2(hx,hy,I,'same');

  h = ftrans2(hx);
  J1 = filter2(h,I,'same');

  figure; imagesc(J - J1); colorbar

  now J neq J1 ! I stepped thru the filter2 code and seems like the 2D
kernel "h" is not seperable !! The reason why i am doing this is to
design a 2D filter with different cut-off in each axis (non-circular
frequency response). To test equality between 2D derived from 1D, I am
just using the same cut-off at both the axis. From above it seems like
not every 2D filter kernel derived from 1D counterpart is seperable.

What am i missing here and whatz the best way to implement an 2D filter
with different cut-off's in x-axis and y-axis. 


  -mic


<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy