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



    • # 录制动图例程
      #
      # 注意:您将需要SD卡来运行此示例。
      #
      # You can use your OpenMV Cam to record gif files. You can either feed the
      # recorder object RGB565 frames or Grayscale frames. Use photo editing software
      # like GIMP to compress and optimize the Gif before uploading it to the web.
      # 你可以用你的OpenMV摄像头来记录gif文件。您可以提供记录器对象RGB565帧或灰度帧。
      # 使用像GIMP这样的照片编辑软件来压缩和优化Gif,然后再上传到web。
      
      import sensor, image, time, gif, pyb
      
      RED_LED_PIN = 1
      BLUE_LED_PIN = 3
      
      sensor.reset() # 初始化sensor
      
      sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
      #设置图像色彩格式,有RGB565色彩图和GRAYSCALE灰度图两种
      
      sensor.set_framesize(sensor.QQVGA) # or sensor.QVGA (or others)
      #设置图像像素大小
      
      sensor.skip_frames(time = 2000) # 让新的设置生效
      clock = time.clock() # 跟踪FPS帧率
      
      pyb.LED(RED_LED_PIN).on()
      sensor.skip_frames(30) # Give the user time to get ready.
      #程序开始时,先等待30帧图像,让用户有时间准备
      
      pyb.LED(RED_LED_PIN).off()
      pyb.LED(BLUE_LED_PIN).on()
      
      g = gif.Gif("example.gif", loop=True)
      #gif.Gif(filename, width=Auto, height=Auto, color=Auto, loop=True)创建一个gif对象,filename为保存gif动图的文件路径
      
      print("You're on camera!")
      for i in range(100):
          clock.tick()
          # clock.avg()返回帧与帧之间的毫秒数,其中包含gif延迟
          g.add_frame(sensor.snapshot(), delay=10) # centiseconds.
          #gif.add_frame(image, delay=10),向gif动图中添加图片,delay=10指每隔
          #10分秒添加一张图。
          print(clock.fps())
      
      g.close()
      pyb.LED(BLUE_LED_PIN).off()
      print("Done! Reset the camera to see the saved recording.")
      
      

      用的是openmvh7 plus 最新的固件版本



    • 好了问题已经解决了,是因为没有插SD卡