[CentralOH] Python library for image processing?

Eric Miller miller.eric.t at gmail.com
Tue Apr 9 17:05:36 EDT 2019


thanks Eric   I do indeed plan on doing an operation on every pixel in the
image.  Sounds like I may need to use a few libs to achieve it efficiently.

The goal is to parse Kerbal Space Program biome map images
<https://wiki.kerbalspaceprogram.com/wiki/Biome>, to determine the landing
spots that are nearest to the most number of surface biomes.

On Tue, Apr 9, 2019 at 4:17 PM Eric Floehr <eric at intellovations.com> wrote:

> 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
>>
> _______________________________________________
> 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/1e7b21c6/attachment-0001.html>


More information about the CentralOH mailing list