Converting images to csv file in python

前端 未结 4 1538
耶瑟儿~
耶瑟儿~ 2020-12-03 12:51

I have converted my image into a csv file and it\'s like a matrix but I want it to be a single row. How can I convert all of the images in dataset into a csv file (each ima

4条回答
  •  孤街浪徒
    2020-12-03 13:31

    How about you convert your images to 2D numpy arrays and then write them as txt files with .csv extensions and , as delimiters?

    Maybe you could use a code like following:

    np.savetxt('np.csv', image, delimiter=',')
    

提交回复
热议问题