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

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

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

t=gray.shape[:]

t表示的是gray图片的size
在这里插入图片描述 在这里插入图片描述
2.接下来再说一下.shape[::-1]

t=gray.shape[::-1]

这个时候t表示的是gray的size转置
在这里插入图片描述

你可能感兴趣的:(图像处理,python,python,图像处理)