我试着用线性滤波器来检测直线。我的第一次尝试是像这样旋转内核,但不起作用:
kernel = zeros((13,13))
kernel60 = zeros((13,13))
kernel[4] = [0,0,0,0,-1,-1,-1,-1,-1,0,0,0,0]
#kernel[5] = [0,0,0,0,0]
kernel[6] = [0,0,0,0,2,2,2,2,2,0,0,0,0]
#kernel[7] = [0,0,0,0,0]
kernel[8] = [0,0,0,0,-1,-1,-1,-1,-1,0,0,0,0]
rotate60 = zeros((2,3))
GetRot