Fourth commit
This commit is contained in:
@@ -11,7 +11,7 @@ import os
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
|
||||
#定义 图片方向改变类
|
||||
class directionChanges():
|
||||
def __init__(self, filePath):
|
||||
self.filePath = filePath
|
||||
@@ -64,10 +64,11 @@ class directionChanges():
|
||||
|
||||
# 保存图片
|
||||
def img_Save(self):
|
||||
root = "E:\\桌面\\Python_Picture_Analysis\\data\\"
|
||||
if not os.path.exists(root):
|
||||
os.mkdir(root)
|
||||
root = "E:\\桌面\\Python_Picture_Analysis\\data\\" # 图片保存地址
|
||||
if not os.path.exists(root): # 判断是否已经存在该文件
|
||||
os.mkdir(root) #没有就创建
|
||||
else:
|
||||
#图片保存
|
||||
Image.fromarray(np.uint8(self.imageRepetition())).save(root+'picture4'+'.jpg')
|
||||
Image.fromarray(np.uint8(self.mirrorSymmetry())).save(root+'picture5'+'.jpg')
|
||||
Image.fromarray(np.uint8(self.verticalSummetry_right())).save(root+'picture6'+'.jpg')
|
||||
|
Reference in New Issue
Block a user