473,487 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Image to matrix?

2 New Member
Hello everyone!

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

I tried doing it using array:
a = numpy.asarray(img)
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.
Jun 17 '10 #1
2 3232
Glenton
391 Recognized Expert Contributor
Have you looked at the PIL?

What would you expect to be in this matrix?
Jun 18 '10 #2
achiever
2 New Member
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.
Jun 18 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1904
by: Joan | last post by:
Hi! Im working with C++ & win API32. My Problem: I have in a matrix of unsigned chars the colours (in RGB format) of an image. The dimensions of the image are 720 x 576 (cols x rows). So...
1
2907
by: Cristina e Cris | last post by:
Hi! How can i open an image in a specific format and using the image like a matrix?? That is: I want open an image in format like matrix as well as i do in Matlab (imshow(image)). I'm sorry but...
2
451
by: MrPolite | last post by:
I'm using a 5x5 convolution matrix to do some image processing. (I don't really know much about image processing). I lose 2 pixels from the edges of the image. When I apply any 5x5 matrix in...
2
8545
by: Alberto | last post by:
I have an image loaded in a panel and I was trying to make a zoom on it. I still doesn't know how to do it but I was trying to access to the image loaded in the panel. Could you help me? Thank...
4
21255
by: Harry | last post by:
Hello, I am using a 2-dimensional matrix for image manipulation and recognition. The x-axes is image.width pixels long and the y-axes image.height. All fields have a RGB integer value. To store...
4
2735
by: tshad | last post by:
I am trying to set up an Image authorization where you type in the value that is in a picture to log on to our site. I found a program that is supposed to do it, but it doesn't seem to work. ...
0
1410
by: want2learn | last post by:
Hi. I have this CAPTCHA image for .Net in C-Sharp and translate it into VB and as Code_Behind. http://www.mbarrick.com/blog/d6plinks/20061221-01 If i run the site/script i get the site but...
2
1721
by: Marco Biagioni | last post by:
After i've tried to update a vb 6.0 project to vb.net, using visual studio utility,i can't read correctly data bytes from a .bmp file to insert them in a matrix to operate on. Using vb 6.0 the...
2
2797
by: Marco Biagioni | last post by:
After i've tried to update a vb 6.0 project to vb.net, using visual studio utility,i can't read correctly data bytes from a .bmp file to insert them in a matrix to operate on. Using vb 6.0 the...
3
1538
by: defn noob | last post by:
i want to process a large number of images and store their respective pixels in a matrix. what is the mostt efficient way of opening and checking them? i doubt pygame is made for this purpose :)...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7142
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6847
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7352
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4875
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
272
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.