导航

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

    q14z

    @q14z

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

    q14z 关注

    q14z 发布的帖子

    • 神经网络训练数字识别,多少张照片比较好

      😭

      发布在 OpenMV Cam
      Q
      q14z
    • 用tflite能不能和多模板匹配一样,找到多个模板

      我用TensorFlow Lite训练出来的数字识别模型,只能判断它是不是这个数字,能不能和多模板匹配一样告诉我有哪几个模板

      发布在 OpenMV Cam
      Q
      q14z
    • 在Edge Impulse中训练的模型中如何准确定位

      想请教一下,比如我训练识别口罩,如何能够准确定位到口罩的中心坐标

      发布在 OpenMV Cam
      Q
      q14z
    • RE: 用录制移动物体动图例程生成的gif转换为png后,在Edge impulse上训练会报错

      就是我想用edge impulse训练一个动作,用代码来录制gif,把gif转换为png后上传到edge impulse,但是在训练的时候会报错
      报错内容为 错误:不支持 / 的操作数类型:'int' 和 'NoneType'

      发布在 OpenMV Cam
      Q
      q14z
    • 用录制移动物体动图例程生成的gif转换为png后,在Edge impulse上训练会报错

      报错为: 错误:不支持 / 的操作数类型:'int' 和 'NoneType'
      请问有相关操作指导没
      还是说目前不能用openmv4 plus来训练动作识别模型

      # 录制移动物体动图
      #
      # 注意:您将需要SD卡来运行此示例。
      #
      # 您可以使用OpenMV Cam来录制gif文件。可以用于RGB565图或灰度图。
      # 使用像GIMP这样的照片编辑软件在将GIF上传到网络之前对其进行压缩和优化。
      #
      # 此示例演示如何使用OpenMV的帧差异来进行运动检测。检测到运动后,
      # 您的OpenMV摄像机将拍摄视频。
      
      import sensor, image, time, gif, pyb, os
      
      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) # 让新的设置生效
      sensor.set_auto_whitebal(False) # 关闭白平衡
      
      if not "temp" in os.listdir(): os.mkdir("temp") # 新建一个新的文件夹
      
      while(True):
      
          pyb.LED(RED_LED_PIN).on()
          print("About to save background image...")
          sensor.skip_frames(time = 2000) # 给用户一个时间来准备
      
          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()
              # state[5]是照明颜色通道的最大值。当整个图像的最大光照高于20时
              # 触发下面的代码。
              # 照明差异最大值应该为零。
      
              if (stats[5] > 20):
                  diff -= 1
      
          g = gif.Gif("example-%d.gif" % pyb.rng(), loop=True)
      
          clock = time.clock() # 跟踪FPS帧率
          print("You're on camera!")
          for i in range(100):
              clock.tick()
              # clock.avg()返回帧与帧之间的毫秒数,其中包含gif延迟
              g.add_frame(sensor.snapshot(), delay=int(clock.avg()/10)) # centiseconds.
              print(clock.fps())
      
          g.close()
          pyb.LED(BLUE_LED_PIN).off()
          print("Restarting...")
      
      
      发布在 OpenMV Cam
      Q
      q14z
    • RE: 运行gif录制动图时,每次都会自动断开连接,并且录制出来的gif打不开

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

      发布在 OpenMV Cam
      Q
      q14z
    • 运行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 最新的固件版本

      发布在 OpenMV Cam
      Q
      q14z
    • 使用串口通讯接受数据时,使用decode数据就没有了

      在stm32传输数据给openmv4 plus 时不使用decode函数能收到准确的ascii码,在使用后接收到的没有数据。

      
      import sensor, image, time
      from pyb import UART
      
      
      
      clock = time.clock() # Tracks FPS.
      uart = UART(3,115200)   #定义串口3变量
      #设置串口
      uart.init(115200, bits=8, parity=None, stop=0) # init with given parameters
      
      
      #图像循环
      while(True):
          if uart.any():
              a = uart.readline().decode()
              print(a)
          
      

      0_1627373391496_A_J(OCXRNLGOTY3{QI7.png

      
      import sensor, image, time
      from pyb import UART
      
      
      
      clock = time.clock() # Tracks FPS.
      uart = UART(3,115200)   #定义串口3变量
      #设置串口
      uart.init(115200, bits=8, parity=None, stop=0) # init with given parameters
      
      
      #图像循环
      while(True):
          if uart.any():
              a = uart.readline()
              print(a)
      
      

      0_1627373450764_1.png

      发布在 OpenMV Cam
      Q
      q14z
    • RE: 运行边缘检测例程的时候会出现很多噪声?

      不开边缘检测的时候,界面也是一直在闪烁的,关闭了自动曝光也是一样的情况。

      发布在 OpenMV Cam
      Q
      q14z