Memory Error When Converting to LAB Color Space.

Hello, This is my first post in this forum. Thank you in advance for any and all help. I have an image that when initially loaded in RGB yields a memory error when converted to LAB via color.rgb2lab(image). I get the following error:
lab_image = color.rgb2lab(image) Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> lab_image = color.rgb2lab(image) File "C:\Python33\lib\site-packages\skimage\color\colorconv.py", line 801, in rgb2lab return xyz2lab(rgb2xyz(rgb)) File "C:\Python33\lib\site-packages\skimage\color\colorconv.py", line 523, in rgb2xyz arr = _prepare_colorarray(rgb).copy() MemoryError
The picture itself has the following specs: File Type: .PNG File size: 20 MB Resolution: 72 ppi image.shape = (5184, 3456, 3) I am working on a windows 7 machine with python 3.3.4. I am an intermediate python programmer, and have no idea where to start when it comes to memory allocation. Any and all help is appreciated, Thank you, Michael Alonge

Hi Michael On Thu, Oct 2, 2014 at 7:17 PM, Michael Alonge <malonge11@gmail.com> wrote:
I have an image that when initially loaded in RGB yields a memory error when converted to LAB via color.rgb2lab(image). I get the following error:
Just as a basic memory size check, can you please let me know whether the following script executes successfully? import numpy as np shape = (5184, 3456, 3) out = [] for i in range(5): print("Allocating #", i) out.append(np.zeros(shape, dtype=float).fill(1)) Thanks Stéfan

Thanks so much for the help. I am processing with 32 GB of RAM and a 64-bit operating system. That being said, I am running the 32 bit version of python. On Thursday, October 2, 2014 10:17:57 AM UTC-7, Michael Alonge wrote:
Hello,
This is my first post in this forum. Thank you in advance for any and all help.
I have an image that when initially loaded in RGB yields a memory error when converted to LAB via color.rgb2lab(image). I get the following error:
lab_image = color.rgb2lab(image) Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> lab_image = color.rgb2lab(image) File "C:\Python33\lib\site-packages\skimage\color\colorconv.py", line 801, in rgb2lab return xyz2lab(rgb2xyz(rgb)) File "C:\Python33\lib\site-packages\skimage\color\colorconv.py", line 523, in rgb2xyz arr = _prepare_colorarray(rgb).copy() MemoryError
The picture itself has the following specs:
File Type: .PNG
File size: 20 MB
Resolution: 72 ppi
image.shape = (5184, 3456, 3)
I am working on a windows 7 machine with python 3.3.4.
I am an intermediate python programmer, and have no idea where to start when it comes to memory allocation. Any and all help is appreciated,
Thank you,
Michael Alonge

On Oct 6, 2014 8:28 PM, "Michael Alonge" <malonge11@gmail.com> wrote:
Thanks so much for the help.
I am processing with 32 GB of RAM and a 64-bit operating system. That
being said, I am running the 32 bit version of python. With that version of Python, you cannot access even a fraction of that memory. Can you try the 64-bit version? Stéfan

That did the trick! Thanks so much for the help everyone. On Thursday, October 2, 2014 10:17:57 AM UTC-7, Michael Alonge wrote:
Hello,
This is my first post in this forum. Thank you in advance for any and all help.
I have an image that when initially loaded in RGB yields a memory error when converted to LAB via color.rgb2lab(image). I get the following error:
lab_image = color.rgb2lab(image) Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> lab_image = color.rgb2lab(image) File "C:\Python33\lib\site-packages\skimage\color\colorconv.py", line 801, in rgb2lab return xyz2lab(rgb2xyz(rgb)) File "C:\Python33\lib\site-packages\skimage\color\colorconv.py", line 523, in rgb2xyz arr = _prepare_colorarray(rgb).copy() MemoryError
The picture itself has the following specs:
File Type: .PNG
File size: 20 MB
Resolution: 72 ppi
image.shape = (5184, 3456, 3)
I am working on a windows 7 machine with python 3.3.4.
I am an intermediate python programmer, and have no idea where to start when it comes to memory allocation. Any and all help is appreciated,
Thank you,
Michael Alonge
participants (2)
-
Michael Alonge
-
Stéfan van der Walt