Create Numpy array of images

前端 未结 4 1624
臣服心动
臣服心动 2021-01-31 06:01

I have some (950) 150x150x3 .jpg image files that I want to read into an Numpy array.

Following is my code:

X_data = []
files = glob.glob (\"*.jpg\")
fo         


        
4条回答
  •  被撕碎了的回忆
    2021-01-31 06:24

    Your definition for the .JPG frame that will be put into a matrix of the same size should should be x, y, R, G, B, A. "A" is not used, but it does take up 8 bits at the end of each pixel.

提交回复
热议问题