herrDeng網內搜尋

自訂搜尋

Ads

2022年10月17日 星期一

opencv python顯示柴犬圖片與loop, list練習


  1. import cv2
  2.  
  3. xx=[]
  4.  
  5. for i in range(10):
  6. x=cv2.imread('dog'+str(i)+'.jpg')
  7. y=cv2.resize(x,(600, 800))
  8. cv2.imshow('dog', y)
  9. cv2.waitKey(500)
  10. xx.append(y)
  11. cv2.destroyAllWindows()
  12.  
  13. k=-1
  14. while k==-1:
  15. for x in xx:
  16. cv2.imshow('dog2', x)
  17. k=cv2.waitKey(500)
  18. cv2.destroyAllWindows()

沒有留言:

Related Posts Plugin for WordPress, Blogger...

熱門文章