导航

    • 登录
    • 搜索
    • 版块
    • 产品
    • 教程
    • 论坛
    • 淘宝
    1. 主页
    2. s56v
    3. 楼层
    S
    • 举报资料
    • 资料
    • 关注
    • 粉丝
    • 屏蔽
    • 帖子
    • 楼层
    • 最佳
    • 群组

    s56v 发布的帖子

    • 请问这个怎么解决?RuntimeError: Frame capture has timed out.
      import sensor, image, time
      from pyb import UART
      
      uart = UART(3,19200)
      
      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QVGA)
      sensor.skip_frames(time = 2000)
      
      clock = time.clock()
      
      A=uart.read()==b'0x31'
      
      B=uart.read()==b'0x32'
      
      while(True):
          clock.tick()
          img=sensor.snapshot()
          while(A):
          #clock.tick()
          #img = sensor.snapshot()
              for c in img.find_circles(threshold = 3500, x_margin = 10, y_margin = 10, r_margin = 10,r_min = 2, r_max = 100, r_step = 2):
                  img.draw_circle(c.x(), c.y(), c.r(), color = (0, 255, 0))
                  if(c.x()>90):
                      uart.write("d\r")
                  else:
                      if(c.x()<70):
                          uart.write("c\r")
                      else:uart.write("e\r")
                  if(c.y()>70):
                      uart.write("a\r")
                  else:
                      if(c.x()<50):
                          uart.write("b\r")
                      else:uart.write("e\r")
                  time.sleep(1)
      
          while(B):
          #clock.tick()
              thresholds1 = [(30,100,15,127,15,127),(0, 60, -8, 69, -125, -3),(25, 53, -74, -23, 28, 58)]
          #img = sensor.snapshot()
              for blob in img.find_blobs(thresholds1, pixels_threshold=500, area_threshold=2000):
                  img.draw_rectangle(blob.rect())
                  img.draw_cross(blob.cx(), blob.cy())
                  uart.write(blob.code())
      
      

      0_1689302716245_屏幕截图 2023-07-14 104442.png
      我开始运行后,他软件内显示到的图像活动几秒后就不动了,然后自动结束进程,请问这怎么解决?

      发布在 OpenMV Cam
      S
      s56v