Stefan, <br><br>Did I pad my example incorrectly? Both images were upped to the larger nearest power of 2 (256)... <br><br>Does the scipy implementation do this differently? I thought that since FFTW support has been dropped, that scipy and numpy use the same routines... <br>
<br>Thanks!<br><br>Chris<br><br><div class="gmail_quote">2009/5/11 Stéfan van der Walt <span dir="ltr"><<a href="mailto:stefan@sun.ac.za">stefan@sun.ac.za</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Chris<br>
<br>
2009/5/11 Chris Colbert <<a href="mailto:sccolbert@gmail.com">sccolbert@gmail.com</a>>:<br>
<div class="im">> When convolving an image with a large kernel, its know that its faster to<br>
> perform the operation as multiplication in the frequency domain. The below<br>
> code example shows that the results of my 2d filtering are shifted from the<br>
> expected value a distance 1/2 the width of the filter in both the x and y<br>
> directions. Can anyone explain why this occurs? I have been able to find the<br>
> answer in any of my image processing books.<br>
<br>
</div>Just as a reminder, when doing this kind of filtering always pad<br>
correctly.  Scipy does this in<br>
<br>
scipy.signal.fftconvolve<br>
<br>
I've also got some filtering implemented in<br>
<br>
<a href="http://mentat.za.net/cgi-bin/hgwebdir.cgi/filter/file/e97c0a6dd0ea/lpi_filter.py" target="_blank">http://mentat.za.net/cgi-bin/hgwebdir.cgi/filter/file/e97c0a6dd0ea/lpi_filter.py</a><br>
<br>
Regards<br>
<font color="#888888">Stéfan<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Numpy-discussion mailing list<br>
<a href="mailto:Numpy-discussion@scipy.org">Numpy-discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br>