[Numpy-discussion] Bilateral filter

Zachary Pincus zachary.pincus@yale....
Fri Feb 27 14:26:55 CST 2009

Hi all,

I just grabbed the latest bilateral filter from Stéfan's repository,  
but I can't get it to work! I'm using a recent numpy SVN and the  
latest release of cython...

In [10]: bl = bilateral.bilateral(image, 2, 150)
NameError                                 Traceback (most recent call  

/Users/zpincus/Documents/Research/Slack Lab/Experimental Data/Big Data/ 
2009-2-17/<ipython console> in <module>()

packages/bilateral/bilateral.pyc in bilateral(mat, xy_sig, z_sig,  
filter_size, mode)
      36     '''
---> 38     filter_fcn = _BB.Bilat_fcn(xy_sig, z_sig, filter_size)
      39     size = filter_fcn.xy_size
      40     return generic_filter(mat, filter_fcn.cfilter, size=size,  

packages/bilateral/bilateral_base.so in  
bilateral.bilateral_base.Bilat_fcn.__init__ (bilateral/ 

NameError: np

I know very little about the internals of cython, so I can't figure  
this error out... it seems to be a problem with the 'cimport numpy as  
np' line in the pyx file, but beyond that I'm lost.

Let me know if I can provide any additional information,


On Feb 14, 2009, at 1:29 PM, Stéfan van der Walt wrote:

> Hi Nadav
> 2009/2/13 Nadav Horesh <nadavh@visionsense.com>:
>> I tried the installer and it did not copy bilateral.py. I tried to  
>> improve it and the result is in the attached file.  I hope it would  
>> pass the mail filter, if not contact me directly to the email  
>> address below.
> Thanks!  I applied your changes and modified the setup.py to support
> in-place building.  Again available here:
> http://github.com/stefanv/bilateral/tree/master
> Cheers
> Stéfan
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion

More information about the Numpy-discussion mailing list