• 免费好用的星瞳AI云服务上线!简单标注,云端训练,支持OpenMV H7和OpenMV H7 Plus。可以替代edge impulse。 https://forum.singtown.com/topic/9519
  • 我们只解决官方正版的OpenMV的问题(STM32),其他的分支有很多兼容问题,我们无法解决。
  • 如果有产品硬件故障问题,比如无法开机,论坛很难解决。可以直接找售后维修
  • 发帖子之前,请确认看过所有的视频教程,https://singtown.com/learn/ 和所有的上手教程http://book.openmv.cc/
  • 每一个新的提问,单独发一个新帖子
  • 帖子需要目的,你要做什么?
  • 如果涉及代码,需要报错提示全部代码文本,请注意不要贴代码图片
  • 必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
  • 禁用摄像头后,帧率不变。



    • 禁用和开启摄像头,系统的输出的帧率没有改变,讲道理禁用摄像头后,帧率应该有提升才对啊。
      禁用和不禁用都是24帧

      未禁用时
      1_1564299708261_未禁用.png

      禁用时
      0_1564299708261_禁用.png

      请在这里粘贴代码
      ```import sensor, image, time, math,lcd,struct
      from pyb import UART
      from pyb import LED
      import json
      
      def send_data_packet(x, y):
          temp = struct.pack(">bBBb",                #格式为俩个字符俩个整型
                         0xAA,                       #帧头1
                         int(x), # up sample by 4    #数据1
                         int(y), # up sample by 4    #数据2
                         0xAE)                       #帧头2
          uart.write(temp)
      
      # Color Tracking Thresholds (Grayscale Min, Grayscale Max)
      # The below grayscale threshold is set to only find extremely bright white areas.
      xiaoqiu = (130, 255)
      zuobiao = (140, 180)
      left_roi =(65,52,459,432)
      
      a = 0
      led1 = LED(1)   #red
      led2 = LED(2)   #green
      
      sensor.reset()
      sensor.set_pixformat(sensor.GRAYSCALE)
      sensor.set_framesize(sensor.VGA)
      sensor.skip_frames(time = 2000)
      sensor.set_auto_gain(False) # must be turned off for color tracking
      sensor.set_auto_whitebal(False) # must be turned off for color tracking
      sensor.set_auto_exposure(False,4000)
      clock = time.clock()
      uart = UART(3,115200)  #串口3,波特率115200
      uart.init(115200,bits=8,parity=None,stop=1)
      
      
      # Only blobs that with more pixels than "pixel_threshold" and more area than "area_threshold" are
      # returned by "find_blobs" below. Change "pixels_threshold" and "area_threshold" if you change the
      # camera resolution. "merge=True" merges all overlapping blobs in the image.
      
      while(True):
          clock.tick()
          led1.toggle()
          img = sensor.snapshot()
          if a==0:
             if img.find_blobs([xiaoqiu],roi=left_roi,pixels_threshold=60, area_threshold=60, merge=True)==[]:
                  led1.on()#亮
                  led2.off()#灭
                  #send_data_packet(180,180)
                  send_data_packet(clock.fps(),clock.fps())
                  print(clock.fps())
             else:
                 for blob in img.find_blobs([xiaoqiu],roi=left_roi,pixels_threshold=60, area_threshold=60, merge=True):
                    # These values depend on the blob not being circular - otherwise they will be shaky.
                    # These values are stable all the time.
                    img.draw_rectangle(blob.rect(), color=200)
                    img.draw_cross(blob.cx(), blob.cy(), color=0)
                    send_data_packet(blob.cx(),blob.cy())
                    print(blob.cx(),blob.cy())
                    led2.on()
                    led1.off()
                    #output_str="[%d,%d]" % (blob.cx(),blob.cy())
                    #uart.write(output_str+'\r\n')
                    print(clock.fps())


    • 确实不变,
      我测试了,OpenMV4H7上,GRAYSCALE和VGA,无论是否禁用,都是30帧左右。
      如果代码少一点只采集,大概是35帧。



    • 这个帧率那就是极限了么?按理来说禁用摄像头应该是有所提升的,是不是我哪里的配置不对啊.



    • @3lmp OpenMV4传输给电脑有DMA的,不是完全串行的,

      使用OpenMV3测试,禁用13帧,不禁用6帧。