导航

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

    m1bo

    @m1bo

    0
    声望
    5
    楼层
    342
    资料浏览
    0
    粉丝
    0
    关注
    注册时间 最后登录

    m1bo 关注

    m1bo 发布的帖子

    • RE: 录制MJPEG时,结束录制时主程序就必须停止吗?否则会报错?

      @kidswong999 插了SD卡

      发布在 OpenMV Cam
      M
      m1bo
    • RE: 录制MJPEG时,结束录制时主程序就必须停止吗?否则会报错?

      @kidswong999是这样的报错 OSError: The file/directory object is invalid

      发布在 OpenMV Cam
      M
      m1bo
    • RE: 录制MJPEG时,结束录制时主程序就必须停止吗?否则会报错?

      @kidswong999 OSError: The file/directory object is invalid

      发布在 OpenMV Cam
      M
      m1bo
    • RE: 录制MJPEG时,结束录制时主程序就必须停止吗?否则会报错?

      0_1604035952449_5ac78bd4-e928-46dd-b2e7-63635262053b-图片.png

      发布在 OpenMV Cam
      M
      m1bo
    • 录制MJPEG时,结束录制时主程序就必须停止吗?否则会报错?
      # MJPEG Video Recording Example
      #
      # Note: You will need an SD card to run this demo.
      #
      # You can use your OpenMV Cam to record mjpeg files. You can either feed the
      # recorder object JPEG frames or RGB565/Grayscale frames. Once you've finished
      # recording a Mjpeg file you can use VLC to play it. If you are on Ubuntu then
      # the built-in video player will work too.
      
      import sensor, image, time, mjpeg, pyb
      
      RED_LED_PIN = 1
      BLUE_LED_PIN = 3
      
      sensor.reset() # Initialize the camera sensor.
      sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
      sensor.set_framesize(sensor.QVGA) # or sensor.QQVGA (or others)
      sensor.skip_frames(time = 2000) # Let new settings take affect.
      clock = time.clock() # Tracks FPS.
      
      pyb.LED(RED_LED_PIN).on()
      sensor.skip_frames(time = 2000) # Give the user time to get ready.
      
      pyb.LED(RED_LED_PIN).off()
      pyb.LED(BLUE_LED_PIN).on()
      
      m = mjpeg.Mjpeg("example.mjpeg")
      
      print("You're on camera!")
      while(True):
          for i in range(20):
              clock.tick()
              m.add_frame(sensor.snapshot())
              print(clock.fps())
          
          m.close(clock.fps())
          pyb.LED(BLUE_LED_PIN).off()
          print("Done! Reset the camera to see the saved recording.")
      
      发布在 OpenMV Cam
      M
      m1bo