How do I just get pixel data when using imread? [closed]
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']
numpy arrays ARE just pixel data.
NO, it does not print or even know the filename (you're making that up)
this not even an opencv problem, you really have to learn about numpy !
@berak I'm not making it up. When I do just one image it prints fine but when I append that image to an array it prints that file name and dtype, so how do I fix that? (Also I don't understand why you tell me that I have to learn more about numpy when you could just be helpful and answer the question instead of saying "you really have to learn about numpy !" It's hard to learn about things when I get answers like yours.)
Ex of singular imread: [[[216 209 214] [217 210 215] [221 214 217] ... [223 221 211] [223 218 215] [215 208 211]]
Ex of appended imreads in array: [[204, 176, 245], [204, 176, 245], [204, 176, 245], ..., [202, 173, 246], [201, 172, 245], [201, 172, 245]]], dtype=uint8), '3.3.jpg'