PCV icon indicating copy to clipboard operation
PCV copied to clipboard

imtools.py gives error

Open w1malik opened this issue 8 years ago • 3 comments

By typing the below mentioned commands on command prompt by going into the folder of pca images e.g., C:\Users\Dell\Desktop\pcv_data\data> and typing the python on that prompt: from PIL import Image from numpy import * im = array(Image.open(’AquaTermi_lowcontrast.jpg’).convert(’L’)) im2,cdf = imtools.histeq(im)

I see the following errors:

Traceback (most recent call last): File "", line 1, in NameError: name 'imtools' is not defined

I put the imtools.py file into the same folder in which I am calling 'AquaTermi_lowcontrast.jpg'. Is there a way to deal with such error. I am following the book tutorial given in the "Programming Computer Vision with Python by Jan Erik Solem". The same problem with your tutorial has been posed on stackoverflow and mail.python.org but I tried to call it first using from imtools import * import runs successfully but when i parse ''imtools.histeq(im)'' it gives me the error which is already mentioned above. And I also want to know what is best way to put these module code into which folder from where we can easily call them when needed without giving any path again and again. Thanks.

w1malik avatar Nov 11 '16 09:11 w1malik

did you solve this problem? I meet this error as well.

LidongMo avatar Jan 31 '17 13:01 LidongMo

https://github.com/jesolem/PCV/blob/master/pcv_book/imtools.py

chutsu avatar May 09 '17 18:05 chutsu

add histeq function to imtools file

bassem55 avatar Nov 28 '18 01:11 bassem55