导航

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

    wlyg 发布的帖子

    • RE: 为什么运行示例会这样?

      Traceback (most recent call last):
      File "", line 32, in
      TypeError: extra keyword arguments given
      OpenMV v4.5.4; MicroPython v1.22-omv.r22; OPENMV4P-STM32H743
      Type "help()" for more information.

      发布在 OpenMV Cam
      W
      wlyg
    • 为什么运行示例会这样?
      请在这里粘贴代码# This work is licensed under the MIT license.
      # Copyright (c) 2013-2023 OpenMV LLC. All rights reserved.
      # https://github.com/openmv/openmv/blob/master/LICENSE
      #
      # Keypoints descriptor example.
      # This example shows how to save a keypoints descriptor to file. Show the camera an object
      # and then run the script. The script will extract and save a keypoints descriptor and the image.
      # You can use the keypoints_editor.py util to remove unwanted keypoints.
      import sensor
      import time
      import image
      
      # Reset sensor
      sensor.reset()
      
      # Sensor settings
      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()
      # NOTE: See the docs for other arguments
      # NOTE: By default find_keypoints returns multi-scale keypoints extracted from an image pyramid.
      kpts = img.find_keypoints(max_keypoints=150, threshold=10, scale_factor=1.2)
      
      if kpts is 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_ms(1000)
      
      raise (Exception("Please reset the camera to see the new file."))
      ![0_1715741831530_7c831c12-c730-4ff6-975e-01a0e5bc49f2-image.png](https://fcdn.singtown.com/b2b9accf-1b16-4d1c-95f3-08f94d124950.png) 
      

      0_1715741965553_屏幕截图_20240515_105657.png

      发布在 OpenMV Cam
      W
      wlyg