[CentralOH] Python library for image processing?

Eric Floehr eric at intellovations.com
Tue Apr 9 16:17:23 EDT 2019


Eric,

Depending on what you want to do, getPixel may or may not be too slow for
you. Both scipy[1] and skimage (sci-kit image)[2] manipulate images as
numpy arrays which allow you to do very efficient matrix operations, if
say, you are doing an operation on every pixel in an image.

You can also easily load an image as a numpy array directly:

from PIL import Image
import numpy as np
image = Image.open('xyz.png')
img_array = np.array(image)

[1] http://cs231n.github.io/python-numpy-tutorial/#scipy-image

[2] https://scikit-image.org/


On Tue, Apr 9, 2019 at 4:04 PM Eric Miller <miller.eric.t at gmail.com> wrote:

> Thanks, that look perfect.
>
> On Tue, Apr 9, 2019, 3:57 PM Joe Shaw <joe at joeshaw.org> wrote:
>
>> Hi,
>>
>> Check out Pillow, https://pillow.readthedocs.io/en/stable/.  It is a
>> fork of the earlier PIL library.  It also integrates nicely with numpy if
>> you need it.
>>
>> If you needed something more powerful, like bindings to the ImageMagick C
>> library, then something like Wand might be better.
>> https://github.com/emcconville/wand
>>
>> Joe
>>
>> On Tue, Apr 9, 2019 at 3:48 PM Eric Miller <miller.eric.t at gmail.com>
>> wrote:
>>
>>> Looking for a library to parse each pixel in an image file. Need to map
>>> each x,y pixel to its associated RGB values.
>>>
>>> Any recommendations for a lib that will do this well?
>>>
>>> Thanks!
>>> _______________________________________________
>>> CentralOH mailing list
>>> CentralOH at python.org
>>> https://mail.python.org/mailman/listinfo/centraloh
>>>
>> _______________________________________________
>> CentralOH mailing list
>> CentralOH at python.org
>> https://mail.python.org/mailman/listinfo/centraloh
>>
> _______________________________________________
> CentralOH mailing list
> CentralOH at python.org
> https://mail.python.org/mailman/listinfo/centraloh
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/centraloh/attachments/20190409/7f437eff/attachment.html>


More information about the CentralOH mailing list