导航

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

    3gex

    @3gex

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

    3gex 关注

    3gex 发布的帖子

    • 写入照片到sd卡速度过慢

      录入照片,录入特征点的时候,ide只要重置openmvcam,软件马上未响应死掉怎么解决。录入的照片需要很久才能看到。

      # Snapshot Example
      
      #
      
      # Note: You will need an SD card to run this example.
      
      #
      
      # You can use your OpenMV Cam to save image files.
      
      
      
      import sensor, image, pyb
      
      
      
      RED_LED_PIN = 1
      
      BLUE_LED_PIN = 3
      
      
      
      sensor.reset() # Initialize the camera sensor.
      
      sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.GRAYSCALE
      
      sensor.set_framesize(sensor.B128X128) # or sensor.QQVGA (or others)
      
      sensor.set_windowing((92,112))
      
      sensor.skip_frames(10) # Let new settings take affect.
      
      sensor.skip_frames(time = 2000)
      
      
      
      num = 1 #设置被拍摄者序号,第一个人的图片保存到s1文件夹,第二个人的图片保存到s2文件夹,以此类推。每次更换拍摄者时,修改num值。
      
      
      
      n = 20 #设置每个人拍摄图片数量。
      
      
      
      #连续拍摄n张照片,每间隔3s拍摄一次。
      
      while(n):
      
          #红灯亮
      
          pyb.LED(RED_LED_PIN).on()
      
          sensor.skip_frames(time = 3000) # Give the user time to get ready.等待3s,准备一下表情。
      
      
      
          #红灯灭,蓝灯亮
      
          pyb.LED(RED_LED_PIN).off()
      
          pyb.LED(BLUE_LED_PIN).on()
      
      
      
          #保存截取到的图片到SD卡
      
          print(n)
      
          sensor.snapshot().save("singtown/s%s/%s.pgm" % (num, n) ) # or "example.bmp" (or others)
      
      
      
          n -= 1
      
      
      
          pyb.LED(BLUE_LED_PIN).off()
      
          print("Done! Reset the camera to see the saved image.")
      
      
      
      
      发布在 OpenMV Cam
      3
      3gex
    • RE: IDE重置的时候,为啥软件马上未响应

      对的 重置就未响应

      # 特征点保存例程
      
      # 此示例显示如何将关键点描述符保存到文件。向相机显示一个对象,然后运行
      
      # 该脚本。该脚本将提取并保存关键点描述符和图像。
      
      # 您可以使用keypoints_editor.py 来删除不需要的关键点。
      
      #
      
      # 注意:请在运行此脚本后重置摄像头以查看新文件。
      
      import sensor, time, image
      
      
      
      # 重置传感器
      
      sensor.reset()
      
      
      
      # 传感器设置
      
      sensor.set_contrast(3)
      
      sensor.set_gainceiling(16)
      
      sensor.set_framesize(sensor.VGA)
      
      sensor.set_windowing((320, 240))
      
      sensor.set_pixformat(sensor.GRAYSCALE)
      
      
      
      sensor.skip_frames(time = 2000)
      
      sensor.set_auto_gain(False, value=100)
      
      
      
      FILE_NAME = "desc"
      
      img = sensor.snapshot()
      
      # 注意:请参阅文档查看其他参数
      
      # 注:默认情况下,find_keypoints返回从图像中提取的多尺度关键点。
      
      kpts = img.find_keypoints(max_keypoints=150, threshold=10, scale_factor=1.2)
      
      
      
      if (kpts == None):
      
          raise(Exception("Couldn't find any keypoints!"))
      
      
      
      image.save_descriptor(kpts, "/%s.orb"%(FILE_NAME))
      
      img.save("/%s.pgm"%(FILE_NAME))
      
      
      
      img.draw_keypoints(kpts)
      
      sensor.snapshot()
      
      time.sleep(1000)
      
      raise(Exception("Done! Please reset the camera"))
      
      发布在 OpenMV Cam
      3
      3gex
    • RE: IDE重置的时候,为啥软件马上未响应

      @3gex 录入特征点后重置就会这样

      发布在 OpenMV Cam
      3
      3gex
    • IDE重置的时候,为啥软件马上未响应

      IDE重置的时候,为啥软件马上未响应

      发布在 OpenMV Cam
      3
      3gex