[SciPy-User] bug in ndimage grey_dilation?

Zachary Pincus zachary.pincus at yale.edu
Sun Aug 30 12:14:27 EDT 2009


> I'll work on another patch, but it may require me to understand the  
> code a bit better (I don't even understand the difference between  
> footprint and structure at this point).

Probably a good idea, though it looks like this will take digging some  
into the C code...

 From what I can tell, the "structure" array allows for a non-binary  
morphological kernel, whereas the footprint is binary. Not exactly  
sure what's done with the non-binary values in the structure array as  
part of the min/max operation, though -- I think the values therein  
are added/subtracted to/from the respective values in the input array  
before the max/min operations (respectively).

>> Any other morphological filters that have this inconsistency?
>
> This seems to be the only filter affected with this inconsistency b/ 
> c all other filters delegate their handling of size/footprint/ 
> structure arguments to filters._min_or_max_filter (which handles the  
> scalar sizes without problems).

Presumably there's some reason that grey_opening doesn't delegate this  
as do the rest, but this is a bit of a surprise. Maybe it could?

Zach



More information about the SciPy-User mailing list