Image to matrix?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • achiever
    New Member
    • Jun 2010
    • 2

    Image to matrix?

    Hello everyone!

    How can I convert an Image to a matrix of rank 2?

    I tried doing it using array:
    a = numpy.asarray(i mg)
    but it gives a matrix of rank 3, whereas I need a rank 2 matrix as output.

    Hope to get some help on this.

    Thank you.
  • Glenton
    Recognized Expert Contributor
    • Nov 2008
    • 391

    #2
    Have you looked at the PIL?

    What would you expect to be in this matrix?

    Comment

    • achiever
      New Member
      • Jun 2010
      • 2

      #3
      yes, I've been working on PIL, couldn't find anything for this problem.

      I actually want to apply PCA using MDP on the images, and the input data format for MDP is required as matrix of rank 2.

      Comment

      Working...