01 2020 档案

摘要:计算N×M(建议维度大于100*100)的0,1矩阵均匀分布程度,值由0到1表示不均匀到均匀 import numpy as np def make_rand_matrix(side=20): # 制作随机矩阵,用于测试 a = np.random.random((side,side)) for i 阅读全文
posted @ 2020-01-19 17:10 牛郎 阅读(1483) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/52liming/p/9535477.html 阅读全文
posted @ 2020-01-17 14:34 牛郎 阅读(607) 评论(0) 推荐(0)
摘要:rm -rf ~/baidunetdisk 重新启动百度网盘,解决~ 阅读全文
posted @ 2020-01-16 11:21 牛郎 阅读(343) 评论(0) 推荐(0)
摘要:思路1:通过图像熵检测,“无内容”图像熵较小,可通过设置阈值检测“无内容”图像,计算图像熵可参考:https://www.cnblogs.com/niulang/p/12195152.html 思路2:检测图像中连通区域个数和面积 思路2代码: import cv2 import numpy as 阅读全文
posted @ 2020-01-15 15:58 牛郎 阅读(711) 评论(0) 推荐(0)
摘要:import cv2 import numpy as np import math import time def get_entropy(img_): x, y = img_.shape[0:2] img_ = cv2.resize(img_, (100, 100)) # 缩小的目的是加快计算速度 阅读全文
posted @ 2020-01-15 09:44 牛郎 阅读(7968) 评论(0) 推荐(0)
摘要:x, y = img_.shape[0:2] img_ = cv2.resize(img_, (int(y/2), int(x/2))) 实现图像长宽缩小为原来的一半 阅读全文
posted @ 2020-01-15 09:42 牛郎 阅读(1429) 评论(0) 推荐(0)
摘要:1. 查询文件夹file1内文件数量:ls file1 | wc -l 2. 生成文件夹file1内的文件列表:find file1 -type f > list.txt 3. git管理文件,制作删除文件列表:git status | grep "删除" > list.txt 4. 生成file1 阅读全文
posted @ 2020-01-02 10:45 牛郎 阅读(169) 评论(0) 推荐(0)