导航

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

    yznx

    @yznx

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

    yznx 关注

    yznx 发布的帖子

    • RE: 保存图像失败

      @kidswong999 0_1539765513147_360截图20181017163527999.jpg
      保存到内部存储就可以,保存到sd卡就卡死,等一会sd卡才能再显示出来 。保存的图像就是己损坏的了

      发布在 OpenMV Cam
      Y
      yznx
    • RE: 保存图像失败

      @kidswong999 还是写到内部存储了

      发布在 OpenMV Cam
      Y
      yznx
    • RE: 保存图像失败

      @kidswong999 固件升级到3.0.0了,还是写不到sd卡里。sd卡里还是空的

      发布在 OpenMV Cam
      Y
      yznx
    • RE: 保存图像失败

      @kidswong999 在我的电脑里已经有了sd卡,但是程序写的时候还是写到内置存储了。它怎么不会写到sd卡里???

      发布在 OpenMV Cam
      Y
      yznx
    • RE: 保存图像失败

      @kidswong999 试过试过,我一直都是这样做的,sd卡也显示出来了。
      从别的盘复制到sd可以,但是不能从ide往里面保存图像,会卡死。
      这个程序是先创建一个temp文件夹,这个文件夹也没创建出来。
      图里的那个文件夹是我手动创建的。

      发布在 OpenMV Cam
      Y
      yznx
    • 保存图像失败

      用的mv2,插了空白的sd卡,程序就是例程中的移动检测。
      帮忙看看

      0_1539656966414_360截图20181016102905618.jpg
      0_1539656717618_360截图20181016102435299.jpg

      #
      # Note: You will need an SD card to run this example.
      #
      # This example demonstrates using frame differencing with your OpenMV Cam to do
      # motion detection. After motion is detected your OpenMV Cam will take picture.
      
      import sensor, image, pyb, os
      
      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(10) # Let new settings take affect.
      sensor.set_auto_whitebal(False) # Turn off white balance.
      
      if not "temp" in os.listdir(): os.mkdir("temp") # Make a temp directory
      
      while(True):
      
          pyb.LED(RED_LED_PIN).on()
          print("About to save background image...")
          sensor.skip_frames(60) # Give the user time to get ready.
      
          pyb.LED(RED_LED_PIN).off()
          sensor.snapshot().save("temp/bg.bmp")
          print("Saved background image - Now detecting motion!")
          pyb.LED(BLUE_LED_PIN).on()
      
          diff = 10 # We'll say we detected motion after 10 frames of motion.
          while(diff):
              img = sensor.snapshot()
              img.difference("temp/bg.bmp")
              stats = img.statistics()
              # Stats 5 is the max of the lighting color channel. The below code
              # triggers when the lighting max for the whole image goes above 20.
              # The lighting difference maximum should be zero normally.
              if (stats[5] > 20):
                  diff -= 1
      
          pyb.LED(BLUE_LED_PIN).off()
          print("Movement detected! Saving image...")
          sensor.snapshot().save("temp/snapshot-%d.jpg" % pyb.rng()) # Save Pic.
      
      
      发布在 OpenMV Cam
      Y
      yznx