|
|
micromysore wrote:
> 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
How far off are they (e.g., what's max(max(abs(J-J1))) )? Is it just
edge regions where they are off? Could the difference be attributable
to different precision errors in the way Matlab does the computation in
each case?
Cheers! --M
|
|