Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I just get pixel data when using imread?

When I use imread on an image it gives me the file name plus the dtype in the same array as the pixel data. Is there a way I can get just the pixel data in the array easily?

Ex: [[204, 176, 245], [204, 176, 245], [204, 176, 245], ..., [202, 173, 246], [201, 172, 245], [201, 172, 245]]], dtype=uint8) '3.3.jpg']

How do I just get pixel data when using imread?

When I use imread on an image it gives me the file name plus the dtype in the same array as the pixel data. Is there a way I can get just the pixel data in the array easily?

Ex: [[204, 176, 245], [204, 176, 245], [204, 176, 245], ..., [202, 173, 246], [201, 172, 245], [201, 172, 245]]], dtype=uint8) '3.3.jpg']

How do I just get pixel data when using imread?

When I use imread on an image then append it to an array and print the array, it gives me the file name plus the dtype in the same array as the pixel data. Is there a way I can get just the pixel data in the array easily?

Ex: [[204, 176, 245], [204, 176, 245], [204, 176, 245], ..., [202, 173, 246], [201, 172, 245], [201, 172, 245]]], dtype=uint8) '3.3.jpg']