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



    • import image, time, fir
      
      drawing_hint = image.BICUBIC # or image.BILINEAR or 0 (nearest neighbor)
      
      # Initialize the thermal sensor
      fir.init()
      w = fir.width()
      h = fir.height()
      
      if (fir.type() == fir.FIR_MLX90621):
          w = w * 10
          h = h * 10
      elif (fir.type() == fir.FIR_MLX90640):
          w = w * 10
          h = h * 10
      elif (fir.type() == fir.FIR_MLX90641):
          w = w * 10
          h = h * 10
      elif (fir.type() == fir.FIR_AMG8833):
          w = w * 20
          h = h * 20
      
      # FPS clock
      clock = time.clock()
      
      while (True):
          clock.tick()
      
          try:
              img = fir.snapshot(x_size=w, y_size=h,
                                 color_palette=fir.PALETTE_IRONBOW, hint=drawing_hint,
                                 copy_to_fb=True)
          except OSError:
              continue
      
          # Print FPS.
          print(clock.fps())
      
      

      为什么例程里这张图mlx90640调色是这样的0_1646455622400_c1a39c1e-848a-41dd-90df-afd570bdad7c-image.png
      而我仿照编写的程序 为了放在摄像头图像上

      import image, time, fir, sensor
      
      drawing_hint = image.BILINEAR # or image.BILINEAR or 0 (nearest neighbor) or image.BICUBIC
      
      # Initialize the thermal sensor
      sensor.reset()
      #初始化摄像头,reset()是sensor模块里面的函数
      
      sensor.set_pixformat(sensor.RGB565)
      #设置图像色彩格式,有RGB565色彩图和GRAYSCALE灰度图两种
      
      sensor.set_framesize(sensor.QVGA)
      #设置图像像素大小
      
      
      
      sensor.skip_frames(time = 2000)
      fir.init(type=fir.FIR_MLX90640, refresh=32)
      w = fir.width()*10
      h = fir.height()*10
      ir_buffer =  fir.snapshot(x_size=w, y_size=h, pixformat=sensor.GRAYSCALE)
      
      clock = time.clock()
      
      while (True):
          clock.tick()
          img = sensor.snapshot()
          ta, ir, to_min, to_max = fir.read_ir()
          to_max=to_max/0.92
          fir.draw_ir(ir_buffer, ir, alpha=256, hint=drawing_hint)
          img.draw_image(ir_buffer, 0, 0, alpha=256,color_palette=fir.PALETTE_IRONBOW)
      

      出来的图像调色是这样的
      0_1646455807176_c1df48d0-135c-4788-b898-67114d0f3dca-image.png
      怎么才能变成上面那幅图的调色



    • 我怎么感觉图像颜色反了,温度越低反而越深,怎么调整一下比较合适