当前位置: 首页 > news >正文

互动网站策划不会代码建设网站

互动网站策划,不会代码建设网站,用WordPress管理app,自己在家开网站做推广同时对一共父级文件夹遍历。获得对应不同干扰程度的模糊图像 # This isimport cv2 import numpy as npdef reduce_resolution(image, factor):height, width, _ image.shape # 获取原始图像的宽度和高度new_width int(width / factor) # 计算新的宽度和高度new_height i…

同时对一共父级文件夹遍历。获得对应不同干扰程度的模糊图像

# This isimport cv2
import numpy as npdef reduce_resolution(image, factor):height, width, _ = image.shape    # 获取原始图像的宽度和高度new_width = int(width / factor) # 计算新的宽度和高度new_height = int(height / factor)# 使用resize方法来缩小图像分辨率,保持尺寸不变resized_image = cv2.resize(image, (new_width, new_height), interpolation=cv2.INTER_AREA)return resized_imagedef motion_blur(image, degree=12, angle=45):image = np.array(image)# 这里生成任意角度的运动模糊kernel的矩阵, degree越大,模糊程度越高M = cv2.getRotationMatrix2D((degree / 2, degree / 2), angle, 1)motion_blur_kernel = np.diag(np.ones(degree))motion_blur_kernel = cv2.warpAffine(motion_blur_kernel, M, (degree, degree))motion_blur_kernel = motion_blur_kernel / degreeblurred = cv2.filter2D(image, -1, motion_blur_kernel)# convert to uint8cv2.normalize(blurred, blurred, 0, 255, cv2.NORM_MINMAX)blurred = np.array(blurred, dtype=np.uint8)return blurredimg = cv2.imread(r'H:\LRFRcode\acrface-bubb\arcface-pytorch-main\ForPaper1_Images_Crop\N010\N010_0008__Gaus2.jpg')idex = 15
Image_perturbation_Gaussian_idex = 1.02*idex
Image_perturbation_Motion_idex = 3*idex
Image_perturbation_reduceresolution_idex = 1.1*idex#
Gaussian_blurred_image = cv2.GaussianBlur(img, ksize=(0,0), sigmaX=Image_perturbation_Gaussian_idex) # ksize 必须是一个正奇数,可以通过 (0, 0) 来自动计算核的大小
Motion_blurred_image = motion_blur(img, degree=Image_perturbation_Motion_idex, angle=45)
reduce_resolution_image = reduce_resolution(img, factor=Image_perturbation_reduceresolution_idex)# cv2.imshow('Original', img)
# cv2.imshow('Gaussian Filter', Gaussian_blurred_image)
# cv2.imshow('Motion Filter', Motion_blurred_image)
# cv2.imshow('reduce_resolution Filter', reduce_resolution_image)
#
# cv2.waitKey(0)
# cv2.destroyAllWindows()# 保存图像
cv2.imwrite("save/Gaussian_blurred_image" + str(Image_perturbation_Gaussian_idex) +".jpg", Gaussian_blurred_image)  # 保存降低分辨率后的图像
cv2.imwrite("save/Motion_blurred_image" + str(Image_perturbation_Motion_idex) +".jpg", Motion_blurred_image)  # 保存降低分辨率后的图像
cv2.imwrite("save/reduced_resolution_image_" + str(Image_perturbation_reduceresolution_idex) +".jpg", reduce_resolution_image)  # 保存降低分辨率后的图像
http://www.yayakq.cn/news/379955/

相关文章:

  • 沈阳网站建设培训班关于二手书的网站开发ppt
  • 网站seo优化主要有哪些手段电子商城有哪些
  • 青岛网站设计选哪家管理咨询包括哪些内容
  • 网站建设运营必备人员wordpress 设置footer
  • 专做充电器的网站动漫设计专业属于什么大类
  • 怎么建设网站服务器网站建设乙方义务
  • 网站后台打开很慢云南网站建设多少钱
  • wordpress支持多个站点地址锦州网站建设资讯
  • 百度网站网址是多少wordpress换域名后无缩约图
  • 建设行业公司网站云梦网络建站
  • php 网站模板wordpress个人博客前台模板
  • 如何使用开源程序做网站学ui三个月是骗学费吗
  • 个人性质的网站 备注怎么写门户网站地方生活门户有哪些
  • 网站架构原理西安防疫今天最新消息
  • 网站的中英文切换怎么做做论坛网站用什么系统
  • 海南手机网站建设公司投资网
  • 移动网站设计上机考试免费推广链接
  • 网站公司推荐怎么在网站上做音乐
  • 如何自己做淘宝客推广网站网站改版意见
  • 免费做店招哪个网站好网页制作公司找哪家
  • 做一个网站 如何盈利wordpress升级后出错
  • 装饰公司简易手机网站成都网站建设爱特通
  • 沙坪坝做网站阿里云域名查询系统
  • 做网站的开发软件蝙蝠侠大连网络营销
  • 想做个网站怎么做论坛搭建 wordpress
  • 深圳住房和建设局网站 招标代理网约车平台赚钱吗
  • 中国建设银行官网站e路护航360渠道推广系统
  • 建设银行手机银行网站用户名php编程软件
  • 贵港网站设计南通做网站企业
  • 好的产品设计网站网站建设和运营