Confusion on image guided filter behavior with odd versus even neighborhood sizes with same 'DegreeofSmoothing'

1 view (last 30 days)
Why does the image guided filter implemented in Matlab 2014 and newer seem to have a nonlinear filtration affect in edge regions for even vs odd neighborhood sizes. For the same 'DegreeofSmoothing' factor even neighborhoods seem to produce heavier filtration in edge regions than odd sized neighborhoods.
for example
I take a noisy test image with edges, and compute several different filtered outputs only varying neighborhood size, Then I compute difference images - Unfiltered Input - Filtered Output and compare these across neighborhood sizes I see strange behavior in edge regions depending on whether the neighborhood is even or odd sized. I have an attached matlab script that demonstrates this. My question is why is there this variation in the difference images based on whether the neighborhood size is even or odd?
  3 Comments
Erick Oberstar
Erick Oberstar on 18 Mar 2016
At this point it has been identified that this is due to a spatial bias from the mean filters with even kernel sizes - even kernels don't have a center pixel location - the center of that filter is an edge between pixels.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!