• 免费好用的星瞳AI云服务上线!简单标注,云端训练,支持OpenMV H7和OpenMV H7 Plus。可以替代edge impulse。 https://forum.singtown.com/topic/9519
  • 我们只解决官方正版的OpenMV的问题(STM32),其他的分支有很多兼容问题,我们无法解决。
  • 如果有产品硬件故障问题,比如无法开机,论坛很难解决。可以直接找售后维修
  • 发帖子之前,请确认看过所有的视频教程,https://singtown.com/learn/ 和所有的上手教程http://book.openmv.cc/
  • 每一个新的提问,单独发一个新帖子
  • 帖子需要目的,你要做什么?
  • 如果涉及代码,需要报错提示全部代码文本,请注意不要贴代码图片
  • 必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
  • 相同的相机参数,在循环拍摄的模式下,为何每次得到的图像都不相同?



    • import sensor, image, time,pyb
      from pyb import Pin
      sensor.reset()                      # Reset and initialize the sensor.
      sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
      sensor.set_framesize(sensor.SVGA)   # Set frame size to QVGA (320x240)
      sensor.set_auto_exposure(True)
      #sensor.set_auto_gain(False,gain_db=128)
      sensor.skip_frames(time = 2000)     # Wait for settings take effect.
      p_out = Pin('P7', Pin.OUT_PP)#设置p_out为输出引脚
      count = 0
      while(True):
          p_out.high()#设置p_out引脚为高    
          time_start=pyb.millis()
          img = sensor.snapshot()         # Take a picture and return the image.
          duration=pyb.elapsed_millis(time_start)
          p_out.low()#设置p_out引脚为低
          print(sensor.get_exposure_us())
          print(duration)
          print(sensor.get_gain_db())
          time.sleep(1)
          count = count + 1
          img.save("test"+str(count)+".jpg")
          print(count)
          if(count == 10):
              break
      

      相机参数:
      109740(曝光时间)
      20
      23.8066 (增益)
      1
      109740
      27
      23.8066
      2
      109740
      27
      23.8066
      3
      109740
      27
      23.8066
      4
      109740
      26
      23.8066
      5
      109740
      26
      23.8066
      6
      109740
      27
      23.8066
      7
      109740
      26
      23.8066
      8
      109740
      27
      23.8066
      9
      109740
      27
      23.8066
      10
      0_1668758697086_test1.jpg
      0_1668758704998_test2.jpg
      0_1668758712475_test5.jpg



    • 没看懂什么意思?是指亮度不同?



    • @kidswong999 是的,相同参数下,拍摄到的图像差别很大,亮度不同



    • 亮度不同,是因为你开了自动曝光和自动增益,关了就行。

      sensor.reset()                      # Reset and initialize the sensor.
      sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
      sensor.set_framesize(sensor.SVGA)   # Set frame size to QVGA (320x240)
      sensor.skip_frames(time = 2000)     # Wait for settings take effect.
      sensor.set_auto_exposure(False)
      sensor.set_auto_gain(False)