- 博客(4)
- 收藏
- 关注
原创 python图像处理-----图像增强(空间域)
1.反转变换反转变换:s = (L-1) - rdef fan_zhuan_bian_huan(image): a,b = image.shape[:2] img = np.zeros((a,b),dtype=np.uint8) for i in range(a): for j in range(b): img[i][j] = 2...
2020-01-18 00:32:14
813
原创 python的LZW解码代码
a = input(“输入需要解码的数组:”)arr = [int(n) for n in a.split()]dictionary = {i:chr(i) for i in range(32,122)}last = 256result = []p = arr.pop(0)result.append(dictionary[p])for c in arr:if c in dictio...
2020-01-10 16:48:25
494
原创 python的lZW编码代码
string = input("输入需要的编码的字符串:")dictionary = {chr(i):i for i in range(32, 122)}last = 256p = ""result = []for c in string: pc = p + c if pc in dictionary: p = pc else: ...
2020-01-10 16:46:20
901
原创 信道容量计算
import numpy as npimport math#输入信道矩阵m = int(input("输入信道矩阵行数:"))n = int(input("输入信道矩阵列数:"))pyx = np.empty([m,n], dtype = float) for i in range(m): for j in range(n): pyx[i][j] = float...
2019-11-01 15:07:20
3381
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人