logo

为什么会识别出这么多线?

2021-10-15 16:51
S
飞吧托利
image
63233bde-f5d8-4425-aa9f-95ca637ee2be.png

代码为:

import pyb, sensor, image

sensor.reset()

sensor.set_framesize(sensor.QVGA)

grayscale_thres = (170, 255)

rgb565_thres = (70, 100, -128, 127, -128, 127)

while(True):

img = image.Image('2.bmp',copy_to_fb=True)

img.dilate(4)

for l in img.find_lines(threshold = 1000, theta_margin = 25, rho_margin = 25):

img.draw_line(l.line(), color = (255, 0, 0))

2b091c9a-ab38-480e-8398-95ed524de00b.jpg
2021-10-15 17:53
C
_5hpe

改改参数试试,或者被识别图的彩图发来看看

2021-10-15 19:59
I
网红小智智 星瞳科技

增大threshold 参数,

2021-10-16 15:16
S
飞吧托利
93c23ba0-3c2d-4149-b5fb-df387f47ca3e.jpg