On Thu, Aug 7, 2014 at 7:49 AM, Whees Northbee <[email protected]> wrote:
> Please help me... I'm using python 2.7.6, numpy 1.8.1, opencv 2.4.9..
> I want to get pixel value in one number like 255 not each value like these
> R(190), G(23), B(45) from coordinate (x,y)...
> I try these code
> m_samples[k][i][j]=getPixel(img,row,col)
>
> But get error:
> NameError: name 'getPixel' is not defined
>
> If I change the format become:
> m_samples[k][i][j]=img.getPixel(row,col)
>
> Still error:
> AttributeError: 'numpy.ndarray' object has no attribute 'getpixel'
>
> Please help me..
>
> Thanks,
>
> Northbee
>
>What module is getPixel from? Do you have that module imported?
Its best if you show complete traceback, and other relevant code

I'm guessing that img is what you imported from numpy.ndarray.  But it
looks to me like getPixel comes from pil
>
>
> _______________________________________________
> Tutor maillist  -  [email protected]
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>



-- 
Joel Goldstick
http://joelgoldstick.com
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to