[Numpy-discussion] nd_image.affine_transform edge effects

Travis Oliphant oliphant at ee.byu.edu
Thu Mar 22 19:33:53 EDT 2007


Stefan van der Walt wrote:

>On Thu, Mar 22, 2007 at 02:41:52PM -0400, Anne Archibald wrote:
>  
>
>>On 22/03/07, James Turner <jturner at gemini.edu> wrote:
>>
>>    
>>
>>>So, its not really a bug, its a undesired feature...
>>>      
>>>
>>It is curable, though painful - you can pad the image out, given an
>>estimate of the size of the window. Yes, this sucks.
>>    
>>
>
>I would rather opt for changing the spline fitting algorithm than for
>padding with zeros.
>  
>
 From what I understand, the splines used in ndimage have the implicit 
mirror-symmetric boundary condition which also allows them to be 
computed rapidly.  There may be ways to adapt other boundary conditions 
and maintain rapid evaluation, but it is not trivial as far as I know.  
Standard spline-fitting allows multiple boundary conditions because 
matrix inversion is used.  I think the spline-fitting done in ndimage 
relies on equal-spacing and mirror-symmetry to allow simple IIR filters 
to be used to compute the spline coefficients very rapidly.

This assumption would have to be re-visited for any changes to be made.

-Travis




More information about the NumPy-Discussion mailing list