MCPcopy Index your code
hub / github.com/lining0806/PythonSpiderNotes / numpoint

Function numpoint

Captcha1/tess_test.py:29–38  ·  view source on GitHub ↗
(im)

Source from the content-addressed store, hash-verified

27
28# 计算范围内点的个数
29def numpoint(im):
30 w, h = im.size
31 # print w, h
32 data = list(im.getdata())
33 mumpoint = 0
34 for x in range(w):
35 for y in range(h):
36 if data[y*w+x] == 0: # 0-黑色,255-白色
37 mumpoint += 1
38 return mumpoint
39
40# 投影法去干扰线
41def pointmidu(binary_image_name, midu_image_name):

Callers 1

pointmiduFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected