LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-12-2009, 04:10 AM   #1
matrix13
Member
 
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 134

Rep: Reputation: 25
Exclamation unable to read images using 'pymorph' in python


I am trying to do some image processing work on python. I load the image using python imaging library. I want to do some morphological operations on the image. So, I used pymorph.
I couldn't apply the morphological operations using pymorph, on the images read using pil. I dont know why. Please help on this.

Next, I tried to read the image directly using pymorph.readgray() function. I am trying to read an RGB image. But, I got these error:
Quote:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/pymorph-0.90b-py2.5.egg/pymorph/mmorph.py", line 3571, in readgray
if numpy.alltrue(numpy.alltrue(y[0,:,:] == y[1,:,:] and
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Please help me on this too.

I would also like to know, what libraries are useful for doing image processing applications.

Thanks and regards
 
Old 02-13-2009, 11:05 PM   #2
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
I am not familiar with polymorph. Is it designed to work with PIL? If not there is no reason to expect them to deal with images in a compatible way.

As for pymorph.readgray() maybe it is just not smart enough to convert the RGB image as it loads. Can you convert to grayscale before you try to load it? For example using the conversion tools in the netpbm package (or even with PIL for that matter)?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
python update - Unable to load GTK2 Python bindings: No module named gtk itpedersen Linux - Software 2 10-03-2008 03:44 AM
Reading embedded images with python xpromisex Programming 0 06-01-2007 05:33 PM
editing iso images (mounting read-write?) aesahaettr Linux - Software 5 11-16-2006 07:51 PM
Python: Bit masking images? sienarot Programming 1 03-06-2004 02:46 PM
kernel panic unable to mount root (yes ive read/read other posts) dmx9595 Linux - General 4 01-17-2004 05:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration