[操作系统] 求大神。写脚本,或者破解脚本

1512 3
xs1001 2023-10-12 09:26:45 | 显示全部楼层 |阅读模式
求大神。写脚本,或者破解脚本!QQ596057321
TTH 2023-12-16 10:21:53 | 显示全部楼层
怎么样的脚本?
vbs?
bat?
TTH 2023-12-16 10:23:03 | 显示全部楼层
vbs我能自动输入、弹窗
bat我能蓝屏...
yinminghao 2023-12-25 13:01:22 | 显示全部楼层
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. from PIL import Image, ImageFilter

  4. # 读取图片并转换为灰度图
  5. def load_image(image_path):
  6.     img = Image.open(image_path)
  7.     return img.convert("L")

  8. # 对图片进行去噪处理
  9. def denoise_image(image, weight=0.1):
  10.     img_array = np.asarray(image, dtype=np.float32)
  11.     out_array = img_array.copy()
  12.     out_array[1:-1, 1:-1] = img_array[1:-1, 1:-1] * (1 - 4 * weight) + \
  13.                             (img_array[:-2, 1:-1] + img_array[2:, 1:-1] + img_array[1:-1, :-2] + img_array[1:-1, 2:]) * weight
  14.     return Image.fromarray(np.uint8(out_array), "L")

  15. # 对图片进行锐化处理
  16. def sharpen_image(image, radius=2, percent=150):
  17.     return image.filter(ImageFilter.UnsharpMask(radius=radius, percent=percent, threshold=3))

  18. # 显示图片
  19. def display_image(image):
  20.     plt.imshow(image, cmap="gray")
  21.     plt.axis("off")
  22.     plt.show()

  23. # 主程序
  24. def main():
  25.     image_path = "path/to/your/image.jpg"  # 替换为你的图片路径

  26.     # 加载图片
  27.     image = load_image(image_path)

  28.     # 对图片进行去噪处理
  29.     denoised_image = denoise_image(image)

  30.     # 对图片进行锐化处理
  31.     sharpened_image = sharpen_image(denoised_image)

  32.     # 显示原始图片
  33.     print("原始图片:")
  34.     display_image(image)

  35.     # 显示修复后的图片
  36.     print("修复后的图片:")
  37.     display_image(sharpened_image)

  38. if __name__ == "__main__":
  39.     main()
复制代码


python脚本
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

xs1001

初入联盟

关注
  • 2
    主题
  • 0
    粉丝
  • 0
    关注
这家伙很懒,什么都没留下!

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行