导航

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

    3gxu

    @3gxu

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

    3gxu 关注

    3gxu 发布的帖子

    • RE: 调用difference函数问题

      @kidswong999 我是将template.bmp保存到内存卡里面,然后再调用的,运行到images.difference时提示OSError: images not equal!

      发布在 OpenMV Cam
      3
      3gxu
    • RE: 调用difference函数问题

      @kidswong999 格式全是RGB565时是可以的,只是效果不太好!格式全都是灰度图时且大小相同,出现错误,大小和图像格式都是相同的!

      发布在 OpenMV Cam
      3
      3gxu
    • 调用difference函数问题
      import sensor, image, time
      
      sensor.reset()                      # Reset and initialize the sensor.
      sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 (or GRAYSCALE)
      sensor.set_framesize(sensor.QQVGA)   # Set frame size to QVGA (320x240)
      sensor.skip_frames(time = 2000)     # Wait for settings take effect.
      sensor.set_auto_whitebal(False)
      clock = time.clock()                # Create a clock object to track the FPS.
      
      clock.tick()# Update the FPS clock.
      img = sensor.snapshot().mean(1)
      template = image.Image("/template.bmp")
      sensor.skip_frames(time = 2000)
      diff = img.difference(template)
      

      在RGB565格式时是可以用的

      发布在 OpenMV Cam
      3
      3gxu