logo

PLUS使用较高像素找线

2021-07-27 15:01
J
dpt5

我的是OPENMV4PLUS,想寻电线,使用VGA像素,为什么找出的是线段这个样子,哪里做的不对

def Line_Find_Fit(img):
    for l in img.find_lines(roi=Middle_Roi, threshold=800, y_stride=20, theta_margin=10, rho_margin=10):
        if ((l.theta() >= min_degree) and (l.theta() <= max_degree)):#and (l.length() >= 20)
            img.draw_line(l.line(), color = (255, 0, 0))
            best_line = l
            PoleAndLine.Line_flag = 1
            PoleAndLine.Line_y = (best_line.y1() + best_line.y2())/2
            print(PoleAndLine.Line_y)
            return best_line
        else:
            PoleAndLine.Line_flag = 0
68f6bc71-ce7a-40dc-8d54-55ca38192afc.jpg
2021-07-27 18:37
I
网红小智智 星瞳科技

你发全部的代码,否则我没法测试。