pythonpictureanalysis/main.py

62 lines
2.0 KiB
Python
Raw Normal View History

2022-07-26 21:27:11 +08:00
# -*- coding: utf-8 -*-
# @Time : 2022-7-24 0024 15:59
# @Author : Qing
# @Email : derighoid@gmail.com
# @File : main.py
# @Software: PyCharm
from GammaCorrection import *
from Modify_Pixels import *
from Orientation_Modification import *
from Subtractive_Algorithm import *
from Image_Mix import *
2022-07-27 20:41:38 +08:00
from Blue_noise_sampling import *
from Image_Capture import *
2022-07-26 21:27:11 +08:00
if __name__ == '__main__':
# 图片读取
2022-07-27 20:41:38 +08:00
picture_read = pictureRead('E:\\桌面\\Python_Picture_Analysis\\data\\th.png')
#图片展示
2022-07-28 21:35:42 +08:00
# picture_read.plt_image()
2022-07-27 20:41:38 +08:00
2022-07-26 21:27:11 +08:00
# 图片修改
2022-07-27 20:41:38 +08:00
modif_image = modfifyImage('E:\\桌面\\Python_Picture_Analysis\\data\\th.png')
2022-07-28 21:35:42 +08:00
# modif_image.img_RGB()
# modif_image.pixInversion()
2022-07-26 21:27:11 +08:00
# 图片方向修改
2022-07-27 20:41:38 +08:00
direction_Changes = directionChanges('E:\\桌面\\Python_Picture_Analysis\\data\\th.png')
2022-07-28 21:35:42 +08:00
# direction_Changes.verticalSummetry_right() # 右旋转
# direction_Changes.verticalSummetry_lift() # 左旋转
# direction_Changes.mirrorSymmetry() # 镜像对称
# direction_Changes.imageRepetition() # 图像重复
# # direction_Changes.img_Save() # 图像保存
2022-07-26 21:27:11 +08:00
# 减色算法
2022-07-27 20:41:38 +08:00
reduce_color = ReduceColor('E:\\桌面\\Python_Picture_Analysis\\data\\th.png')
2022-07-28 21:35:42 +08:00
# reduce_color.decrease_color() # 减色算法
# # reduce_color.img_Save()
# reduce_color.imgBinarization() #图像二值化
2022-07-26 21:27:11 +08:00
# Gamma矫正
# gammaCorrect("./data/th.png", 1.5)
2022-07-28 21:35:42 +08:00
#
# # 图片截取
# # left, upper, right, lower
# imgCut('E:\\桌面\\Python_Picture_Analysis\\data\\th.png',20,10,190,190)
# # imgCut('E:\\桌面\\Python_Picture_Analysis\\data\\picture.png',30,70,230,230)
#
# # 图片替换
# imgReplace('E:\\桌面\\Python_Picture_Analysis\\data\\th.png', "E:\\桌面\\Python_Picture_Analysis\\data\\picture.png",
# 10, 50, 250, 250)
#
# # 阿尔法混合
# imageMix('E:\\桌面\\Python_Picture_Analysis\\data\\th.png','E:\\桌面\\Python_Picture_Analysis\\data\\picture.png')
#
# #采样
2022-07-27 20:41:38 +08:00
showImage("./data/th.png")