@kidswong999 重新插拔一下USB接口 ,就正常了
X
小陈
@xd4v
0
声望
20
楼层
771
资料浏览
0
粉丝
0
关注
xd4v 发布的帖子
-
RE: 直线检测报错,求教!
嗯嗯 刚才忘了加冒号。。。改过之后变成这样了,说帧缓存区空间不够?这是怎么回事啊
import sensor, image, time sensor.reset() sensor.set_framesize(sensor.QVGA) sensor.set_pixformat(sensor.RGB565) Line_threshold = (60, 100, -18, 32, -33, 56) # L A B sensor.skip_frames(time = 1000) clock = time.clock() min_degree = 0 max_degree = 179 #img_raw = sensor.snapshot().lens_corr(1.8).save('test.bmp') img_op=image.Image('123.bmp',copy_to_fb=True) #time.sleep(3000) img_op.binary([Line_threshold]) #img_op.erode(2) img_op.dilate(1) img_op.erode(1) for l in img_op.find_line_segments(merge_distance=10, max_theta_differance=2): #if (min_degree <= l.theta()) and (l.theta() <= max_degree): img_op.draw_line(l.line(), color = (255, 0, 0)) print(l.theta()) sensor.flush() time.sleep(100)
-
RE: 直线检测报错,求教!
import sensor, image, time sensor.reset() sensor.set_framesize(sensor.QVGA) sensor.set_pixformat(sensor.RGB565) Line_threshold = (60, 100, -18, 32, -33, 56) # L A B sensor.skip_frames(time = 1000) clock = time.clock() min_degree = 0 max_degree = 179 #img_raw = sensor.snapshot().lens_corr(1.8).save('test.bmp') img_op=image.Image('123.bmp',copy_to_fb=True) #time.sleep(3000) img_op.binary([Line_threshold]) #img_op.erode(2) img_op.dilate(1) img_op.erode(1) for l in img_op.find_line_segments(merge_distance=2, max_theta_differance=2) #(x_stride=3,y_stride=3,threshold = 1000, theta_margin = 10, rho_margin = 20): #if (min_degree <= l.theta()) and (l.theta() <= max_degree): img_op.draw_line(l.line(), color = (255, 0, 0)) print(l.theta()) sensor.flush() time.sleep(100)
-
求助:为什么二值化以后仍然有灰色的像素点?
图上,黑色的线周围有一些灰色的像素点,不知道是怎么回事0.0......求教
import sensor, image, time sensor.reset() sensor.set_framesize(sensor.QVGA) sensor.set_pixformat(sensor.RGB565) Line_threshold = (60, 100, -18, 32, -33, 56) # L A B sensor.skip_frames(time = 1000) clock = time.clock() min_degree = 0 max_degree = 179 #img_raw = sensor.snapshot().lens_corr(1.8).save('123.bmp') img_op=image.Image('123.bmp',copy_to_fb=True) #time.sleep(3000) img_op.binary([Line_threshold]) #img_op.erode(2) img_op.dilate(1) img_op.erode(1) for l in img_op.find_lines (threshold = 3300, theta_margin = 1000, rho_margin = 10): if (min_degree <= l.theta()) and (l.theta() <= max_degree): # img_op.draw_line(l.line(), color = (255, 0, 0)) print(l.theta()) sensor.flush() time.sleep(100)