[Tutor] New to Python - simple question

ALAN GAULD alan.gauld at btinternet.com
Sun Nov 18 09:44:22 CET 2012


>>> And the relevant portion in imtools.py is:
>>> def histeq(im,nbr_bins=256):
>>>      """ Histogram equalization of a grayscale image. """
>>>
>>>      #get image histogram
>>>      imhist,bins = histogram(im.flatten(),nbr_bins,normed=True)
>>
>>
>> This is the call, but where is histogram? If it is in imtools are you sure
>
>The function histogram is supposed to come from the numpy module; at
>least that's the case on my computer (I have numpy 1.6.2 for Python
>2.7):
>
>>>> from numpy import *
>>>> histogram
><function histogram at 0x10b0c0ed8>
>
>Maybe something is wrong with Unaiza's version of numpy.
>More likely is that there is no import statement for numpy in imtools.py

Alan G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121118/5a82c6b3/attachment.html>


More information about the Tutor mailing list