Fifth commit
This commit is contained in:
@@ -42,26 +42,25 @@ class directionChanges():
|
||||
|
||||
# 图像水平镜面对称
|
||||
def mirrorSymmetry(self):
|
||||
plt6 = self.imageMatrix()[::-1]
|
||||
# plt6 = self.imageMatrix()[::-1]
|
||||
plt6=self.imageRead().transpose(Image.ROTATE_180)
|
||||
plt.imshow(plt6)
|
||||
plt.show()
|
||||
return plt6
|
||||
|
||||
# 垂直对称(右旋转)
|
||||
def verticalSummetry_right(self):
|
||||
plt5 = self.imageMatrix().swapaxes(1, 0)
|
||||
plt.imshow(plt5[:, ::-1])
|
||||
|
||||
plt5=self.imageRead().transpose(Image.ROTATE_270)
|
||||
|
||||
plt.imshow(plt5)
|
||||
plt.show()
|
||||
return plt5
|
||||
|
||||
# 垂直镜面(左旋转)
|
||||
# transpose函数的作用就是调换数组的行列值的索引值,类似于求矩阵的转置
|
||||
def verticalSummetry_lift(self):
|
||||
plt7 = self.imageMatrix().transpose(1, 0, 2) # x,y轴转置
|
||||
plt.imshow(plt7[::-1])
|
||||
plt7 = self.imageRead().transpose(Image.ROTATE_90)
|
||||
plt.imshow(plt7)
|
||||
plt.show()
|
||||
return plt7
|
||||
|
||||
# 保存图片
|
||||
def img_Save(self):
|
||||
root = "E:\\桌面\\Python_Picture_Analysis\\data\\" # 图片保存地址
|
||||
|
Reference in New Issue
Block a user