1. 程式人生 > 其它 >gray.shape[::-1]和gray.shape[:]表示的意思

gray.shape[::-1]和gray.shape[:]表示的意思

技術標籤:影象處理pythonpython影象處理

gray.shape[::-1]和gray.shape[:]表示的意思

1.首先提一下.shape[:]的含義

t=gray.shape[:]

t表示的是gray圖片的size
在這裡插入圖片描述 在這裡插入圖片描述
2.接下來再說一下.shape[::-1]

t=gray.shape[::-1]

這個時候t表示的是gray的size轉置
在這裡插入圖片描述