![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法学习专栏
从基础到进阶的学习案例,知识点总结
GHOULM370
任何一个傻瓜都会写能够让机器理解的代码,只有好的程序员才能写出人类可以理解的代码。
展开
-
python快速生成素数算法(一千万以内1.7秒)
def primes(n): if n<2: return [] if n==2: return [2] s=list(range(3,n,2)) mroot=n**0.5 half=len(s) i=0 m=3 while m<=mroot: if s[i]: j=(m*m-3)//2 s[j]=0 while j < half:原创 2021-04-01 21:48:08 · 1492 阅读 · 1 评论 -
验证码去干扰线噪点,适用于字体较粗的图片
#可用于灰度图,二值图的干扰线,噪点去除import cv2def interference_line(img,thresholdValue,BackColor):#img为源矩阵图,thresholdValue为背景色最小值(颜色最深)BackColor为背景色(一般为白色255) h, w = img.shape[:2] # opencv矩阵点是反的 # img[...原创 2020-04-03 16:06:24 · 1050 阅读 · 0 评论