Reputation: 3245
Function scipy.ndimage.filters.convolve
accept a mode
parameter for different border-handling schemes:
mode : {'reflect','constant','nearest','mirror', 'wrap'}
I know about the imfilter
function in Matlab
, and assume the follow mapping on the keywords used to describe border-handling schemes:
imfilter convolve
(scalar) 'constant'
'symmetric' 'mirror'
'replicate' 'nearest'
'circular' 'reflect' ---- Am I right?
Questions:
'wrap'
do?Upvotes: 3
Views: 3460
Reputation: 126787
The equivalence table is almost correct; the only mistake is "circular", which should be mapped to "wrap"
imfilter convolve
(scalar) 'constant'
'symmetric' 'mirror'
n.a. 'reflect'
'replicate' 'nearest'
'circular' 'wrap'
As stated in the table, the "reflect" convolve mode has no matlab equivalent; the most similar is 'symmetric' (they only differ for the fact that the border element is replicated in 'reflect', but not in 'mirror').
References:
Upvotes: 2