Home > Mobile >  I want to use the "car" array , car[ : 250, :200, : ] to convert into image .Car array sha
I want to use the "car" array , car[ : 250, :200, : ] to convert into image .Car array sha

Time:10-04

Please see the code here:

enter image description here

I want to use the packages already imported

CodePudding user response:

If you want to show or display the image you can use imshow

import matplotlib.pyplot as plt
plt.imshow(car[:250, :200, :])

If you want to save a new image to disk you can use imsave.

from matplotlib.image import imsave
imsave("new_car_image.png", car[:250, :200, :])
  • Related